Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for GH-872, "Not Scanned" case. #15

Merged
merged 5 commits into from Apr 3, 2018
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Requested changes.

  • Loading branch information
Serge Zarembsky
Serge Zarembsky committed Apr 3, 2018
commit 6e62d5fa25abd5da88a64ce882cccfc6f47e4093
@@ -161,17 +161,16 @@ const Click2PlayContentScript = (function (win, doc) {
return false;
}

const { name } = request;
const { name, message } = request;
log('click_to_play.js received message', name);

if (name === 'c2p') {
const reqMsg = request.message;
if (reqMsg) {
if (message) {
// queue Click-to-Play data so that we process multiple Twitter buttons at once, for example
C2P_DATA[reqMsg.app_id] = [reqMsg.app_id, reqMsg.data, reqMsg.html];
C2P_DATA[message.app_id] = [message.app_id, message.data, message.html];

if (doc.readyState === 'complete') {
applyC2P(reqMsg.app_id, reqMsg.data, reqMsg.html);
applyC2P(message.app_id, message.data, message.html);
}
}
}
@@ -731,11 +731,7 @@ const NotificationsContentScript = (function (win, doc) {
'showCMPMessage',
'showBrowseWindow'
];
const { name } = request;
const reqMsg = request.message;
if (!reqMsg) {
return false;
}
const { name, message } = request;

log('notifications.js received message', name);

@@ -747,29 +743,29 @@ const NotificationsContentScript = (function (win, doc) {
}

if (name === 'showCMPMessage') {
CMP_DATA = reqMsg.data;
CMP_DATA = message.data;
showAlert('showCMPMessage', {
campaign: CMP_DATA
});
ALERT_SHOWN = true;
} else if (name === 'showUpgradeAlert') {
NOTIFICATION_TRANSLATIONS = reqMsg.translations;
LANGUAGE = reqMsg.language || 'en';
showAlert('showUpgradeAlert', reqMsg.major_upgrade);
NOTIFICATION_TRANSLATIONS = message.translations;
LANGUAGE = message.language || 'en';
showAlert('showUpgradeAlert', message.major_upgrade);
ALERT_SHOWN = true;
} else if (name === 'showLibraryUpdateAlert') {
NOTIFICATION_TRANSLATIONS = reqMsg.translations;
LANGUAGE = reqMsg.language || 'en';
NOTIFICATION_TRANSLATIONS = message.translations;
LANGUAGE = message.language || 'en';
showAlert('showLibraryUpdateAlert');
ALERT_SHOWN = true;
// Import/Export related messages
} else if (name === 'showBrowseWindow') {
showBrowseWindow(reqMsg.translations);
showBrowseWindow(message.translations);
ALERT_SHOWN = true;
} else if (name === 'onFileImported') {
updateBrowseWindow(reqMsg);
updateBrowseWindow(message);
} else if (name === 'exportFile') {
exportFile(reqMsg);
exportFile(message);
}

// trigger a response callback to src/background so that we can handler errors properly
ProTip! Use n and p to navigate between commits in a pull request.