-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackground.js
More file actions
executable file
·31 lines (29 loc) · 1.15 KB
/
Copy pathbackground.js
File metadata and controls
executable file
·31 lines (29 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// chrome.browserAction.onClicked.addListener(function(tab) {
// if(window.location.href != "https://www.paycomonline.net/v4/ee/ee-login.php") {
// chrome.tabs.update({url: "https://www.paycomonline.net/v4/ee/ee-login.php"});
// localStorage.setItem({"firstLogin": true});
// }
// });
chrome.browserAction.setIcon({path:"icons/favicon.ico"});
// var port = chrome.runtime.connect({name: "background"});
console.log('b');
// chrome.runtime.onMessage.addListener(
// function(request, sender, sendResponse) {
// console.log('test');
// console.log(sender.tab ?
// "from a content script:" + sender.tab.url :
// "from the extension");
// if (request.greeting == "hello")
// sendResponse({farewell: "goodbye"});
// });
// window.addEventListener("message", function(event) {
// // only accept messages from ourselves
// if(event.source != window) {
// return;
// }
// if(event.data.type && (event.data.type == "FROM_PAGE")) {
// var text = JSON.parse(event.data.text);
// console.log("content script received: " + text);
// port.postMessage(event.data.text);
// }
// }, false);