-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackground.html
More file actions
26 lines (26 loc) · 800 Bytes
/
background.html
File metadata and controls
26 lines (26 loc) · 800 Bytes
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
<head>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
chrome.tabs.onUpdated.addListener(
function(tab, b) {
chrome.pageAction.show(tab);
}
);
chrome.pageAction.onClicked.addListener(
function(tab) {
chrome.tabs.sendRequest(tab.id, {"command": "parse"},
function(response) {
var url = chrome.extension.getURL('result.html');
chrome.tabs.create({url: url},
function(tab) {
chrome.tabs.sendRequest(tab.id, {"command": "show", "result": response.links});
}
);
}
);
}
);
</script>
</head>
<body>
</body>