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

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

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