commit 7f99a8790b1941947c66618af8f4d3cbd3864665 Author: eson Date: Fri Nov 13 18:25:28 2020 +0800 myblock 升级版 diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..8f82db5 --- /dev/null +++ b/build.sh @@ -0,0 +1 @@ +google-chrome --pack-extension=./myblock --pack-extension-key=./myblock.pem diff --git a/myblock.pem b/myblock.pem new file mode 100644 index 0000000..1583eff --- /dev/null +++ b/myblock.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDA6O6owySvzaJ8 +iv6aXRMcuk0lnNKquPNVHeraadSkBVhtaJqPAT7saOVnn9g4s/21OBV6wGmWdl5W +5+8h+F4qXrlGO8N1Tl8mmBDetqg6T6RrI9vB2Th9hjlp2PCGCEg/lX+tx25qBiDG +9uCB3pU4KMyfof1Z2jbo7aOfttgxZ1YdssenB//+31QjeZVw7wZACKaSzl6Z+WvY +pastMZ95YgTQvUq1AP93ny8AG+/bKUlE2vZpDygUJAXT8R7PGVD6T0/hUjTZk9HM +hrLShNjsBMxWWsrc7rdfW+R44pSuw5kHtIBrjRdrr8m1W0BCGTlGjq7Sk0OOZbsO +sh7x/1kvAgMBAAECggEAQYFXOTs6g/AB0uSn2+brDIA+nh0IdCxlhGuqSgxRxniC +NHSmtxSnN0PPUka291o3Noga0xnvQMZk9oG/c/uQjjaoFy9ICddY/BP69oVzzoko +vbDpeIO4aPdhG44s7nZ1ghHTz0C/P4VhL+65AaCBbxZ7lWE+VHqC1smLHDrMYsmr +PfOxk5LZwdNE/YmZuOj1zX3nQGX+wtK0EMslRbyYjg3EwXUa9d5WNnhyFxt5MD9m +w9G1rJh5uDUIS60xHUB7ET4BKJMLj+pfy8Ahf3SDFfIzinjuvKg+z1St0nTSNqI7 +QP5KFNvfxqcrtYwf0wU6MGmjJ98FFiDoPY2QQfIlwQKBgQDj3eWDHA02Kr9DAde9 +CuR0y4LixFhVDp7mYBnYxod3GMkPCGhSfuRcA/Tu7JgpACK/zsLi9gbzPkUAS2Y/ +ly8lBFyCYlY96mRF0FgzOUCwP5Xjc9roDgLi1RVM3+Tnv1FcIa0CkoXPuWtmoVYS +W0S/Y9JKOrV2CEJvirvM3hysHwKBgQDYuipzsV+i3qx4STKXa7F0F8jGp+jr4Pgc +GqnMo5ysFePFFd4QZ1UHJ8HNmRlXsD+hAawzljVL8yCns8dZOE99xvSjgFzA/p/N +QToOgCRy6YZ5kZQA1ldZOhoVS5xTJRf7eavLwnV/8VGWxFNXdlvzdZecC8YvwEbh ++gONR9Sw8QKBgQDiBwnSs9CnGl/+J6XIbzWOZRC/v+Oe+5HDEzCQRt241W0a7EwP +CK+cVpBvL2D/ypKtkHrghwr93Za0ZBZYna62GU1qSAEkCYzNc40JwpDYQzp7FEDg +ToWuW491YeG9v5kEuqLTGmSBWHugogiuzLm031+JIhM9sZO08Pi4jtoCIQKBgEKC +XyTB+idxTlxbmjr9wadu5R6RyNkaYQm+5Pz3+MyWqx+AZnWCQIXBnagKo8xVOjGe +4cmy/wgfxJWyhirLLRncRJcofU581W2X5sksagMZxzrnghP/sy6etgJzAbZCW+nA +nQga1RQ+altqRGlC2VUNcUliE5/z0cznfM+Oi6cBAoGBAK68wjkperl8+ARQrqII +Zg41PVrsFv6XmuLWv3bqnsx81BTbnHdqmPT4pScPLZvj+6c3iX8D8wzhzbgZtS0I +h+r1yMEdzyRZMGtvdi/f/+1TuhOTr/ZeoqYHWEduo8iRYLQBN9gGEkkKBQ4d14zi +8elaha7vrG/teCrFoeFcXIPr +-----END PRIVATE KEY----- diff --git a/myblock/.vscode/launch.json b/myblock/.vscode/launch.json new file mode 100644 index 0000000..da89c9c --- /dev/null +++ b/myblock/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "request": "launch", + "name": "Chrome Extension debugging", + "port": 9222, + "type": "chrome", + "url": "https://www.baidu.com", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/myblock/background/worker.js b/myblock/background/worker.js new file mode 100644 index 0000000..e69de29 diff --git a/myblock/content/inject.js b/myblock/content/inject.js new file mode 100644 index 0000000..e69de29 diff --git a/myblock/manifest.json b/myblock/manifest.json new file mode 100644 index 0000000..cff0ef4 --- /dev/null +++ b/myblock/manifest.json @@ -0,0 +1,37 @@ +{ + "background": { + "js": [ + "background/worker.js" + ] + }, + "browser_action": { + "default_icon": { + "16": "static/icons/16.png", + "32": "static/icons/32.png", + "48": "static/icons/48.png", + "64": "static/icons/64.png" + }, + "default_title": "MyBlock" + }, + "content_scripts": [ { + "all_frames": true, + "js": [ "content/inject.js" ], + "matches": [ "*://*/*" ], + "run_at": "document_start" + } ], + "description": "block all", + "homepage_url": "http://474420502.top", + "icons": { + "128": "static/icons/128.png", + "16": "static/icons/16.png", + "32": "static/icons/32.png", + "48": "static/icons/48.png", + "64": "static/icons/64.png" + }, + "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlurgt0Ykv740tjk1ebeiSX6UVVRRhxVvh+FvRMTe9PKzkAKUDEW2IjNUz1swxZA8ILnMvtyamAfiErTOxUFB8+zCADU/CK2YEhqUJo3tmHCg6EP2XJL220ZXjmIeft1AqJV1BmGRLhm8VnH8dJ2EThfcflx4JEdlh0/aLJr6UVjF2hPVX8JLAMTVjEfiC82KDNGgXDADqBm3E/6n+Dx+3KhgIYTXKIMk+qRVaOhjAJLh8a9OrDBwpylP5RDifTAyVVa9UOyoLNqynzC9oLabWUr1ovWAOiivhYknFCXnl5q971iNSFpmjc+ZW+aK+TRjMnJF84IeA170corVG3KgnwIDAQAB", + "manifest_version": 2, + "name": "MyBlock", + "permissions": [ "storage", "*://*/*", "activeTab", "webRequest", "webRequestBlocking","webNavigation", "tabs"], + "short_name": "myblock", + "version": "0.1.0" +} diff --git a/myblock/static/icons/128.png b/myblock/static/icons/128.png new file mode 100644 index 0000000..a6cb934 Binary files /dev/null and b/myblock/static/icons/128.png differ diff --git a/myblock/static/icons/16.png b/myblock/static/icons/16.png new file mode 100644 index 0000000..6e26126 Binary files /dev/null and b/myblock/static/icons/16.png differ diff --git a/myblock/static/icons/32.png b/myblock/static/icons/32.png new file mode 100644 index 0000000..f8bb2ef Binary files /dev/null and b/myblock/static/icons/32.png differ diff --git a/myblock/static/icons/48.png b/myblock/static/icons/48.png new file mode 100644 index 0000000..5469e4d Binary files /dev/null and b/myblock/static/icons/48.png differ diff --git a/myblock/static/icons/64.png b/myblock/static/icons/64.png new file mode 100644 index 0000000..2789c0a Binary files /dev/null and b/myblock/static/icons/64.png differ