wait for docuement content to load before initializing notification bar

This commit is contained in:
Kyle Spearrin 2016-12-30 16:22:32 -05:00
parent cd4ef192f6
commit 020ea1680a
1 changed files with 9 additions and 7 deletions

View File

@ -1,11 +1,13 @@
!(function () { document.addEventListener('DOMContentLoaded', function (event) {
var pageDetails = [], var pageDetails = [],
formData = [], formData = [],
barType = null; barType = null;
setTimeout(function () {
chrome.runtime.sendMessage({ chrome.runtime.sendMessage({
command: 'bgCollectPageDetails' command: 'bgCollectPageDetails'
}); });
}, 1000);
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) { chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
if (msg.command === 'openNotificationBar') { if (msg.command === 'openNotificationBar') {
@ -161,4 +163,4 @@
break; break;
} }
} }
})(); });