diff --git a/background.js b/background.js index 0af00b7..9ba68ef 100644 --- a/background.js +++ b/background.js @@ -1,3 +1,14 @@ +// importScripts("./tools/babel_asttool.js", "./tools/cheerio.js", "./tools/replacer.js", "./tools/error_front.js") +// chrome.contextMenus.create({ +// id: "v_menu", +// title: "打开 v_jstools 动态调试", +// contexts: ['all'] +// }); +// chrome.contextMenus.onClicked.addListener(function(info, tab) { +// if (info.menuItemId == "v_menu") { +// AttachDebugger(); +// } +// }); // background.js chrome.contextMenus.create({ title: "打开 v_jstools 动态调试", diff --git a/manifest.json b/manifest.json index 141c840..8b41397 100644 --- a/manifest.json +++ b/manifest.json @@ -1,3 +1,36 @@ +// { +// "name": "v_jstools", +// "version": "0.0.0", +// "description": "v_jstools js hook工具", +// "permissions": ["storage", "unlimitedStorage", "activeTab", "tabs", "debugger", "storage", "contextMenus"], +// "content_security_policy": { +// // "extension_pages": "script-src 'self' 'unsafe-eval'; object-src 'self'" +// }, +// "action": { +// "default_popup": "popup.html" +// }, +// "background": { +// "service_worker": "background.js" +// }, +// "content_scripts": [ +// { +// "matches": [ "file:///*", "http://*/*", "https://*/*" ], +// "run_at": "document_start", +// "js": ["inject.js"], +// "all_frames": true +// } +// ], +// "options_page": "options.html", +// "options_ui": { +// // "chrome_style": false, +// "open_in_tab": true, +// "page": "options.html" +// }, +// "manifest_version": 3 +// } + + + { "name": "v_jstools", "version": "0.0.0", diff --git a/popup.js b/popup.js index 02cd178..40b6b7c 100644 --- a/popup.js +++ b/popup.js @@ -29,7 +29,7 @@ document.getElementById('showoptions').addEventListener('click', function(e){ } closePopup() chrome.tabs.create({ - url: chrome.extension.getURL('options.html') + url: chrome.runtime.getURL('options.html') }); })