Disable extension on FirstData Connect payment gateway

main
Elbert Alias 7 years ago
parent cfc43567d0
commit 42fd5f9153

@ -27,7 +27,7 @@ if ( typeof browser !== 'undefined' && typeof document.body !== 'undefined' ) {
script.onload = () => {
const onMessage = event => {
if ( event.data.id !== 'js' ) {
if (event.data.id !== 'js') {
return;
}
@ -41,7 +41,7 @@ if ( typeof browser !== 'undefined' && typeof document.body !== 'undefined' ) {
addEventListener('message', onMessage);
sendMessage('get_js_patterns', {}, response => {
if ( response ) {
if (response) {
postMessage({
id: 'patterns',
patterns: response.patterns
@ -59,7 +59,7 @@ if ( typeof browser !== 'undefined' && typeof document.body !== 'undefined' ) {
}
function sendMessage(id, subject, callback) {
( chrome || browser ).runtime.sendMessage({
(chrome || browser).runtime.sendMessage({
id,
subject,
source: 'content.js'

@ -5,10 +5,10 @@
let value = properties.length ? window : null;
for ( let i = 0; i < properties.length; i ++ ) {
for (let i = 0; i < properties.length; i ++) {
let property = properties[i];
if ( value && value.hasOwnProperty(property) ) {
if (value && value.hasOwnProperty(property)) {
value = value[property];
} else {
value = null;
@ -21,7 +21,7 @@
};
const onMessage = event => {
if ( event.data.id !== 'patterns' ) {
if (event.data.id !== 'patterns') {
return;
}
@ -31,18 +31,18 @@
const js = {};
for ( let appName in patterns ) {
if ( patterns.hasOwnProperty(appName) ) {
for (let appName in patterns) {
if (patterns.hasOwnProperty(appName)) {
js[appName] = {};
for ( let chain in patterns[appName] ) {
if ( patterns[appName].hasOwnProperty(chain) ) {
for (let chain in patterns[appName]) {
if (patterns[appName].hasOwnProperty(chain)) {
js[appName][chain] = {};
for ( let index in patterns[appName][chain] ) {
for (let index in patterns[appName][chain]) {
const value = detectJs(chain);
if ( value && patterns[appName][chain].hasOwnProperty(index) ) {
if (value && patterns[appName][chain].hasOwnProperty(index)) {
js[appName][chain][index] = value;
}
}

@ -46,6 +46,10 @@
"http://*/*",
"https://*/*"
],
"exclude_matches": [
"*.modirum.com/*",
"https://www.alphaecommerce.gr/*"
],
"js": [
"js/iframe.js"
],