-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
25 lines (25 loc) · 703 Bytes
/
main.js
File metadata and controls
25 lines (25 loc) · 703 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
chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
chrome.tabs.executeScript(
tabs[0].id,
{
file: 'content_script/script.js'
}, () => {
chrome.contextMenus.removeAll(() => {
chrome.contextMenus.create({
"id": "gridify_1234",
"title": "Toggle Grid Visibility",
"type": "normal",
"contexts": ["all"]
}, () => {
chrome.contextMenus.create({
"id": "gridify_7890",
"title": "Toggle Pixel Distance Visibility",
"type": "normal",
"contexts": ["all"]
}, () => {
window.close();
});
});
});
});
});