From d7012997b7efc6f2e80ab645edb67629692d6382 Mon Sep 17 00:00:00 2001 From: xu_yanfeng Date: Sat, 14 Dec 2024 10:12:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=A7=86=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hello-chrome/.vscode/settings.json | 9 +++++ hello-chrome/background.js | 1 + hello-chrome/content.js | 1 + hello-chrome/devtools.html | 10 +++++ hello-chrome/devtools.js | 1 + hello-chrome/icons/48.png | Bin 0 -> 1324 bytes hello-chrome/index.html | 19 ++++++++++ hello-chrome/index.js | 1 + hello-chrome/inject.js | 1 + hello-chrome/manifest.json | 58 +++++++++++++++++++++++++++++ hello-chrome/options.html | 10 +++++ hello-chrome/options.js | 1 + hello-chrome/popup.html | 10 +++++ hello-chrome/popup.js | 1 + hello-chrome/readme.md | 1 + 15 files changed, 124 insertions(+) create mode 100644 hello-chrome/.vscode/settings.json create mode 100644 hello-chrome/background.js create mode 100644 hello-chrome/content.js create mode 100644 hello-chrome/devtools.html create mode 100644 hello-chrome/devtools.js create mode 100644 hello-chrome/icons/48.png create mode 100644 hello-chrome/index.html create mode 100644 hello-chrome/index.js create mode 100644 hello-chrome/inject.js create mode 100644 hello-chrome/manifest.json create mode 100644 hello-chrome/options.html create mode 100644 hello-chrome/options.js create mode 100644 hello-chrome/popup.html create mode 100644 hello-chrome/popup.js create mode 100644 hello-chrome/readme.md 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 0000000000000000000000000000000000000000..991fd34ceef34eafcc83fb9381a7a7941880f618 GIT binary patch literal 1324 zcmV+{1=IS8P)Px(=1D|BRA@u(SzT-tRTTctlr^Af4TMA?rkI@pv@=_*m?*q}F;Ve{Xh1^57d0Ax zfBF**dC7wAdnw2Z%^e#r!HSC z1D=`w44|dD$?D^Iw-aQq*X2Av4NUkY6fLu7x*YxO1fp(Lb@8$#6>AAi8i>q*tYVWD zkj;SZn%2e3@=xvo-5J%zPgX!S1G+P+i)0MfdPh>Ma z+W43%;9Ko)F!P!S`7S3AH`f#6o9!Pl_?9w;h~BhwnS1_o1B`bYeDgpdnwS`C?7VoZ zo)|CLz5>MCqZm85Y6@XhF^-AY74VZC_cDdsB1s3FK+I4P;hFA905dC9VBAu3iLzOqk7~bPv(tR0(M=D&vt9BqBKBope z(>)E~!g3NuxH=VdzoU}0*IK`niabDsfrbPR3>6Y70)G*SJ>vx8A{DNPX?3`7rB^c3 zd&Aa;2wIM}>?x{)w`tw~Hc4Mrab zjbL03V5+KsTDWj1oY8u`dq9Ol*+6g7eVhoJRY>b#jskoXpd^6i(QwRoB9#{}s^n5P zV7mJVxLSoYvcZ01-~$HjOa+-8(bzp!XHyf-TE!5{tN$owV1FtQ3srI{8Ti(8orbET zAB-13xDLRgszks1vtjoFVb320>bd5a_(>+jo3~*B!thftS2lSONG%A2CyP}w&}+Jz z2zY9kj7~T~W>)!k-yC;VVM;igjPOjVf72mZ(pux5)xI6fDdzSks7%xQ({G1BJr7{kwfm&_jQ1OE4ZAUv#$;fra56|zMT_~L0 zkH|!+w3|``|85)UV<*Tg(-EhN^-T9|0IMr60flQyT?4h+#t?jGYmnWkDoO|ETka}m zjJTG_+ReHKYP5}iI)Rv`BT5(RneGn&E~`{Q(r!vVMpS(ZBiiibGLcqLSDqa2o9-3{ z)(#`!bKi20*2$_)GtpmBIpv2EwF zeevbVBYi8~!c2YyIp_qUDV700>F!~IREM#Ezximq*kIX3DeD~RTu~C*w i$$*UH{~Vw22L1+SrV~#S<-r*M0000 + + + + + + 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