diff --git a/hello-chrome/.vscode/settings.json b/hello-chrome/.vscode/settings.json new file mode 100644 index 0000000..eb7eead --- /dev/null +++ b/hello-chrome/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "files.autoSave": "onFocusChange", + "[html]": { + "editor.suggest.insertMode": "replace", + "editor.formatOnSave": true, + "editor.formatOnType": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" + } +} \ No newline at end of file diff --git a/hello-chrome/background.js b/hello-chrome/background.js new file mode 100644 index 0000000..542a8c8 --- /dev/null +++ b/hello-chrome/background.js @@ -0,0 +1 @@ +console.log("background.js") \ No newline at end of file diff --git a/hello-chrome/content.js b/hello-chrome/content.js new file mode 100644 index 0000000..884a655 --- /dev/null +++ b/hello-chrome/content.js @@ -0,0 +1 @@ +console.log("content.js") \ No newline at end of file diff --git a/hello-chrome/devtools.html b/hello-chrome/devtools.html new file mode 100644 index 0000000..488881e --- /dev/null +++ b/hello-chrome/devtools.html @@ -0,0 +1,10 @@ + + + + devtools + + + + devtools + + diff --git a/hello-chrome/devtools.js b/hello-chrome/devtools.js new file mode 100644 index 0000000..fe6f5e5 --- /dev/null +++ b/hello-chrome/devtools.js @@ -0,0 +1 @@ +console.log("devtools.js"); \ No newline at end of file diff --git a/hello-chrome/icons/48.png b/hello-chrome/icons/48.png new file mode 100644 index 0000000..991fd34 Binary files /dev/null and b/hello-chrome/icons/48.png differ diff --git a/hello-chrome/index.html b/hello-chrome/index.html new file mode 100644 index 0000000..80827e5 --- /dev/null +++ b/hello-chrome/index.html @@ -0,0 +1,19 @@ + + + + + + + index + + + + + + +
+ + diff --git a/hello-chrome/index.js b/hello-chrome/index.js new file mode 100644 index 0000000..2f36785 --- /dev/null +++ b/hello-chrome/index.js @@ -0,0 +1 @@ +console.log("index.js") \ No newline at end of file diff --git a/hello-chrome/inject.js b/hello-chrome/inject.js new file mode 100644 index 0000000..bb27c03 --- /dev/null +++ b/hello-chrome/inject.js @@ -0,0 +1 @@ +console.log("inject") \ No newline at end of file diff --git a/hello-chrome/manifest.json b/hello-chrome/manifest.json new file mode 100644 index 0000000..f0ea28e --- /dev/null +++ b/hello-chrome/manifest.json @@ -0,0 +1,58 @@ +{ + "manifest_version": 3, + "description": "hello world", + "icons": { + "48": "./icons/48.png" + }, + "devtools_page": "devtools.html", + "content_scripts": [ + { + "matches": [ + "" + ], + "js": [ + "content.js" + ], + "run_at": "document_end", + "all_frames": true + } + ], + "options_ui": { + "page": "options.html", + "browser_style": true + }, + "name": "helloworld", + "version": "2.1.0", + "host_permissions": [ + "wss://*/*", + "ws://*/*", + "activeTab", + "", + "*://*/*", + "tabs", + "http://*/*", + "https://*/*", + "audio", + "system.cpu", + "clipboardRead", + "clipboardWrite", + "system.memory", + "processes", + "tabs", + "storage", + "nativeMessaging", + "contextMenus", + "notifications" + ], + "action": { + "default_popup": "popup.html", + "default_icon": { + "48": "./icons/48.png" + }, + "default_title": "hello-world" + }, + "background": { + "service_worker": "background.js", + "type": "module" + } +} \ No newline at end of file diff --git a/hello-chrome/options.html b/hello-chrome/options.html new file mode 100644 index 0000000..4ff944f --- /dev/null +++ b/hello-chrome/options.html @@ -0,0 +1,10 @@ + + + + options + + + + options + + diff --git a/hello-chrome/options.js b/hello-chrome/options.js new file mode 100644 index 0000000..b09e83d --- /dev/null +++ b/hello-chrome/options.js @@ -0,0 +1 @@ +console.log('options.js') \ No newline at end of file diff --git a/hello-chrome/popup.html b/hello-chrome/popup.html new file mode 100644 index 0000000..2819f28 --- /dev/null +++ b/hello-chrome/popup.html @@ -0,0 +1,10 @@ + + + + popup + + + + popup + + diff --git a/hello-chrome/popup.js b/hello-chrome/popup.js new file mode 100644 index 0000000..617313d --- /dev/null +++ b/hello-chrome/popup.js @@ -0,0 +1 @@ +console.log("popup") \ No newline at end of file diff --git a/hello-chrome/readme.md b/hello-chrome/readme.md new file mode 100644 index 0000000..456cd1f --- /dev/null +++ b/hello-chrome/readme.md @@ -0,0 +1 @@ +使用原生js编写的Chrome插件,方便我理解一些逻辑 \ No newline at end of file