-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.js
29 lines (24 loc) · 948 Bytes
/
options.js
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
var template_a = document.getElementById("template_a");
var template_b = document.getElementById("template_b");
var template_c = document.getElementById("template_c");
var template_d = document.getElementById("template_d");
template_a.onclick = function() {
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
chrome.tabs.update(tabs[0].id, {url: "templates/a.html"});
});
};
template_b.onclick = function() {
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
chrome.tabs.update(tabs[0].id, {url: "templates/b.html"});
});
};
template_c.onclick = function() {
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
chrome.tabs.update(tabs[0].id, {url: "templates/c.html"});
});
};
template_d.onclick = function() {
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
chrome.tabs.update(tabs[0].id, {url: "templates/d.html"});
});
};