This commit is contained in:
cilame 2022-03-14 23:29:20 +08:00
parent 84635dbfdb
commit a760a6546b
3 changed files with 45 additions and 1 deletions

View File

@ -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 动态调试",

View File

@ -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",

View File

@ -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')
});
})