我创建了一个chrome扩展程序,该扩展程序从我的页面复制地址字段,并将其粘贴到其他网站(如亚马逊,家得宝等)的结帐页面上, 问题出在家得宝网站,因为它在角度上将数据粘贴到字段中,但仍然显示大量填充字段的错误。 这是我的Chrome扩展代码:-
function _0xd4fbx11hd() {
if(isChrome()){
chrome['storage']['sync']['get']('AmazonAtofill_buyer_name', function(_0x23fcx11) {
if (_0x23fcx11['AmazonAtofill_buyer_name']) {
var name = _0x23fcx11['AmazonAtofill_buyer_name'].split(" ");
//$('.IsBestAnswer').addClass('bestanswer').removeClass('IsBestAnswer');
$('#firstName').val(name[0]);
if(name[1]){
$('#lastName').val(name[1]);
}else{
$('#lastName').val(name[0]);
}
}
});
chrome['storage']['sync']['get']('AmazonAtofill_phone_number', function(_0x23fcx11) {
if (_0x23fcx11['AmazonAtofill_phone_number']) {
$('#phone').val(_0x23fcx11['AmazonAtofill_phone_number']);
//enterAddressPhoneNumber['value'] = _0x23fcx11['AmazonAtofill_phone_number']
}
});
chrome['storage']['sync']['get']('AmazonAtofill_street1', function(_0x23fcx11) {
if (_0x23fcx11['AmazonAtofill_street1']) {
$('#shippingAddress').val(_0x23fcx11['AmazonAtofill_street1']);
}
});
}
}
该代码通过打开url将数据粘贴到网站上。
错误网址:-
我希望您能从中了解到这一点,因为我已经检查了通过此方法粘贴数据时网站html内的类未更改,而当我键入值时,它们得到了更新,例如ng-untouched更改到ng-touched,等等,我猜可能是这个问题,但是我对网站没有任何控制权,我只需要在将值粘贴到输入框中时用扩展名更新这些功能。