diff options
31 files changed, 181 insertions, 32 deletions
@@ -1,4 +1,4 @@ -# My extension - Make The Web Great Again! # +# Hachette - Make The Web Great Again! # This extension's goal is to allow replacing javascript served by websites with scripts specified by user. Something like NoScript and Greasemonkey diff --git a/background/main.js b/background/main.js index da408f9..ffa814e 100644 --- a/background/main.js +++ b/background/main.js @@ -1,5 +1,5 @@ /** - * Myext main background script + * Hachette main background script * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. @@ -22,7 +22,7 @@ start_page_actions_server(); start_policy_injector(); start_page_info_server(); -async function init_myext(install_details) +async function init_ext(install_details) { console.log("details:", install_details); if (install_details.reason != "install") @@ -44,6 +44,6 @@ async function init_myext(install_details) } } -browser.runtime.onInstalled.addListener(init_myext); +browser.runtime.onInstalled.addListener(init_ext); -console.log("hello, myext"); +console.log("hello, hachette"); diff --git a/background/page_actions_server.js b/background/page_actions_server.js index 2d9c333..c6800a0 100644 --- a/background/page_actions_server.js +++ b/background/page_actions_server.js @@ -1,5 +1,5 @@ /** - * Myext serving of page actions to content scripts + * Hachette serving of page actions to content scripts * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/background/policy_injector.js b/background/policy_injector.js index ee97333..01da094 100644 --- a/background/policy_injector.js +++ b/background/policy_injector.js @@ -1,5 +1,5 @@ /** - * Myext injecting policy to page using webRequest + * Hachette injecting policy to page using webRequest * * Copyright (C) 2021 Wojtek Kosior * Copyright (C) 2021 jahoti diff --git a/background/settings_query.js b/background/settings_query.js index d509b09..d0d9511 100644 --- a/background/settings_query.js +++ b/background/settings_query.js @@ -1,5 +1,5 @@ /** - * Myext querying page settings with regard to wildcard records + * Hachette querying page settings with regard to wildcard records * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/background/storage.js b/background/storage.js index 48e4e52..7229a2d 100644 --- a/background/storage.js +++ b/background/storage.js @@ -1,5 +1,5 @@ /** - * Myext storage manager + * Hachette storage manager * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/background/storage_server.js b/background/storage_server.js index d39898d..554aff2 100644 --- a/background/storage_server.js +++ b/background/storage_server.js @@ -1,5 +1,5 @@ /** - * Myext storage through connection (server side) + * Hachette storage through connection (server side) * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. @@ -299,7 +299,9 @@ $(map_get EXPORTCODES $FILEKEY) echo "window.killtheweb={is_mozilla: true, browser: this.browser};" > $BUILDDIR/exports_init.js fi - cp -r icons/ copyright licenses/ $BUILDDIR + cp -r copyright licenses/ $BUILDDIR + mkdir $BUILDDIR/icons + cp icons/*.png $BUILDDIR/icons } main "$@" diff --git a/common/connection_types.js b/common/connection_types.js index ce63e55..41bde75 100644 --- a/common/connection_types.js +++ b/common/connection_types.js @@ -1,5 +1,5 @@ /** - * Myext background scripts message connection types "enum" + * Hachette background scripts message connection types "enum" * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/common/lock.js b/common/lock.js index 1130762..822ad1b 100644 --- a/common/lock.js +++ b/common/lock.js @@ -1,5 +1,5 @@ /** - * Myext lock (aka binary semaphore aka mutex) + * Hachette lock (aka binary semaphore aka mutex) * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/common/message_server.js b/common/message_server.js index a541a04..ea40487 100644 --- a/common/message_server.js +++ b/common/message_server.js @@ -1,5 +1,5 @@ /** - * Myext message server + * Hachette message server * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/common/misc.js b/common/misc.js index 8cb26ab..a59ec14 100644 --- a/common/misc.js +++ b/common/misc.js @@ -1,5 +1,5 @@ /** - * Myext miscellaneous operations refactored to a separate file + * Hachette miscellaneous operations refactored to a separate file * * Copyright (C) 2021 Wojtek Kosior * Copyright (C) 2021 jahoti diff --git a/common/once.js b/common/once.js index e3e6dbe..098b43f 100644 --- a/common/once.js +++ b/common/once.js @@ -1,5 +1,5 @@ /** - * Myext feature initialization promise + * Hachette feature initialization promise * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/common/patterns.js b/common/patterns.js index f7da0ff..be7c650 100644 --- a/common/patterns.js +++ b/common/patterns.js @@ -1,5 +1,5 @@ /** - * Hydrilla/Lernette operations on page url patterns + * Hachette operations on page url patterns * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/common/storage_client.js b/common/storage_client.js index 2bbddb6..4849a65 100644 --- a/common/storage_client.js +++ b/common/storage_client.js @@ -1,5 +1,5 @@ /** - * Myext storage through connection (client side) + * Hachette storage through connection (client side) * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/common/stored_types.js b/common/stored_types.js index ef1339f..a6f1f2f 100644 --- a/common/stored_types.js +++ b/common/stored_types.js @@ -1,5 +1,5 @@ /** - * Myext stored item types "enum" + * Hachette stored item types "enum" * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/content/main.js b/content/main.js index af8cd7c..8f8375e 100644 --- a/content/main.js +++ b/content/main.js @@ -1,5 +1,5 @@ /** - * Myext main content script run in all frames + * Hachette main content script run in all frames * * Copyright (C) 2021 Wojtek Kosior * Copyright (C) 2021 jahoti diff --git a/content/page_actions.js b/content/page_actions.js index 75cc4d9..aff56b8 100644 --- a/content/page_actions.js +++ b/content/page_actions.js @@ -1,5 +1,5 @@ /** - * Myext handling of page actions in content scripts + * Hachette handling of page actions in content scripts * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. @@ -1,22 +1,26 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: Myext +Upstream-Name: Hachette Source: https://git.koszko.org/browser-extension/ Files: * Copyright: 2021 Wojtek Kosior <koszko@koszko.org> License: GPL-3+-javascript or Alicense-1.0 -Files: build.sh +Files: re-generate_icons.sh build.sh Copyright: 2021 Wojtek Kosior <koszko@koszko.org> 2021 jahoti <jahoti@tilde.team> License: CC0 +Files: icons/* +Copyright: 2017 David Lyons <https://openclipart.org/artist/davidblyons> +License: CC0 or CC-BY-SA-4.0 + Files: background/policy_injector.js common/misc.js content/main.js Copyright: 2021 Wojtek Kosior <koszko@koszko.org> 2021 jahoti <jahoti@tilde.team> License: GPL-3+-javascript or Alicense-1.0 -Files: icons/myext.png README.txt TODOS.org copyright +Files: README.txt copyright Copyright: 2021 Wojtek Kosior <koszko@koszko.org> License: GPL-3+ or Alicense-1.0 or CC-BY-SA-4.0 diff --git a/html/display-panel.js b/html/display-panel.js index 9ae35fd..650c234 100644 --- a/html/display-panel.js +++ b/html/display-panel.js @@ -1,5 +1,5 @@ /** - * Myext display panel logic + * Hachette display panel logic * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/html/options.html b/html/options.html index 092327a..bfb9e52 100644 --- a/html/options.html +++ b/html/options.html @@ -7,7 +7,7 @@ <html> <head> <meta charset="utf-8"/> - <title>Myext options</title> + <title>Hachette options</title> <style> input[type="checkbox"], input[type="radio"], .hide, .popup.hide { display: none; diff --git a/html/options_main.js b/html/options_main.js index 409df80..e1e6cbe 100644 --- a/html/options_main.js +++ b/html/options_main.js @@ -1,5 +1,5 @@ /** - * Myext HTML options page main script + * Hachette HTML options page main script * * Copyright (C) 2021 Wojtek Kosior * Redistribution terms are gathered in the `copyright' file. diff --git a/icons/hachette.svg b/icons/hachette.svg new file mode 100644 index 0000000..6e8948d --- /dev/null +++ b/icons/hachette.svg @@ -0,0 +1,127 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + width="128" + height="128" + viewBox="0 -0.6 33.866668 33.866666" + version="1.1" + id="svg8"> + <title + id="title1418">Hatchet</title> + <defs + id="defs2"> + <filter + style="color-interpolation-filters:sRGB" + id="filter994" + x="-0.78125864" + width="2.5625174" + y="-0.25392297" + height="1.5078459"> + <feGaussianBlur + stdDeviation="1.7304741" + id="feGaussianBlur996" /> + </filter> + <filter + style="color-interpolation-filters:sRGB" + id="filter1401" + x="-0.43681362" + width="1.8736273" + y="-0.032828163" + height="1.0656563"> + <feGaussianBlur + stdDeviation="2.2606587" + id="feGaussianBlur1403" /> + </filter> + </defs> + <metadata + id="metadata5"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>Hatchet</dc:title> + <dc:creator> + <cc:Agent> + <dc:title>David Lyons</dc:title> + </cc:Agent> + </dc:creator> + <dc:publisher> + <cc:Agent> + <dc:title>dlyons</dc:title> + </cc:Agent> + </dc:publisher> + <cc:license + rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" /> + <dc:date>2017-05</dc:date> + <dc:subject> + <rdf:Bag> + <rdf:li>hatchet</rdf:li> + <rdf:li>ax</rdf:li> + <rdf:li>wood</rdf:li> + </rdf:Bag> + </dc:subject> + <dc:description>Hatchet</dc:description> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/by-sa/4.0/"> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Reproduction" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#Distribution" /> + <cc:requires + rdf:resource="http://creativecommons.org/ns#Notice" /> + <cc:requires + rdf:resource="http://creativecommons.org/ns#Attribution" /> + <cc:permits + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> + <cc:requires + rdf:resource="http://creativecommons.org/ns#ShareAlike" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + transform="matrix(0.18053177,-0.14666587,0.14666587,0.18053177,-0.67884005,5.998568)" + id="g4514"> + <path + style="fill:#d38d5f;stroke-width:0.23824416" + d="M 7.30405,153.7586 C 20.54927,112.215 15.59359,34.229537 16.31646,33.113187 c 0.87975,-1.35862 11.98736,-0.3859 11.70824,-0.21673 0.17326,45.22237 7.01132,84.510963 -0.71993,131.991763 l -9.29885,-5.88681 z" + id="rect7" /> + <path + style="stroke-width:0.27389684" + d="m 63.328435,18.175599 c 0,0 -18.017818,8.640905 -27.631388,12.644707 -3.823279,1.592294 -7.11998,3.047871 -9.996289,4.376476 -11.35319,0.247708 -19.4479991,0.01005 -19.8799245,1.450041 l 0.01602,16.049149 c 0.1225108,1.704999 8.9933655,2.136989 19.9713905,3.333131 6.538886,4.233937 13.307605,8.532834 17.153475,10.714075 9.058079,5.13742 18.504813,7.823295 18.504813,7.823295 0,0 5.056977,-21.237215 4.911847,-31.707625 C 66.23324,32.388436 63.328435,18.175599 63.328435,18.175599 Z" + id="rect9" /> + <path + id="path35" + d="m 63.328435,18.175599 c 0,0 2.905055,14.268926 3.050195,24.739336 0.14513,10.47041 -4.912098,31.651538 -4.912098,31.651538 -11.67798,-3.788669 -16.221256,-6.527691 -16.221256,-6.527691 0,0 7.434244,-7.591907 9.174294,-22.366997 1.1592,-16.80443 -4.045711,-21.40711 -4.045711,-21.40711 3.905919,-1.879065 11.01257,-5.216217 12.954576,-6.089076 z" + style="opacity:0.45500004;fill:#ffffff;stroke-width:0.26458335" /> + <path + style="opacity:0.45500004;fill:#ffffff;stroke-width:0.26458335" + d="m 63.208938,17.51176 c 0,0 3.024552,14.932765 3.169692,25.403175 0.14513,10.47041 -4.912098,31.621519 -4.912098,31.621519 -1.568463,-0.523507 -1.541936,-0.491688 -1.541936,-0.491688 0,0 5.456154,-26.034461 5.211644,-30.225191 -0.0315,-4.2355 -1.218109,-20.314453 -3.453104,-24.783592 0,0 0.723943,-0.407792 1.645299,-0.860384 z" + id="path1427" /> + <path + style="fill:#784421;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 7.30405,153.7586 10.40103,5.0627 c 0,0 9.14195,5.35641 9.55606,6.02467 0.41411,0.66827 -4.66818,-0.88342 -7.90926,-2.11367 -3.24108,-1.23026 -8.21159,-4.9245 -10.36004,-6.6929 -2.14844,-1.76841 -1.68779,-2.2808 -1.68779,-2.2808 z" + id="path1407" /> + <path + id="path999" + d="M 7.30405,153.7586 C 17.372688,112.40594 21.015256,78.343761 17.898744,32.568697 l 3.350934,-0.138515 c 0.131707,45.014525 3.851339,79.911868 -2.025736,127.174438 z" + style="opacity:0.3;fill:#2b1100;stroke-width:0.20724197" /> + <path + style="opacity:1;fill:#1a1a1a;stroke:none;stroke-width:0.1832249" + d="m 37.364038,35.560531 9.400174,-5.992052 c 4.831746,9.986754 3.508267,19.973509 -0.303231,29.960263 l -9.096943,-5.992051 z" + id="rect4493" /> + <rect + style="opacity:1;fill:#1a1a1a;stroke:none;stroke-width:0.37082145" + id="rect4504" + width="7.4658442" + height="15.338916" + x="23.754957" + y="38.224262" /> + </g> +</svg> diff --git a/icons/hachette128.png b/icons/hachette128.png Binary files differnew file mode 100644 index 0000000..18816e9 --- /dev/null +++ b/icons/hachette128.png diff --git a/icons/hachette16.png b/icons/hachette16.png Binary files differnew file mode 100644 index 0000000..182ede5 --- /dev/null +++ b/icons/hachette16.png diff --git a/icons/hachette32.png b/icons/hachette32.png Binary files differnew file mode 100644 index 0000000..ffaa84b --- /dev/null +++ b/icons/hachette32.png diff --git a/icons/hachette48.png b/icons/hachette48.png Binary files differnew file mode 100644 index 0000000..1ffcd38 --- /dev/null +++ b/icons/hachette48.png diff --git a/icons/hachette64.png b/icons/hachette64.png Binary files differnew file mode 100644 index 0000000..a02abb0 --- /dev/null +++ b/icons/hachette64.png diff --git a/icons/myext.png b/icons/myext.png Binary files differdeleted file mode 100644 index 1dd025b..0000000 --- a/icons/myext.png +++ /dev/null diff --git a/manifest.json b/manifest.json index 20568a0..328b27f 100644 --- a/manifest.json +++ b/manifest.json @@ -2,13 +2,17 @@ // Redistribution terms are gathered in the `copyright' file. { "manifest_version": 2, - "name": "My extension", - "short_name": "Myext", + "name": "Hachette", + "short_name": "Hachette", "version": "0.0.1",_CHROMIUM_KEY_ "author": "various", "description": "Kill the web&js",_GECKO_APPLICATIONS_ "icons":{ - "64": "icons/myext.png" + "128": "icons/hachette128.png", + "64": "icons/hachette64.png", + "48": "icons/hachette48.png", + "32": "icons/hachette32.png", + "16": "icons/hachette16.png" }, "permissions": [ "contextMenus", @@ -24,9 +28,13 @@ "browser_action": { "browser_style": true, "default_icon": { - "64": "icons/myext.png" + "128": "icons/hachette128.png", + "64": "icons/hachette64.png", + "48": "icons/hachette48.png", + "32": "icons/hachette32.png", + "16": "icons/hachette16.png" }, - "default_title": "Myext", + "default_title": "Hachette", "default_popup": "html/display-panel.html" }, "options_ui": { diff --git a/re-generate_icons.sh b/re-generate_icons.sh new file mode 100755 index 0000000..ba0c28a --- /dev/null +++ b/re-generate_icons.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# Copyright (C) 2021 Wojtek Kosior +# Redistribution terms are gathered in the `copyright' file. + +for SIZE in 128 64 48 32 16; do + inkscape -z -e icons/hachette$SIZE.png -w $SIZE -h $SIZE icons/hachette.svg +done |