Compare commits
28 Commits
|
@ -1,3 +1,5 @@
|
|||
node_modules
|
||||
src/content-script.js
|
||||
src/popup.js
|
||||
src/manifest.json
|
||||
dist
|
||||
|
|
24
README.md
|
@ -1,6 +1,6 @@
|
|||
# MetamorPOV
|
||||
|
||||
When enabled for a website, this extension will look for markers (such as Y/n, pov/s, and vrb/do/present/) used to replace specific pronouns. If found, it will replace those markers with your pronouns. You can also choose what point-of-view you want to read in: first, second, or third-person perspective.
|
||||
When enabled for a website, this extension will translate specific markers such as Y/n, pov/s, and vrb/present/do/ into your pronouns. You can also choose what point-of-view you want to read in: first, second, or third-person perspective.
|
||||
|
||||
- Your choice of name
|
||||
- Your choice of pronouns, including neopronouns
|
||||
|
@ -19,8 +19,11 @@ MetamorPOV includes Node packages for verb conjugation. You'll need [Node](https
|
|||
# Install project dependencies
|
||||
npm install
|
||||
|
||||
# Generate a .zip that can be loaded in a browser
|
||||
# Generate a .zip that can be loaded in Firefox
|
||||
npm run build
|
||||
|
||||
# Generate a .zip that can be loaded in Chromium-based browsers
|
||||
npm run build-chrome
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
@ -35,10 +38,17 @@ npm run test
|
|||
npx rollup -c
|
||||
```
|
||||
|
||||
To test for Chrome, you will need to have Chromium installed.
|
||||
|
||||
```sh
|
||||
# Open a browser instance, you will need to go to chrome://extensions and open the source folder manually
|
||||
npm run test-chrome
|
||||
```
|
||||
|
||||
## Copyright and License
|
||||
|
||||
- Portions of MetamorPOV are derived from [InteractiveFics](https://github.com/interactivefics/interactive-fics), licensed under [MIT](third-party-licenses/LICENSE-InteractiveFics), copyrighted 2015-2023 by Mariam Maarouf.
|
||||
- MetamorPOV supports verb conjugation with [RosaeNLG](https://rosaenlg.org/), licensed under [Apache-2.0](third-party-licenses/LICENSE-RosaeNLG), copyrighted 2019-2024 by Ludan Stoecklé, 2015 by Forbes Lindesay, and 2009-2014 by TJ Holowaychuk.
|
||||
- MetamorPOV is themed with [Primary](https://primary-theme.github.io/), licensed under [GPL-3.0](third-party-licenses/LICENSE-Primary), copyrighted 2021-2024 by Cecilia May.
|
||||
- Icons, excepting the butterfly, are redistributed from [Luicide](https://lucide.dev), licensed under [ISC](third-party-licenses/LICENSE-Luicide), copyrighted 2022-2025 by Lucide Contributors. Luicide contains portions of Feather, licensed under [MIT](third-party-licenses/LICENSE-Feather), copyrighted 2013-2022 by Cole Bemis.
|
||||
- All other portions of MetamorPOV are licensed under [GPL-3.0-or-later](LICENSE), copyrighted 2024-2025 by Jean Viscogliosi-Pate.
|
||||
- Portions of MetamorPOV are derived from [InteractiveFics](https://github.com/interactivefics/interactive-fics), licensed under [MIT](third-party-licenses/LICENSE-InteractiveFics), copyrighted 2015–2023 by Mariam Maarouf.
|
||||
- MetamorPOV is themed with [Primary](https://primary-theme.github.io/), licensed under [GPL-3.0](third-party-licenses/LICENSE-Primary), copyrighted 2021–2024 by Cecilia May.
|
||||
- Icons, excepting the butterfly, are redistributed from [Luicide](https://lucide.dev), licensed under [ISC](third-party-licenses/LICENSE-Luicide), copyrighted 2022–2025 by Lucide Contributors. Luicide contains portions of Feather, licensed under [MIT](third-party-licenses/LICENSE-Feather), copyrighted 2013–2022 by Cole Bemis.
|
||||
- Translation logic is provided by the [MetamorPOV library](https://git.viscogliosi-pate.com/metamorpov-library), licensed under [GPL-3.0-or-later](LICENSE) copyrighted 2025 by Jean Viscogliosi-Pate.
|
||||
- All other portions of MetamorPOV are licensed under [GPL-3.0-or-later](LICENSE), copyrighted 2024–2025 by Jean Viscogliosi-Pate.
|
||||
|
|
After Width: | Height: | Size: 208 KiB |
16
flake.lock
|
@ -2,14 +2,18 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 0,
|
||||
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
|
||||
"path": "/nix/store/yw6kg4rb9v8s3ypjbpspig5r81m4lr5s-source",
|
||||
"type": "path"
|
||||
"lastModified": 1755175540,
|
||||
"narHash": "sha256-V0j2S1r25QnbqBLzN2Rg/dKKil789bI3P3id7bDPVc4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a595dde4d0d31606e19dcec73db02279db59d201",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
inputs = {
|
||||
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
systems.url = "github:nix-systems/default";
|
||||
};
|
||||
|
||||
|
@ -13,7 +13,9 @@
|
|||
devShells = eachSystem (pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.nodejs_22
|
||||
pkgs.nodejs_24
|
||||
pkgs.firefox
|
||||
pkgs.chromium
|
||||
];
|
||||
};
|
||||
});
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
viewBox="0 0 512 512"
|
||||
width="32"
|
||||
height="32"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
sodipodi:docname="icon-dark-state-disabled.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
id="linearGradient11"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#df443a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop12" />
|
||||
<stop
|
||||
style="stop-color:#df4439;stop-opacity:1;"
|
||||
offset="0.45122612"
|
||||
id="stop13" />
|
||||
<stop
|
||||
style="stop-color:#ba342c;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop11" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient1"
|
||||
inkscape:swatch="gradient">
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11"
|
||||
id="linearGradient12"
|
||||
x1="256"
|
||||
y1="4.7133198"
|
||||
x2="256"
|
||||
y2="516.71332"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="14.230524"
|
||||
inkscape:cx="15.143504"
|
||||
inkscape:cy="10.435315"
|
||||
inkscape:window-width="1277"
|
||||
inkscape:window-height="864"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1" />
|
||||
<path
|
||||
id="path11"
|
||||
style="fill:#df443a;fill-opacity:1;stroke:url(#linearGradient12);stroke-width:15.5153;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
d="m 215.22028,38.871995 c -4.34372,0.303826 -8.65502,1.096343 -12.79663,2.448948 -5.93985,1.922995 -11.53239,4.920956 -16.41582,8.811486 -1.76365,1.417918 -3.46026,2.919246 -5.01704,4.56358 -14.636,-3.798687 -29.75685,-5.860967 -44.88746,-5.742441 -14.68272,0.379878 -29.51967,2.710272 -43.033824,8.664817 -10.977835,4.822375 -20.961579,12.233426 -28.009521,22.005037 -7.050461,9.664813 -10.992922,21.550288 -11.066377,33.516658 -0.169287,14.92345 5.535781,29.70673 15.271568,40.96315 4.373745,5.08863 9.549047,9.48723 15.279627,12.97831 0.542441,5.29028 1.667985,10.52221 3.376926,15.55886 -23.221327,10.97251 -43.33471,28.4246 -57.436944,49.89292 -12.70417,19.22237 -20.483342,41.67752 -22.2863846,64.65411 -1.5554936,19.84165 0.9781838,40.10268 8.1825416,58.70009 6.210988,16.16091 15.894545,30.87732 27.739004,43.46312 16.487951,17.57083 36.752681,31.11853 57.877414,42.47694 0.75168,0.43906 1.59701,0.77511 2.29306,1.27388 2.86679,4.6313 5.37096,9.48946 8.52384,13.94228 5.45956,7.92277 12.65714,14.75439 21.2551,19.16193 9.6394,5.0174 20.71523,6.96599 31.51599,6.28795 10.90179,-0.83701 21.2892,-4.91931 30.77723,-10.18133 12.4166,-6.93812 23.56256,-15.98376 33.58249,-26.03914 9.96279,-10.0289 18.79496,-21.17022 26.39113,-33.0889 10.87699,16.91934 24.18793,32.34401 39.74938,45.12077 10.00713,8.14757 20.97471,15.31593 33.06537,19.95959 7.93816,3.03334 16.45952,4.79051 24.9827,4.29735 10.21404,-0.42126 20.38768,-3.4272 28.9131,-9.13093 7.64187,-5.02101 13.76108,-12.06794 18.51752,-19.82113 2.18351,-3.46929 4.05021,-7.12613 6.22223,-10.6015 19.47332,-10.29917 38.22477,-22.35497 54.16907,-37.65945 12.90338,-12.36533 23.80556,-26.96729 31.10415,-43.32695 7.42472,-16.45569 11.06132,-34.51755 11.17414,-52.54357 0.26042,-23.29706 -5.49528,-46.63235 -16.59853,-67.11795 -11.57326,-21.48158 -28.90977,-39.80528 -49.69952,-52.57602 -4.32446,-2.66803 -8.80214,-5.08501 -13.38779,-7.27285 1.71297,-5.08008 2.82802,-10.35954 3.34284,-15.69522 13.91733,-8.58279 24.37005,-22.65677 28.36297,-38.53166 3.18363,-12.38154 2.28224,-25.81377 -2.79783,-37.567954 C 448.76107,79.66973 440.5163,70.303487 430.53327,63.714302 419.01053,56.051725 405.46698,51.925294 391.83504,50.11818 c -7.83832,-1.029924 -15.76743,-1.426209 -23.66581,-1.013174 -12.38775,0.548433 -24.70857,2.456562 -36.70542,5.583427 -1.54528,-1.866107 -3.52301,-3.287056 -5.31823,-4.89588 -2.23763,-1.449855 -4.41243,-3.00815 -6.6898,-4.389415 -2.08719,-1.000821 -4.08801,-2.204635 -6.31907,-2.867257 -2.34646,-0.768464 -4.61216,-1.818471 -7.05535,-2.249609 -1.7561,-0.398382 -3.50633,-0.834055 -5.3136,-0.907448 -2.46607,-0.17371 -4.92244,-0.640087 -7.40012,-0.463166 -1.80034,0.04161 -3.60407,0.04563 -5.3749,0.414583 -2.43413,0.432272 -4.93022,0.578062 -7.29011,1.353554 -1.73521,0.47884 -3.48277,0.922329 -5.10986,1.710803 -2.25278,1.010618 -4.63539,1.758472 -6.73261,3.083917 -1.56702,0.887219 -3.15474,1.742947 -4.54121,2.904546 -1.94148,1.531076 -4.07302,2.83879 -5.78679,4.637466 -0.8085,0.794753 -1.6512,1.558226 -2.43839,2.372458 -6.54832,-7.042367 -15.07389,-12.223504 -24.35195,-14.760401 -4.45885,-1.22347 -9.08035,-1.881211 -13.70735,-1.838619 -0.93882,-0.03679 -1.87608,0.05046 -2.81419,0.07803 z"
|
||||
inkscape:label="behind" />
|
||||
<path
|
||||
d="m 217.5,62.992572 a 21.875,21.875 0 0 0 -21.875,24.5 c -20.125,-9.625 -42.875,-14 -62.125,-14 -77,1.75 -59.5,66.499998 -21,67.374998 -4.375,20.125 -1.75,37.625 23.625,56.875 -57.75,4.375 -104.125,52.5 -104.125,111.125 0,55.125 37.625,87.5 84.875,112 15.75,8.75 14,35.875 42,35.875 27.125,0 98,-59.5 97.125,-148.75 0,89.25 70.875,148.75 98,148.75 27.125,0 25.375,-27.125 41.125,-35.875 47.25,-24.5 84.875,-56.875 84.875,-112 0,-58.625 -45.5,-106.75 -103.25,-111.125 24.5,-19.25 28,-36.75 22.75,-56.875 38.5,-0.875 56,-65.624998 -20.125,-67.374998 -20.125,0 -42,4.375 -63,14 l 0.875,-2.625 a 21.875,21.875 0 1 0 -28,20.999998 c -17.5,14.875 -30.625,36.75 -33.25,64.75 -1.75,-28 -14.875,-49.875 -33.25,-64.75 A 21.875,21.875 0 0 0 217.5,62.992572 Z m -77,174.999998 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m 231,0 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m -236.25,44.625 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z m 241.5,0 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z"
|
||||
style="display:inline;fill:#ebd9c7;stroke:none;stroke-width:16;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;fill-opacity:1"
|
||||
id="path1" />
|
||||
</svg>
|
After Width: | Height: | Size: 6.6 KiB |
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
viewBox="0 0 512 512"
|
||||
width="32"
|
||||
height="32"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
sodipodi:docname="icon-dark-state-enabled.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
id="linearGradient11"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#108453;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop12" />
|
||||
<stop
|
||||
style="stop-color:#108453;stop-opacity:1;"
|
||||
offset="0.45122612"
|
||||
id="stop13" />
|
||||
<stop
|
||||
style="stop-color:#105136;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop11" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient1"
|
||||
inkscape:swatch="gradient">
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11"
|
||||
id="linearGradient12"
|
||||
x1="256"
|
||||
y1="4.7133198"
|
||||
x2="256"
|
||||
y2="516.71332"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="14.230524"
|
||||
inkscape:cx="15.143504"
|
||||
inkscape:cy="10.435315"
|
||||
inkscape:window-width="1277"
|
||||
inkscape:window-height="864"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1" />
|
||||
<path
|
||||
id="path11"
|
||||
style="fill:#108453;fill-opacity:1;stroke:url(#linearGradient12);stroke-width:15.5153;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
d="m 215.22028,38.871995 c -4.34372,0.303826 -8.65502,1.096343 -12.79663,2.448948 -5.93985,1.922995 -11.53239,4.920956 -16.41582,8.811486 -1.76365,1.417918 -3.46026,2.919246 -5.01704,4.56358 -14.636,-3.798687 -29.75685,-5.860967 -44.88746,-5.742441 -14.68272,0.379878 -29.51967,2.710272 -43.033824,8.664817 -10.977835,4.822375 -20.961579,12.233426 -28.009521,22.005037 -7.050461,9.664813 -10.992922,21.550288 -11.066377,33.516658 -0.169287,14.92345 5.535781,29.70673 15.271568,40.96315 4.373745,5.08863 9.549047,9.48723 15.279627,12.97831 0.542441,5.29028 1.667985,10.52221 3.376926,15.55886 -23.221327,10.97251 -43.33471,28.4246 -57.436944,49.89292 -12.70417,19.22237 -20.483342,41.67752 -22.2863846,64.65411 -1.5554936,19.84165 0.9781838,40.10268 8.1825416,58.70009 6.210988,16.16091 15.894545,30.87732 27.739004,43.46312 16.487951,17.57083 36.752681,31.11853 57.877414,42.47694 0.75168,0.43906 1.59701,0.77511 2.29306,1.27388 2.86679,4.6313 5.37096,9.48946 8.52384,13.94228 5.45956,7.92277 12.65714,14.75439 21.2551,19.16193 9.6394,5.0174 20.71523,6.96599 31.51599,6.28795 10.90179,-0.83701 21.2892,-4.91931 30.77723,-10.18133 12.4166,-6.93812 23.56256,-15.98376 33.58249,-26.03914 9.96279,-10.0289 18.79496,-21.17022 26.39113,-33.0889 10.87699,16.91934 24.18793,32.34401 39.74938,45.12077 10.00713,8.14757 20.97471,15.31593 33.06537,19.95959 7.93816,3.03334 16.45952,4.79051 24.9827,4.29735 10.21404,-0.42126 20.38768,-3.4272 28.9131,-9.13093 7.64187,-5.02101 13.76108,-12.06794 18.51752,-19.82113 2.18351,-3.46929 4.05021,-7.12613 6.22223,-10.6015 19.47332,-10.29917 38.22477,-22.35497 54.16907,-37.65945 12.90338,-12.36533 23.80556,-26.96729 31.10415,-43.32695 7.42472,-16.45569 11.06132,-34.51755 11.17414,-52.54357 0.26042,-23.29706 -5.49528,-46.63235 -16.59853,-67.11795 -11.57326,-21.48158 -28.90977,-39.80528 -49.69952,-52.57602 -4.32446,-2.66803 -8.80214,-5.08501 -13.38779,-7.27285 1.71297,-5.08008 2.82802,-10.35954 3.34284,-15.69522 13.91733,-8.58279 24.37005,-22.65677 28.36297,-38.53166 3.18363,-12.38154 2.28224,-25.81377 -2.79783,-37.567954 C 448.76107,79.66973 440.5163,70.303487 430.53327,63.714302 419.01053,56.051725 405.46698,51.925294 391.83504,50.11818 c -7.83832,-1.029924 -15.76743,-1.426209 -23.66581,-1.013174 -12.38775,0.548433 -24.70857,2.456562 -36.70542,5.583427 -1.54528,-1.866107 -3.52301,-3.287056 -5.31823,-4.89588 -2.23763,-1.449855 -4.41243,-3.00815 -6.6898,-4.389415 -2.08719,-1.000821 -4.08801,-2.204635 -6.31907,-2.867257 -2.34646,-0.768464 -4.61216,-1.818471 -7.05535,-2.249609 -1.7561,-0.398382 -3.50633,-0.834055 -5.3136,-0.907448 -2.46607,-0.17371 -4.92244,-0.640087 -7.40012,-0.463166 -1.80034,0.04161 -3.60407,0.04563 -5.3749,0.414583 -2.43413,0.432272 -4.93022,0.578062 -7.29011,1.353554 -1.73521,0.47884 -3.48277,0.922329 -5.10986,1.710803 -2.25278,1.010618 -4.63539,1.758472 -6.73261,3.083917 -1.56702,0.887219 -3.15474,1.742947 -4.54121,2.904546 -1.94148,1.531076 -4.07302,2.83879 -5.78679,4.637466 -0.8085,0.794753 -1.6512,1.558226 -2.43839,2.372458 -6.54832,-7.042367 -15.07389,-12.223504 -24.35195,-14.760401 -4.45885,-1.22347 -9.08035,-1.881211 -13.70735,-1.838619 -0.93882,-0.03679 -1.87608,0.05046 -2.81419,0.07803 z"
|
||||
inkscape:label="behind" />
|
||||
<path
|
||||
d="m 217.5,62.992572 a 21.875,21.875 0 0 0 -21.875,24.5 c -20.125,-9.625 -42.875,-14 -62.125,-14 -77,1.75 -59.5,66.499998 -21,67.374998 -4.375,20.125 -1.75,37.625 23.625,56.875 -57.75,4.375 -104.125,52.5 -104.125,111.125 0,55.125 37.625,87.5 84.875,112 15.75,8.75 14,35.875 42,35.875 27.125,0 98,-59.5 97.125,-148.75 0,89.25 70.875,148.75 98,148.75 27.125,0 25.375,-27.125 41.125,-35.875 47.25,-24.5 84.875,-56.875 84.875,-112 0,-58.625 -45.5,-106.75 -103.25,-111.125 24.5,-19.25 28,-36.75 22.75,-56.875 38.5,-0.875 56,-65.624998 -20.125,-67.374998 -20.125,0 -42,4.375 -63,14 l 0.875,-2.625 a 21.875,21.875 0 1 0 -28,20.999998 c -17.5,14.875 -30.625,36.75 -33.25,64.75 -1.75,-28 -14.875,-49.875 -33.25,-64.75 A 21.875,21.875 0 0 0 217.5,62.992572 Z m -77,174.999998 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m 231,0 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m -236.25,44.625 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z m 241.5,0 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z"
|
||||
style="display:inline;fill:#ebd9c7;stroke:none;stroke-width:16;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;fill-opacity:1"
|
||||
id="path1" />
|
||||
</svg>
|
After Width: | Height: | Size: 6.6 KiB |
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
viewBox="0 0 512 512"
|
||||
width="32"
|
||||
height="32"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
sodipodi:docname="icon-dark-state-invalid.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
id="linearGradient11"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#51402f;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop12" />
|
||||
<stop
|
||||
style="stop-color:#51402f;stop-opacity:1;"
|
||||
offset="0.45122612"
|
||||
id="stop13" />
|
||||
<stop
|
||||
style="stop-color:#2d2620;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop11" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient1"
|
||||
inkscape:swatch="gradient">
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11"
|
||||
id="linearGradient12"
|
||||
x1="256"
|
||||
y1="4.7133198"
|
||||
x2="256"
|
||||
y2="516.71332"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="14.230524"
|
||||
inkscape:cx="15.108368"
|
||||
inkscape:cy="10.435315"
|
||||
inkscape:window-width="1277"
|
||||
inkscape:window-height="876"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1" />
|
||||
<path
|
||||
id="path11"
|
||||
style="fill:#51402f;fill-opacity:1;stroke:url(#linearGradient12);stroke-width:15.5153;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
d="m 215.22028,38.871995 c -4.34372,0.303826 -8.65502,1.096343 -12.79663,2.448948 -5.93985,1.922995 -11.53239,4.920956 -16.41582,8.811486 -1.76365,1.417918 -3.46026,2.919246 -5.01704,4.56358 -14.636,-3.798687 -29.75685,-5.860967 -44.88746,-5.742441 -14.68272,0.379878 -29.51967,2.710272 -43.033824,8.664817 -10.977835,4.822375 -20.961579,12.233426 -28.009521,22.005037 -7.050461,9.664813 -10.992922,21.550288 -11.066377,33.516658 -0.169287,14.92345 5.535781,29.70673 15.271568,40.96315 4.373745,5.08863 9.549047,9.48723 15.279627,12.97831 0.542441,5.29028 1.667985,10.52221 3.376926,15.55886 -23.221327,10.97251 -43.33471,28.4246 -57.436944,49.89292 -12.70417,19.22237 -20.483342,41.67752 -22.2863846,64.65411 -1.5554936,19.84165 0.9781838,40.10268 8.1825416,58.70009 6.210988,16.16091 15.894545,30.87732 27.739004,43.46312 16.487951,17.57083 36.752681,31.11853 57.877414,42.47694 0.75168,0.43906 1.59701,0.77511 2.29306,1.27388 2.86679,4.6313 5.37096,9.48946 8.52384,13.94228 5.45956,7.92277 12.65714,14.75439 21.2551,19.16193 9.6394,5.0174 20.71523,6.96599 31.51599,6.28795 10.90179,-0.83701 21.2892,-4.91931 30.77723,-10.18133 12.4166,-6.93812 23.56256,-15.98376 33.58249,-26.03914 9.96279,-10.0289 18.79496,-21.17022 26.39113,-33.0889 10.87699,16.91934 24.18793,32.34401 39.74938,45.12077 10.00713,8.14757 20.97471,15.31593 33.06537,19.95959 7.93816,3.03334 16.45952,4.79051 24.9827,4.29735 10.21404,-0.42126 20.38768,-3.4272 28.9131,-9.13093 7.64187,-5.02101 13.76108,-12.06794 18.51752,-19.82113 2.18351,-3.46929 4.05021,-7.12613 6.22223,-10.6015 19.47332,-10.29917 38.22477,-22.35497 54.16907,-37.65945 12.90338,-12.36533 23.80556,-26.96729 31.10415,-43.32695 7.42472,-16.45569 11.06132,-34.51755 11.17414,-52.54357 0.26042,-23.29706 -5.49528,-46.63235 -16.59853,-67.11795 -11.57326,-21.48158 -28.90977,-39.80528 -49.69952,-52.57602 -4.32446,-2.66803 -8.80214,-5.08501 -13.38779,-7.27285 1.71297,-5.08008 2.82802,-10.35954 3.34284,-15.69522 13.91733,-8.58279 24.37005,-22.65677 28.36297,-38.53166 3.18363,-12.38154 2.28224,-25.81377 -2.79783,-37.567954 C 448.76107,79.66973 440.5163,70.303487 430.53327,63.714302 419.01053,56.051725 405.46698,51.925294 391.83504,50.11818 c -7.83832,-1.029924 -15.76743,-1.426209 -23.66581,-1.013174 -12.38775,0.548433 -24.70857,2.456562 -36.70542,5.583427 -1.54528,-1.866107 -3.52301,-3.287056 -5.31823,-4.89588 -2.23763,-1.449855 -4.41243,-3.00815 -6.6898,-4.389415 -2.08719,-1.000821 -4.08801,-2.204635 -6.31907,-2.867257 -2.34646,-0.768464 -4.61216,-1.818471 -7.05535,-2.249609 -1.7561,-0.398382 -3.50633,-0.834055 -5.3136,-0.907448 -2.46607,-0.17371 -4.92244,-0.640087 -7.40012,-0.463166 -1.80034,0.04161 -3.60407,0.04563 -5.3749,0.414583 -2.43413,0.432272 -4.93022,0.578062 -7.29011,1.353554 -1.73521,0.47884 -3.48277,0.922329 -5.10986,1.710803 -2.25278,1.010618 -4.63539,1.758472 -6.73261,3.083917 -1.56702,0.887219 -3.15474,1.742947 -4.54121,2.904546 -1.94148,1.531076 -4.07302,2.83879 -5.78679,4.637466 -0.8085,0.794753 -1.6512,1.558226 -2.43839,2.372458 -6.54832,-7.042367 -15.07389,-12.223504 -24.35195,-14.760401 -4.45885,-1.22347 -9.08035,-1.881211 -13.70735,-1.838619 -0.93882,-0.03679 -1.87608,0.05046 -2.81419,0.07803 z"
|
||||
inkscape:label="behind" />
|
||||
<path
|
||||
d="m 217.5,62.992572 a 21.875,21.875 0 0 0 -21.875,24.5 c -20.125,-9.625 -42.875,-14 -62.125,-14 -77,1.75 -59.5,66.499998 -21,67.374998 -4.375,20.125 -1.75,37.625 23.625,56.875 -57.75,4.375 -104.125,52.5 -104.125,111.125 0,55.125 37.625,87.5 84.875,112 15.75,8.75 14,35.875 42,35.875 27.125,0 98,-59.5 97.125,-148.75 0,89.25 70.875,148.75 98,148.75 27.125,0 25.375,-27.125 41.125,-35.875 47.25,-24.5 84.875,-56.875 84.875,-112 0,-58.625 -45.5,-106.75 -103.25,-111.125 24.5,-19.25 28,-36.75 22.75,-56.875 38.5,-0.875 56,-65.624998 -20.125,-67.374998 -20.125,0 -42,4.375 -63,14 l 0.875,-2.625 a 21.875,21.875 0 1 0 -28,20.999998 c -17.5,14.875 -30.625,36.75 -33.25,64.75 -1.75,-28 -14.875,-49.875 -33.25,-64.75 A 21.875,21.875 0 0 0 217.5,62.992572 Z m -77,174.999998 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m 231,0 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m -236.25,44.625 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z m 241.5,0 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z"
|
||||
style="display:inline;fill:#ebd9c7;stroke:none;stroke-width:16;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;fill-opacity:1"
|
||||
id="path1" />
|
||||
</svg>
|
After Width: | Height: | Size: 6.6 KiB |
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
viewBox="0 0 512 512"
|
||||
width="32"
|
||||
height="32"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
sodipodi:docname="icon-light-state-disabled.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
id="linearGradient11"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#df4439;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop12" />
|
||||
<stop
|
||||
style="stop-color:#df4439;stop-opacity:1;"
|
||||
offset="0.45122612"
|
||||
id="stop13" />
|
||||
<stop
|
||||
style="stop-color:#ba352c;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop11" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient1"
|
||||
inkscape:swatch="gradient">
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11"
|
||||
id="linearGradient12"
|
||||
x1="256"
|
||||
y1="4.7133198"
|
||||
x2="256"
|
||||
y2="516.71332"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="14.230524"
|
||||
inkscape:cx="15.143504"
|
||||
inkscape:cy="10.435315"
|
||||
inkscape:window-width="1277"
|
||||
inkscape:window-height="864"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1" />
|
||||
<path
|
||||
id="path11"
|
||||
style="fill:#df4439;fill-opacity:1;stroke:url(#linearGradient12);stroke-width:15.5153;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
d="m 215.22028,38.871995 c -4.34372,0.303826 -8.65502,1.096343 -12.79663,2.448948 -5.93985,1.922995 -11.53239,4.920956 -16.41582,8.811486 -1.76365,1.417918 -3.46026,2.919246 -5.01704,4.56358 -14.636,-3.798687 -29.75685,-5.860967 -44.88746,-5.742441 -14.68272,0.379878 -29.51967,2.710272 -43.033824,8.664817 -10.977835,4.822375 -20.961579,12.233426 -28.009521,22.005037 -7.050461,9.664813 -10.992922,21.550288 -11.066377,33.516658 -0.169287,14.92345 5.535781,29.70673 15.271568,40.96315 4.373745,5.08863 9.549047,9.48723 15.279627,12.97831 0.542441,5.29028 1.667985,10.52221 3.376926,15.55886 -23.221327,10.97251 -43.33471,28.4246 -57.436944,49.89292 -12.70417,19.22237 -20.483342,41.67752 -22.2863846,64.65411 -1.5554936,19.84165 0.9781838,40.10268 8.1825416,58.70009 6.210988,16.16091 15.894545,30.87732 27.739004,43.46312 16.487951,17.57083 36.752681,31.11853 57.877414,42.47694 0.75168,0.43906 1.59701,0.77511 2.29306,1.27388 2.86679,4.6313 5.37096,9.48946 8.52384,13.94228 5.45956,7.92277 12.65714,14.75439 21.2551,19.16193 9.6394,5.0174 20.71523,6.96599 31.51599,6.28795 10.90179,-0.83701 21.2892,-4.91931 30.77723,-10.18133 12.4166,-6.93812 23.56256,-15.98376 33.58249,-26.03914 9.96279,-10.0289 18.79496,-21.17022 26.39113,-33.0889 10.87699,16.91934 24.18793,32.34401 39.74938,45.12077 10.00713,8.14757 20.97471,15.31593 33.06537,19.95959 7.93816,3.03334 16.45952,4.79051 24.9827,4.29735 10.21404,-0.42126 20.38768,-3.4272 28.9131,-9.13093 7.64187,-5.02101 13.76108,-12.06794 18.51752,-19.82113 2.18351,-3.46929 4.05021,-7.12613 6.22223,-10.6015 19.47332,-10.29917 38.22477,-22.35497 54.16907,-37.65945 12.90338,-12.36533 23.80556,-26.96729 31.10415,-43.32695 7.42472,-16.45569 11.06132,-34.51755 11.17414,-52.54357 0.26042,-23.29706 -5.49528,-46.63235 -16.59853,-67.11795 -11.57326,-21.48158 -28.90977,-39.80528 -49.69952,-52.57602 -4.32446,-2.66803 -8.80214,-5.08501 -13.38779,-7.27285 1.71297,-5.08008 2.82802,-10.35954 3.34284,-15.69522 13.91733,-8.58279 24.37005,-22.65677 28.36297,-38.53166 3.18363,-12.38154 2.28224,-25.81377 -2.79783,-37.567954 C 448.76107,79.66973 440.5163,70.303487 430.53327,63.714302 419.01053,56.051725 405.46698,51.925294 391.83504,50.11818 c -7.83832,-1.029924 -15.76743,-1.426209 -23.66581,-1.013174 -12.38775,0.548433 -24.70857,2.456562 -36.70542,5.583427 -1.54528,-1.866107 -3.52301,-3.287056 -5.31823,-4.89588 -2.23763,-1.449855 -4.41243,-3.00815 -6.6898,-4.389415 -2.08719,-1.000821 -4.08801,-2.204635 -6.31907,-2.867257 -2.34646,-0.768464 -4.61216,-1.818471 -7.05535,-2.249609 -1.7561,-0.398382 -3.50633,-0.834055 -5.3136,-0.907448 -2.46607,-0.17371 -4.92244,-0.640087 -7.40012,-0.463166 -1.80034,0.04161 -3.60407,0.04563 -5.3749,0.414583 -2.43413,0.432272 -4.93022,0.578062 -7.29011,1.353554 -1.73521,0.47884 -3.48277,0.922329 -5.10986,1.710803 -2.25278,1.010618 -4.63539,1.758472 -6.73261,3.083917 -1.56702,0.887219 -3.15474,1.742947 -4.54121,2.904546 -1.94148,1.531076 -4.07302,2.83879 -5.78679,4.637466 -0.8085,0.794753 -1.6512,1.558226 -2.43839,2.372458 -6.54832,-7.042367 -15.07389,-12.223504 -24.35195,-14.760401 -4.45885,-1.22347 -9.08035,-1.881211 -13.70735,-1.838619 -0.93882,-0.03679 -1.87608,0.05046 -2.81419,0.07803 z"
|
||||
inkscape:label="behind" />
|
||||
<path
|
||||
d="m 217.5,62.992572 a 21.875,21.875 0 0 0 -21.875,24.5 c -20.125,-9.625 -42.875,-14 -62.125,-14 -77,1.75 -59.5,66.499998 -21,67.374998 -4.375,20.125 -1.75,37.625 23.625,56.875 -57.75,4.375 -104.125,52.5 -104.125,111.125 0,55.125 37.625,87.5 84.875,112 15.75,8.75 14,35.875 42,35.875 27.125,0 98,-59.5 97.125,-148.75 0,89.25 70.875,148.75 98,148.75 27.125,0 25.375,-27.125 41.125,-35.875 47.25,-24.5 84.875,-56.875 84.875,-112 0,-58.625 -45.5,-106.75 -103.25,-111.125 24.5,-19.25 28,-36.75 22.75,-56.875 38.5,-0.875 56,-65.624998 -20.125,-67.374998 -20.125,0 -42,4.375 -63,14 l 0.875,-2.625 a 21.875,21.875 0 1 0 -28,20.999998 c -17.5,14.875 -30.625,36.75 -33.25,64.75 -1.75,-28 -14.875,-49.875 -33.25,-64.75 A 21.875,21.875 0 0 0 217.5,62.992572 Z m -77,174.999998 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m 231,0 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m -236.25,44.625 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z m 241.5,0 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z"
|
||||
style="display:inline;fill:#fcfaf8;stroke:none;stroke-width:16;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;fill-opacity:1"
|
||||
id="path1" />
|
||||
</svg>
|
After Width: | Height: | Size: 6.6 KiB |
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
viewBox="0 0 512 512"
|
||||
width="32"
|
||||
height="32"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
sodipodi:docname="icon-light-state-enabled.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
id="linearGradient11"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#3eb275;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop12" />
|
||||
<stop
|
||||
style="stop-color:#3eb275;stop-opacity:1;"
|
||||
offset="0.45122612"
|
||||
id="stop13" />
|
||||
<stop
|
||||
style="stop-color:#3a835d;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop11" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient1"
|
||||
inkscape:swatch="gradient">
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11"
|
||||
id="linearGradient12"
|
||||
x1="256"
|
||||
y1="4.7133198"
|
||||
x2="256"
|
||||
y2="516.71332"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="14.230524"
|
||||
inkscape:cx="15.143504"
|
||||
inkscape:cy="10.435315"
|
||||
inkscape:window-width="1277"
|
||||
inkscape:window-height="864"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1" />
|
||||
<path
|
||||
id="path11"
|
||||
style="fill:#3eb275;fill-opacity:1;stroke:url(#linearGradient12);stroke-width:15.5153;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
d="m 215.22028,38.871995 c -4.34372,0.303826 -8.65502,1.096343 -12.79663,2.448948 -5.93985,1.922995 -11.53239,4.920956 -16.41582,8.811486 -1.76365,1.417918 -3.46026,2.919246 -5.01704,4.56358 -14.636,-3.798687 -29.75685,-5.860967 -44.88746,-5.742441 -14.68272,0.379878 -29.51967,2.710272 -43.033824,8.664817 -10.977835,4.822375 -20.961579,12.233426 -28.009521,22.005037 -7.050461,9.664813 -10.992922,21.550288 -11.066377,33.516658 -0.169287,14.92345 5.535781,29.70673 15.271568,40.96315 4.373745,5.08863 9.549047,9.48723 15.279627,12.97831 0.542441,5.29028 1.667985,10.52221 3.376926,15.55886 -23.221327,10.97251 -43.33471,28.4246 -57.436944,49.89292 -12.70417,19.22237 -20.483342,41.67752 -22.2863846,64.65411 -1.5554936,19.84165 0.9781838,40.10268 8.1825416,58.70009 6.210988,16.16091 15.894545,30.87732 27.739004,43.46312 16.487951,17.57083 36.752681,31.11853 57.877414,42.47694 0.75168,0.43906 1.59701,0.77511 2.29306,1.27388 2.86679,4.6313 5.37096,9.48946 8.52384,13.94228 5.45956,7.92277 12.65714,14.75439 21.2551,19.16193 9.6394,5.0174 20.71523,6.96599 31.51599,6.28795 10.90179,-0.83701 21.2892,-4.91931 30.77723,-10.18133 12.4166,-6.93812 23.56256,-15.98376 33.58249,-26.03914 9.96279,-10.0289 18.79496,-21.17022 26.39113,-33.0889 10.87699,16.91934 24.18793,32.34401 39.74938,45.12077 10.00713,8.14757 20.97471,15.31593 33.06537,19.95959 7.93816,3.03334 16.45952,4.79051 24.9827,4.29735 10.21404,-0.42126 20.38768,-3.4272 28.9131,-9.13093 7.64187,-5.02101 13.76108,-12.06794 18.51752,-19.82113 2.18351,-3.46929 4.05021,-7.12613 6.22223,-10.6015 19.47332,-10.29917 38.22477,-22.35497 54.16907,-37.65945 12.90338,-12.36533 23.80556,-26.96729 31.10415,-43.32695 7.42472,-16.45569 11.06132,-34.51755 11.17414,-52.54357 0.26042,-23.29706 -5.49528,-46.63235 -16.59853,-67.11795 -11.57326,-21.48158 -28.90977,-39.80528 -49.69952,-52.57602 -4.32446,-2.66803 -8.80214,-5.08501 -13.38779,-7.27285 1.71297,-5.08008 2.82802,-10.35954 3.34284,-15.69522 13.91733,-8.58279 24.37005,-22.65677 28.36297,-38.53166 3.18363,-12.38154 2.28224,-25.81377 -2.79783,-37.567954 C 448.76107,79.66973 440.5163,70.303487 430.53327,63.714302 419.01053,56.051725 405.46698,51.925294 391.83504,50.11818 c -7.83832,-1.029924 -15.76743,-1.426209 -23.66581,-1.013174 -12.38775,0.548433 -24.70857,2.456562 -36.70542,5.583427 -1.54528,-1.866107 -3.52301,-3.287056 -5.31823,-4.89588 -2.23763,-1.449855 -4.41243,-3.00815 -6.6898,-4.389415 -2.08719,-1.000821 -4.08801,-2.204635 -6.31907,-2.867257 -2.34646,-0.768464 -4.61216,-1.818471 -7.05535,-2.249609 -1.7561,-0.398382 -3.50633,-0.834055 -5.3136,-0.907448 -2.46607,-0.17371 -4.92244,-0.640087 -7.40012,-0.463166 -1.80034,0.04161 -3.60407,0.04563 -5.3749,0.414583 -2.43413,0.432272 -4.93022,0.578062 -7.29011,1.353554 -1.73521,0.47884 -3.48277,0.922329 -5.10986,1.710803 -2.25278,1.010618 -4.63539,1.758472 -6.73261,3.083917 -1.56702,0.887219 -3.15474,1.742947 -4.54121,2.904546 -1.94148,1.531076 -4.07302,2.83879 -5.78679,4.637466 -0.8085,0.794753 -1.6512,1.558226 -2.43839,2.372458 -6.54832,-7.042367 -15.07389,-12.223504 -24.35195,-14.760401 -4.45885,-1.22347 -9.08035,-1.881211 -13.70735,-1.838619 -0.93882,-0.03679 -1.87608,0.05046 -2.81419,0.07803 z"
|
||||
inkscape:label="behind" />
|
||||
<path
|
||||
d="m 217.5,62.992572 a 21.875,21.875 0 0 0 -21.875,24.5 c -20.125,-9.625 -42.875,-14 -62.125,-14 -77,1.75 -59.5,66.499998 -21,67.374998 -4.375,20.125 -1.75,37.625 23.625,56.875 -57.75,4.375 -104.125,52.5 -104.125,111.125 0,55.125 37.625,87.5 84.875,112 15.75,8.75 14,35.875 42,35.875 27.125,0 98,-59.5 97.125,-148.75 0,89.25 70.875,148.75 98,148.75 27.125,0 25.375,-27.125 41.125,-35.875 47.25,-24.5 84.875,-56.875 84.875,-112 0,-58.625 -45.5,-106.75 -103.25,-111.125 24.5,-19.25 28,-36.75 22.75,-56.875 38.5,-0.875 56,-65.624998 -20.125,-67.374998 -20.125,0 -42,4.375 -63,14 l 0.875,-2.625 a 21.875,21.875 0 1 0 -28,20.999998 c -17.5,14.875 -30.625,36.75 -33.25,64.75 -1.75,-28 -14.875,-49.875 -33.25,-64.75 A 21.875,21.875 0 0 0 217.5,62.992572 Z m -77,174.999998 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m 231,0 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m -236.25,44.625 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z m 241.5,0 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z"
|
||||
style="display:inline;fill:#fcfaf8;stroke:none;stroke-width:16;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;fill-opacity:1"
|
||||
id="path1" />
|
||||
</svg>
|
After Width: | Height: | Size: 6.6 KiB |
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
viewBox="0 0 512 512"
|
||||
width="32"
|
||||
height="32"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
sodipodi:docname="icon-light-state-invalid.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
id="linearGradient11"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#9d8062;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop12" />
|
||||
<stop
|
||||
style="stop-color:#9d8062;stop-opacity:1;"
|
||||
offset="0.45122612"
|
||||
id="stop13" />
|
||||
<stop
|
||||
style="stop-color:#736659;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop11" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient1"
|
||||
inkscape:swatch="gradient">
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#27983a;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11"
|
||||
id="linearGradient12"
|
||||
x1="256"
|
||||
y1="4.7133198"
|
||||
x2="256"
|
||||
y2="516.71332"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="14.230524"
|
||||
inkscape:cx="15.143504"
|
||||
inkscape:cy="10.435315"
|
||||
inkscape:window-width="1277"
|
||||
inkscape:window-height="864"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg1" />
|
||||
<path
|
||||
id="path11"
|
||||
style="fill:#9d8062;fill-opacity:1;stroke:url(#linearGradient12);stroke-width:15.5153;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
d="m 215.22028,38.871995 c -4.34372,0.303826 -8.65502,1.096343 -12.79663,2.448948 -5.93985,1.922995 -11.53239,4.920956 -16.41582,8.811486 -1.76365,1.417918 -3.46026,2.919246 -5.01704,4.56358 -14.636,-3.798687 -29.75685,-5.860967 -44.88746,-5.742441 -14.68272,0.379878 -29.51967,2.710272 -43.033824,8.664817 -10.977835,4.822375 -20.961579,12.233426 -28.009521,22.005037 -7.050461,9.664813 -10.992922,21.550288 -11.066377,33.516658 -0.169287,14.92345 5.535781,29.70673 15.271568,40.96315 4.373745,5.08863 9.549047,9.48723 15.279627,12.97831 0.542441,5.29028 1.667985,10.52221 3.376926,15.55886 -23.221327,10.97251 -43.33471,28.4246 -57.436944,49.89292 -12.70417,19.22237 -20.483342,41.67752 -22.2863846,64.65411 -1.5554936,19.84165 0.9781838,40.10268 8.1825416,58.70009 6.210988,16.16091 15.894545,30.87732 27.739004,43.46312 16.487951,17.57083 36.752681,31.11853 57.877414,42.47694 0.75168,0.43906 1.59701,0.77511 2.29306,1.27388 2.86679,4.6313 5.37096,9.48946 8.52384,13.94228 5.45956,7.92277 12.65714,14.75439 21.2551,19.16193 9.6394,5.0174 20.71523,6.96599 31.51599,6.28795 10.90179,-0.83701 21.2892,-4.91931 30.77723,-10.18133 12.4166,-6.93812 23.56256,-15.98376 33.58249,-26.03914 9.96279,-10.0289 18.79496,-21.17022 26.39113,-33.0889 10.87699,16.91934 24.18793,32.34401 39.74938,45.12077 10.00713,8.14757 20.97471,15.31593 33.06537,19.95959 7.93816,3.03334 16.45952,4.79051 24.9827,4.29735 10.21404,-0.42126 20.38768,-3.4272 28.9131,-9.13093 7.64187,-5.02101 13.76108,-12.06794 18.51752,-19.82113 2.18351,-3.46929 4.05021,-7.12613 6.22223,-10.6015 19.47332,-10.29917 38.22477,-22.35497 54.16907,-37.65945 12.90338,-12.36533 23.80556,-26.96729 31.10415,-43.32695 7.42472,-16.45569 11.06132,-34.51755 11.17414,-52.54357 0.26042,-23.29706 -5.49528,-46.63235 -16.59853,-67.11795 -11.57326,-21.48158 -28.90977,-39.80528 -49.69952,-52.57602 -4.32446,-2.66803 -8.80214,-5.08501 -13.38779,-7.27285 1.71297,-5.08008 2.82802,-10.35954 3.34284,-15.69522 13.91733,-8.58279 24.37005,-22.65677 28.36297,-38.53166 3.18363,-12.38154 2.28224,-25.81377 -2.79783,-37.567954 C 448.76107,79.66973 440.5163,70.303487 430.53327,63.714302 419.01053,56.051725 405.46698,51.925294 391.83504,50.11818 c -7.83832,-1.029924 -15.76743,-1.426209 -23.66581,-1.013174 -12.38775,0.548433 -24.70857,2.456562 -36.70542,5.583427 -1.54528,-1.866107 -3.52301,-3.287056 -5.31823,-4.89588 -2.23763,-1.449855 -4.41243,-3.00815 -6.6898,-4.389415 -2.08719,-1.000821 -4.08801,-2.204635 -6.31907,-2.867257 -2.34646,-0.768464 -4.61216,-1.818471 -7.05535,-2.249609 -1.7561,-0.398382 -3.50633,-0.834055 -5.3136,-0.907448 -2.46607,-0.17371 -4.92244,-0.640087 -7.40012,-0.463166 -1.80034,0.04161 -3.60407,0.04563 -5.3749,0.414583 -2.43413,0.432272 -4.93022,0.578062 -7.29011,1.353554 -1.73521,0.47884 -3.48277,0.922329 -5.10986,1.710803 -2.25278,1.010618 -4.63539,1.758472 -6.73261,3.083917 -1.56702,0.887219 -3.15474,1.742947 -4.54121,2.904546 -1.94148,1.531076 -4.07302,2.83879 -5.78679,4.637466 -0.8085,0.794753 -1.6512,1.558226 -2.43839,2.372458 -6.54832,-7.042367 -15.07389,-12.223504 -24.35195,-14.760401 -4.45885,-1.22347 -9.08035,-1.881211 -13.70735,-1.838619 -0.93882,-0.03679 -1.87608,0.05046 -2.81419,0.07803 z"
|
||||
inkscape:label="behind" />
|
||||
<path
|
||||
d="m 217.5,62.992572 a 21.875,21.875 0 0 0 -21.875,24.5 c -20.125,-9.625 -42.875,-14 -62.125,-14 -77,1.75 -59.5,66.499998 -21,67.374998 -4.375,20.125 -1.75,37.625 23.625,56.875 -57.75,4.375 -104.125,52.5 -104.125,111.125 0,55.125 37.625,87.5 84.875,112 15.75,8.75 14,35.875 42,35.875 27.125,0 98,-59.5 97.125,-148.75 0,89.25 70.875,148.75 98,148.75 27.125,0 25.375,-27.125 41.125,-35.875 47.25,-24.5 84.875,-56.875 84.875,-112 0,-58.625 -45.5,-106.75 -103.25,-111.125 24.5,-19.25 28,-36.75 22.75,-56.875 38.5,-0.875 56,-65.624998 -20.125,-67.374998 -20.125,0 -42,4.375 -63,14 l 0.875,-2.625 a 21.875,21.875 0 1 0 -28,20.999998 c -17.5,14.875 -30.625,36.75 -33.25,64.75 -1.75,-28 -14.875,-49.875 -33.25,-64.75 A 21.875,21.875 0 0 0 217.5,62.992572 Z m -77,174.999998 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m 231,0 a 70,70 0 1 1 0,140 70,70 0 0 1 0,-140 z m -236.25,44.625 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z m 241.5,0 a 27.125,27.125 0 1 0 0,54.25 27.125,27.125 0 0 0 0,-54.25 z"
|
||||
style="display:inline;fill:#fcfaf8;stroke:none;stroke-width:16;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;fill-opacity:1"
|
||||
id="path1" />
|
||||
</svg>
|
After Width: | Height: | Size: 6.6 KiB |
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="32" height="32">
|
||||
<path d="M166 75a25 25 0 0 0-25 28c-23-11-49-16-71-16-88 2-68 76-24 77-5 23-2 43 27 65-66 5-119 60-119 127 0 63 43 100 97 128 18 10 16 41 48 41 31 0 112-68 111-170 0 102 81 170 112 170s29-31 47-41c54-28 97-65 97-128 0-67-52-122-118-127 28-22 32-42 26-65 44-1 64-75-23-77-23 0-48 5-72 16l1-3a25 25 0 1 0-32 24c-20 17-35 42-38 74-2-32-17-57-38-74a25 25 0 0 0-6-49zM78 275a80 80 0 1 1 0 160 80 80 0 0 1 0-160zm264 0a80 80 0 1 1 0 160 80 80 0 0 1 0-160zM72 326a31 31 0 1 0 0 62 31 31 0 0 0 0-62zm276 0a31 31 0 1 0 0 62 31 31 0 0 0 0-62z" style="fill:currentColor" transform="translate(46 -44)"/>
|
||||
</svg>
|
After Width: | Height: | Size: 687 B |
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p inkscape
|
||||
# Uses Inkscape to generate .png files from the provided input
|
||||
|
||||
name=$(basename $1 .svg)
|
||||
|
||||
inkscape -o $name-16x.png -w 16 $1
|
||||
inkscape -o $name-32x.png -w 32 $1
|
||||
inkscape -o $name-48x.png -w 48 $1
|
||||
inkscape -o $name-64x.png -w 64 $1
|
||||
inkscape -o $name-96x.png -w 96 $1
|
||||
inkscape -o $name-128x.png -w 128 $1
|
After Width: | Height: | Size: 253 KiB |
19
package.json
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "metamorpov",
|
||||
"title": "MetamorPOV",
|
||||
"version": "0.1.0",
|
||||
"description": "Enables customization of reader-insert stories by replacing author-provided hooks such as Y/n, pov/s, and vrb/do/present/.",
|
||||
"version": "2.0.3",
|
||||
"description": "Enables customization of reader-insert stories by translating specific markers such as Y/n, pov/s, and vrb/present/do/.",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -11,17 +11,18 @@
|
|||
"author": "Jean Viscogliosi-Pate",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"scripts": {
|
||||
"test": "npx rollup -c && npx web-ext run -s src",
|
||||
"build": "npx rollup -c && npx web-ext build -s src -a dist --ignore-files replace-words.js -o"
|
||||
"test": "cp src/manifest-firefox.json src/manifest.json && npx rollup -c && npx web-ext run -s src && rm src/manifest.json",
|
||||
"test-chrome": "cp src/manifest-chrome.json src/manifest.json && npx rollup -c && chromium && rm src/manifest.json",
|
||||
"build": "cp src/manifest-firefox.json src/manifest.json && npx rollup -c && npx web-ext build -s src -a dist --ignore-files replace-words.js save-load-options.js manifest-* service-worker* -n {name}-{version}.xpi -o && rm src/manifest.json",
|
||||
"build-chrome": "cp src/manifest-chrome.json src/manifest.json && npx rollup -c && npx web-ext build -s src -a dist --ignore-files replace-words.js save-load-options.js manifest-* background.js -n {name}-{version}.zip -o && rm src/manifest.json"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "28.0.2",
|
||||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@rollup/plugin-node-resolve": "15.3.0",
|
||||
"english-verbs-gerunds": "3.3.1",
|
||||
"english-verbs-helper": "3.3.1",
|
||||
"english-verbs-irregular": "3.3.1",
|
||||
"metamorpov": "^1.0.2",
|
||||
"rollup": "^4.27.3",
|
||||
"web-ext": "^8.3.0",
|
||||
"@rollup/plugin-json": "^6.1.0"
|
||||
"web-ext": "^8.9.0",
|
||||
"webextension-polyfill": "^0.12.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,12 +2,24 @@ import resolve from '@rollup/plugin-node-resolve';
|
|||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import json from '@rollup/plugin-json';
|
||||
|
||||
export default {
|
||||
input: 'src/replace-words.js',
|
||||
output: {
|
||||
file: 'src/content-script.js',
|
||||
format: 'iife',
|
||||
name: 'contentScript'
|
||||
export default [
|
||||
{
|
||||
input: 'src/save-load-options.js',
|
||||
output: {
|
||||
file: 'src/popup.js',
|
||||
format: 'iife',
|
||||
name: 'popup'
|
||||
},
|
||||
plugins: [resolve(), commonjs(), json()]
|
||||
},
|
||||
plugins: [resolve(), commonjs(), json()]
|
||||
};
|
||||
|
||||
{
|
||||
input: 'src/replace-words.js',
|
||||
output: {
|
||||
file: 'src/content-script.js',
|
||||
format: 'iife',
|
||||
name: 'contentScript'
|
||||
},
|
||||
plugins: [resolve(), commonjs(), json()]
|
||||
}
|
||||
];
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
let colorScheme = "light";
|
||||
let state = "neutral";
|
||||
|
||||
/* Update the extension's icon by color scheme and state */
|
||||
function updateIcon(event) {
|
||||
browser.action.setIcon({
|
||||
path: {
|
||||
16: "icons/" + colorScheme + "-state-" + state + "-16x.png",
|
||||
32: "icons/" + colorScheme + "-state-" + state + "-32x.png",
|
||||
48: "icons/" + colorScheme + "-state-" + state + "-48x.png",
|
||||
64: "icons/" + colorScheme + "-state-" + state + "-64x.png",
|
||||
96: "icons/" + colorScheme + "-state-" + state + "-96x.png",
|
||||
128: "icons/" + colorScheme + "-state-" + state + "-128x.png"
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/* Listen for color scheme changes */
|
||||
browser.runtime.onInstalled.addListener(updateColorSchemeOnInstall);
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', updateColorScheme);
|
||||
|
||||
/* Update the color scheme to light or dark */
|
||||
function updateColorScheme(event) {
|
||||
const isDark = event.matches;
|
||||
if (isDark) {
|
||||
colorScheme = "dark";
|
||||
} else {
|
||||
colorScheme = "light";
|
||||
}
|
||||
|
||||
updateIcon();
|
||||
}
|
||||
|
||||
/* Updatw the color scheme on install */
|
||||
function updateColorSchemeOnInstall() {
|
||||
updateColorScheme(window.matchMedia('(prefers-color-scheme: dark)'));
|
||||
}
|
||||
|
||||
/* Listen for tab changes */
|
||||
window.addEventListener("load", updateState());
|
||||
browser.tabs.onUpdated.addListener(updateStateOnReload, {urls: ["*://*/*"]});
|
||||
browser.tabs.onActivated.addListener(updateState);
|
||||
|
||||
/* Update whether the extension is enabled for a host */
|
||||
function updateState() {
|
||||
let tabs = browser.tabs.query({ active: true, currentWindow: true });
|
||||
tabs.then((tabs) => {
|
||||
const tab = tabs[0];
|
||||
const url = new URL(tab.url);
|
||||
const isAllowedProtocol = url.protocol == "https:" || url.protocol == "http:";
|
||||
|
||||
if (!isAllowedProtocol) {
|
||||
state = "neutral";
|
||||
updateIcon();
|
||||
return;
|
||||
}
|
||||
|
||||
let storage = browser.storage.local.get("domains");
|
||||
storage.then((storage) => {
|
||||
const hostname = url.host;
|
||||
const domains = storage.domains;
|
||||
if (domains === undefined) {
|
||||
state = "disabled";
|
||||
}
|
||||
else if (domains.includes(hostname)) {
|
||||
state = "enabled";
|
||||
} else {
|
||||
state = "disabled";
|
||||
}
|
||||
}, logError).then(() => {
|
||||
updateIcon();
|
||||
}, logError);
|
||||
}, logError);
|
||||
}
|
||||
|
||||
/* Only update the state if the page was reloaded */
|
||||
function updateStateOnReload(tabIs, changeInfo, tab) {
|
||||
if (changeInfo.url && tab.url.host === changeInfo.url.host) {
|
||||
return;
|
||||
} else {
|
||||
updateState();
|
||||
}
|
||||
}
|
||||
|
||||
/* Required by then */
|
||||
function logError(error) {
|
||||
console.log(`Error: ${error}`);
|
||||
}
|
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 874 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 913 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 909 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 907 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 9.3 KiB |
After Width: | Height: | Size: 919 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 9.3 KiB |
After Width: | Height: | Size: 917 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 6.9 KiB |
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"name": "MetamorPOV",
|
||||
"author": "Jean Viscogliosi-Pate",
|
||||
"version": "2.0.3",
|
||||
|
||||
"description": "Enables customization of reader-insert stories by translating specific markers such as Y/n, pov/s, and vrb/present/do/.",
|
||||
|
||||
"action": {
|
||||
"default_title": "MetamorPOV",
|
||||
"default_popup": "popup.html",
|
||||
"default_icon": {
|
||||
"16": "icons/light-state-neutral-16x.png",
|
||||
"32": "icons/light-state-neutral-32x.png",
|
||||
"48": "icons/light-state-neutral-48x.png",
|
||||
"64": "icons/light-state-neutral-64x.png",
|
||||
"96": "icons/light-state-neutral-96x.png",
|
||||
"128": "icons/light-state-neutral-128x.png"
|
||||
}
|
||||
},
|
||||
|
||||
"permissions": [
|
||||
"storage",
|
||||
"tabs",
|
||||
"offscreen"
|
||||
],
|
||||
|
||||
"host_permissions": [
|
||||
"http://*/*",
|
||||
"https://*/*"
|
||||
],
|
||||
|
||||
"icons": {
|
||||
"16": "icons/light-state-neutral-16x.png",
|
||||
"32": "icons/light-state-neutral-32x.png",
|
||||
"48": "icons/light-state-neutral-48x.png",
|
||||
"64": "icons/light-state-neutral-64x.png",
|
||||
"96": "icons/light-state-neutral-96x.png",
|
||||
"128": "icons/light-state-neutral-128x.png"
|
||||
},
|
||||
|
||||
"content_scripts": [
|
||||
{
|
||||
"js": [
|
||||
"content-script.js"
|
||||
],
|
||||
"run_at": "document_idle",
|
||||
"matches": [
|
||||
"*://*/*"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
"background": {
|
||||
"service_worker": "service-worker.js",
|
||||
"type": "module"
|
||||
},
|
||||
|
||||
"homepage_url": "https://git.viscogliosi-pate.com/jean/metamorpov"
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"name": "MetamorPOV",
|
||||
"author": "Jean Viscogliosi-Pate",
|
||||
"version": "2.0.3",
|
||||
|
||||
"description": "Enables customization of reader-insert stories by translating specific markers such as Y/n, pov/s, and vrb/present/do/.",
|
||||
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "metamorpov@viscogliosi-pate.com",
|
||||
"strict_min_version": "113.0"
|
||||
},
|
||||
"gecko_android": {}
|
||||
},
|
||||
|
||||
"action": {
|
||||
"default_title": "MetamorPOV",
|
||||
"default_popup": "popup.html",
|
||||
"default_icon": {
|
||||
"16": "icons/light-state-neutral-16x.png",
|
||||
"32": "icons/light-state-neutral-32x.png",
|
||||
"48": "icons/light-state-neutral-48x.png",
|
||||
"64": "icons/light-state-neutral-64x.png",
|
||||
"96": "icons/light-state-neutral-96x.png",
|
||||
"128": "icons/light-state-neutral-128x.png"
|
||||
},
|
||||
"theme_icons": [{
|
||||
"light": "icons/light-state-neutral-16x.png",
|
||||
"dark": "icons/dark-state-neutral-16x.png",
|
||||
"size": 16
|
||||
}, {
|
||||
"light": "icons/light-state-neutral-32x.png",
|
||||
"dark": "icons/dark-state-neutral-32x.png",
|
||||
"size": 32
|
||||
}, {
|
||||
"light": "icons/light-state-neutral-48x.png",
|
||||
"dark": "icons/dark-state-neutral-48x.png",
|
||||
"size": 48
|
||||
}, {
|
||||
"light": "icons/light-state-neutral-64x.png",
|
||||
"dark": "icons/dark-state-neutral-64x.png",
|
||||
"size": 64
|
||||
}, {
|
||||
"light": "icons/light-state-neutral-96x.png",
|
||||
"dark": "icons/dark-state-neutral-96x.png",
|
||||
"size": 96
|
||||
}, {
|
||||
"light": "icons/light-state-neutral-128x.png",
|
||||
"dark": "icons/dark-state-neutral-128x.png",
|
||||
"size": 128
|
||||
}]
|
||||
},
|
||||
|
||||
"permissions": [
|
||||
"storage",
|
||||
"tabs"
|
||||
],
|
||||
|
||||
"host_permissions": [
|
||||
"http://*/*",
|
||||
"https://*/*"
|
||||
],
|
||||
|
||||
"icons": {
|
||||
"16": "icons/light-state-neutral-16x.png",
|
||||
"32": "icons/light-state-neutral-32x.png",
|
||||
"48": "icons/light-state-neutral-48x.png",
|
||||
"64": "icons/light-state-neutral-64x.png",
|
||||
"96": "icons/light-state-neutral-96x.png",
|
||||
"128": "icons/light-state-neutral-128x.png"
|
||||
},
|
||||
|
||||
"content_scripts": [
|
||||
{
|
||||
"js": [
|
||||
"content-script.js"
|
||||
],
|
||||
"run_at": "document_idle",
|
||||
"matches": [
|
||||
"*://*/*"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
"background": {
|
||||
"scripts": [
|
||||
"background.js"
|
||||
]
|
||||
},
|
||||
|
||||
"homepage_url": "https://git.viscogliosi-pate.com/jean/metamorpov"
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "MetamorPOV",
|
||||
"author": "Jean Viscogliosi-Pate",
|
||||
"version": "1.1.0",
|
||||
"license": "GPL-3.0-or-later",
|
||||
|
||||
"description": "Enables customization of reader-insert stories by replacing author-provided hooks such as Y/n, pov/s, and vrb/do/present/.",
|
||||
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "metamorpov@viscogliosi-pate.com",
|
||||
"strict_min_version": "113.0"
|
||||
},
|
||||
"gecko_android": {}
|
||||
},
|
||||
|
||||
"browser_action": {
|
||||
"default_title": "MetamorPOV",
|
||||
"default_icon": {
|
||||
"16": "metamorpov.svg",
|
||||
"32": "metamorpov.svg",
|
||||
"48": "metamorpov.svg",
|
||||
"64": "metamorpov.svg",
|
||||
"96": "metamorpov.svg",
|
||||
"128": "metamorpov.svg"
|
||||
},
|
||||
"default_popup": "popup.html"
|
||||
},
|
||||
|
||||
"permissions": [
|
||||
"storage",
|
||||
"tabs"
|
||||
],
|
||||
|
||||
"icons": {
|
||||
"16": "metamorpov.svg",
|
||||
"32": "metamorpov.svg",
|
||||
"48": "metamorpov.svg",
|
||||
"64": "metamorpov.svg",
|
||||
"96": "metamorpov.svg",
|
||||
"128": "metamorpov.svg"
|
||||
},
|
||||
|
||||
"content_scripts": [
|
||||
{
|
||||
"js": [
|
||||
"content-script.js"
|
||||
],
|
||||
"run_at": "document_idle",
|
||||
"matches": [
|
||||
"*://*/*"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
"background": {
|
||||
"page": "popup.html"
|
||||
},
|
||||
|
||||
"homepage_url": "https://git.viscogliosi-pate.com/jean/metamorpov"
|
||||
}
|
Before Width: | Height: | Size: 6.6 KiB |
|
@ -1,393 +1,16 @@
|
|||
const verbsHelper = require("english-verbs-helper");
|
||||
const verbsIrregular = require("english-verbs-irregular/dist/verbs.json");
|
||||
const verbsGerunds = require("english-verbs-gerunds/dist/gerunds.json");
|
||||
const verbsData = verbsHelper.mergeVerbsData(verbsIrregular, verbsGerunds);
|
||||
var browser = require("webextension-polyfill");
|
||||
const metamorpov = require("metamorpov");
|
||||
|
||||
/* Replaces verbs, point-of-view, name, pronouns, and "also" terms */
|
||||
function replaceAll() {
|
||||
browser.storage.local.get(null, (options) => {
|
||||
/* Uses MetamorPOV to translate page text */
|
||||
function translate() {
|
||||
let options = browser.storage.local.get();
|
||||
options.then((options) => {
|
||||
const hostname = window.location.hostname;
|
||||
const isEnabled = !(options.domains === undefined) && options.domains.includes(hostname);
|
||||
if (!isEnabled) { return; }
|
||||
|
||||
const isNameSet = !(options.name === undefined || options.name == "");
|
||||
const isPronounsSet = !(options.preset === undefined || options.preset == "");
|
||||
const isPovSet = !(options.pov === undefined || options.pov == "");
|
||||
const isPovLegal = isPovSet && (options.pov != "third" || (isNameSet && isPronounsSet));
|
||||
const isAllSet = isNameSet && isPronounsSet && isPovLegal;
|
||||
|
||||
if (isPovLegal) {
|
||||
replaceVerbs(options);
|
||||
replacePov(options);
|
||||
replacePlv(options);
|
||||
}
|
||||
|
||||
if (isNameSet) {
|
||||
replaceName(options);
|
||||
}
|
||||
|
||||
if (isPronounsSet) {
|
||||
replacePronouns(options);
|
||||
}
|
||||
|
||||
const isAlsoSet = !(options.also === undefined);
|
||||
if (isAlsoSet) {
|
||||
replaceAlso(options);
|
||||
}
|
||||
|
||||
if (isAllSet) {
|
||||
replaceExceptions(options);
|
||||
replaceCuts();
|
||||
}
|
||||
metamorpov.translate(document.body, options);
|
||||
});
|
||||
}
|
||||
|
||||
/* Replaces all instances of "Y/n" with the user's name */
|
||||
function replaceName(options) {
|
||||
const searchTerm = /\by\/n\b|\(y\/n\)|\[y\/n\]/ig;
|
||||
walk(document.body, searchTerm, options["name"], directMethod);
|
||||
}
|
||||
|
||||
/* Replaces all verb keys */
|
||||
function replaceVerbs(options) {
|
||||
const searchTerm = /(v)r([nb])\/([\w\s]+)\/(?:((?:(?:simple|progressive|perfect|perfect[ _]progressive|participle(?![ _]future))[ _])*(?:past|present|future))\/)*/i;
|
||||
walk(document.body, searchTerm, options, verbMethod);
|
||||
}
|
||||
|
||||
/* Replaces all pronoun keys */
|
||||
/* This could be made faster if I give premade regexp expressions for each, but I don't want to do that! */
|
||||
function replacePronouns(options) {
|
||||
let pronouns = getPronouns(options.preset, options.other);
|
||||
walk(document.body, /([Pp])rn\/s/, pronouns["subjective"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/o/, pronouns["objective"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/p/, pronouns["possessive"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/a/, pronouns["adjective"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/r/, pronouns["reflexive"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/H/, pronouns["honorific-abbr"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/h/, pronouns["honorific"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/N/, pronouns["adult"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/n/, pronouns["youth"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/F/, pronouns["parent"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/f/, pronouns["child"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/k/, pronouns["sibling"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/m/, pronouns["married"], pronounMethod);
|
||||
walk(document.body, /([Pp])rn\/d/, pronouns["dating"], pronounMethod);
|
||||
}
|
||||
|
||||
/* Gets pronouns based on the provided key (or user input) */
|
||||
function getPronouns(key, other) {
|
||||
switch (key) {
|
||||
case "she":
|
||||
return {
|
||||
"subjective": "she",
|
||||
"objective": "her",
|
||||
"possessive": "her",
|
||||
"adjective": "hers",
|
||||
"reflexive": "herself",
|
||||
"honorific-abbr": "Ms.",
|
||||
"honorific": "miss",
|
||||
"adult": "woman",
|
||||
"youth": "girl",
|
||||
"parent": "mother",
|
||||
"child": "daughter",
|
||||
"sibling": "sister",
|
||||
"married": "wife",
|
||||
"dating": "girlfriend",
|
||||
"plurality": "singular"
|
||||
};
|
||||
case "he":
|
||||
return {
|
||||
"subjective": "he",
|
||||
"objective": "him",
|
||||
"possessive": "his",
|
||||
"adjective": "his",
|
||||
"reflexive": "himself",
|
||||
"honorific-abbr": "Mr.",
|
||||
"honorific": "mister",
|
||||
"adult": "man",
|
||||
"youth": "boy",
|
||||
"parent": "father",
|
||||
"child": "son",
|
||||
"sibling": "brother",
|
||||
"married": "husband",
|
||||
"dating": "boyfriend",
|
||||
"plurality": "singular"
|
||||
};
|
||||
case "they":
|
||||
return {
|
||||
"subjective": "they",
|
||||
"objective": "them",
|
||||
"possessive": "their",
|
||||
"adjective": "theirs",
|
||||
"reflexive": "themself",
|
||||
"honorific-abbr": "Mx.",
|
||||
"honorific": "mix",
|
||||
"adult": "person",
|
||||
"youth": "kid",
|
||||
"parent": "parent",
|
||||
"child": "child",
|
||||
"sibling": "sibling",
|
||||
"married": "spouse",
|
||||
"dating": "partner",
|
||||
"plurality": "plural"
|
||||
};
|
||||
case "first":
|
||||
return {
|
||||
"subjective": "I",
|
||||
"objective": "me",
|
||||
"possessive": "my",
|
||||
"adjective": "mine",
|
||||
"reflexive": "myself"
|
||||
};
|
||||
case "second":
|
||||
return {
|
||||
"subjective": "you",
|
||||
"objective": "you",
|
||||
"possessive": "your",
|
||||
"adjective": "yours",
|
||||
"reflexive": "yourself"
|
||||
};
|
||||
case "first-plural":
|
||||
return {
|
||||
"subjective": "we",
|
||||
"objective": "us",
|
||||
"possessive": "our",
|
||||
"adjective": "ours",
|
||||
"reflexive": "ourselves"
|
||||
};
|
||||
case "second-plural":
|
||||
return {
|
||||
"subjective": "you",
|
||||
"objective": "you",
|
||||
"possessive": "your",
|
||||
"adjective": "yours",
|
||||
"reflexive": "yourselves"
|
||||
};
|
||||
case "third-plural":
|
||||
return {
|
||||
"subjective": "they",
|
||||
"objective": "them",
|
||||
"possessive": "their",
|
||||
"adjective": "theirs",
|
||||
"reflexive": "themselves"
|
||||
};
|
||||
case "other":
|
||||
return other;
|
||||
}
|
||||
}
|
||||
|
||||
/* Replaces all point-of-view keys */
|
||||
function replacePov(options) {
|
||||
let pronouns;
|
||||
if (options.pov == "third") {
|
||||
pronouns = getPronouns(options.preset, options.other);
|
||||
walk(document.body, /([Pp])ov\/S/, options.name, pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/O/, options.name, pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/P/, options.name + "’s", pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/A/, options.name + "’s", pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/R/, options.name + "’s self", pronounMethod);
|
||||
} else {
|
||||
pronouns = getPronouns(options.pov, null);
|
||||
walk(document.body, /([Pp])ov\/S/, pronouns["subjective"], pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/O/, pronouns["objective"], pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/P/, pronouns["possessive"], pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/A/, pronouns["adjective"], pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/R/, pronouns["reflexive"], pronounMethod);
|
||||
}
|
||||
walk(document.body, /([Pp])ov\/s/, pronouns["subjective"], pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/o/, pronouns["objective"], pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/p/, pronouns["possessive"], pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/a/, pronouns["adjective"], pronounMethod);
|
||||
walk(document.body, /([Pp])ov\/r/, pronouns["reflexive"], pronounMethod);
|
||||
}
|
||||
|
||||
/* Replaces plural point-of-view keys */
|
||||
function replacePlv(options) {
|
||||
let pronouns = getPronouns(options.pov + "-plural", null);
|
||||
walk(document.body, /([Pp])lv\/s/, pronouns["subjective"], pronounMethod);
|
||||
walk(document.body, /([Pp])lv\/o/, pronouns["objective"], pronounMethod);
|
||||
walk(document.body, /([Pp])lv\/p/, pronouns["possessive"], pronounMethod);
|
||||
walk(document.body, /([Pp])lv\/a/, pronouns["adjective"], pronounMethod);
|
||||
walk(document.body, /([Pp])lv\/r/, pronouns["reflexive"], pronounMethod);
|
||||
}
|
||||
|
||||
/* Replaces additional terms specified by the user */
|
||||
function replaceAlso(options) {
|
||||
Object.entries(options.also).forEach(([key, value]) => {
|
||||
escapeAndReplace(key, value, true);
|
||||
});
|
||||
}
|
||||
|
||||
/* Replaces exception statements by POV */
|
||||
function replaceExceptions(options) {
|
||||
const searchTerm = /exc\/([^\/]*)\/([^\/]*)\//i;
|
||||
walk(document.body, searchTerm, options, exceptionMethod);
|
||||
}
|
||||
|
||||
|
||||
/* Replaces cut statements with cuts */
|
||||
function replaceCuts() {
|
||||
const searchTerm = /cut\/([^\/]+)\/(-?[\d]+)\//i;
|
||||
walk(document.body, searchTerm, null, cutMethod);
|
||||
}
|
||||
|
||||
/* Turns a term into regexp format and uses that to replace it */
|
||||
function escapeAndReplace(searchTerm, replaceValue, caseSensitive) {
|
||||
let searchTermEscaped = searchTerm.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
||||
const flags = caseSensitive ? "g" : "ig"
|
||||
if (searchTermEscaped[0].match(/[a-z]/i)) {
|
||||
searchTermEscaped = `\\b${searchTermEscaped}`
|
||||
}
|
||||
if (searchTermEscaped[searchTermEscaped.length - 1].match((/[a-z]/i))) {
|
||||
searchTermEscaped = `${searchTermEscaped}\\b`
|
||||
}
|
||||
const searchTermRegexp = new RegExp(searchTermEscaped, flags)
|
||||
walk(document.body, searchTermRegexp, replaceValue, directMethod);
|
||||
}
|
||||
|
||||
/* Traverses a node and its children to run the provided replacement method */
|
||||
function walk(node, searchTerm, replaceValue, replaceMethod) {
|
||||
if (node.contentEditable == "true" || node.type == "textarea" || node.type == "input") { return; }
|
||||
let child, next;
|
||||
switch (node.nodeType) {
|
||||
case 1: /* ELEMENT_NODE */
|
||||
case 9: /* DOCUMENT_NODE */
|
||||
case 11: /* DOCUMENT_FRAGMENT_NODE */
|
||||
child = node.firstChild;
|
||||
while (child) {
|
||||
next = child.nextSibling;
|
||||
walk(child, searchTerm, replaceValue, replaceMethod);
|
||||
child = next;
|
||||
}
|
||||
break;
|
||||
case 3: /* TEXT_NODE */
|
||||
replaceMethod(node, searchTerm, replaceValue);
|
||||
}
|
||||
}
|
||||
|
||||
/* Replaces every instance of the provided terms */
|
||||
function directMethod(node, searchTerm, replaceValue) {
|
||||
node.nodeValue = node.nodeValue.replaceAll(searchTerm, replaceValue);
|
||||
}
|
||||
|
||||
/* Replaces all pronouns */
|
||||
function pronounMethod(node, searchTerm, pronoun) {
|
||||
const match = node.nodeValue.match(searchTerm);
|
||||
if (match == null) { return; }
|
||||
const isCapital = /P/.test(match[1]);
|
||||
|
||||
let replaceValue = pronoun;
|
||||
if (isCapital) {
|
||||
replaceValue = capitalize(replaceValue);
|
||||
}
|
||||
|
||||
node.nodeValue = node.nodeValue.replace(searchTerm, replaceValue);
|
||||
pronounMethod(node, searchTerm, pronoun);
|
||||
}
|
||||
|
||||
/* Replaces all verbs, not used for third-person plural */
|
||||
function verbMethod(node, searchTerm, options) {
|
||||
const match = node.nodeValue.match(searchTerm);
|
||||
if (match == null) { return; }
|
||||
const isCapital = /V/.test(match[1]);
|
||||
const category = match[2];
|
||||
const verb = match[3];
|
||||
let tense = match[4];
|
||||
|
||||
if (tense == null) {
|
||||
tense = "PAST";
|
||||
} else {
|
||||
tense = tense.toUpperCase().replaceAll(" ", "_");
|
||||
}
|
||||
|
||||
let povIndex;
|
||||
switch (category) {
|
||||
case "B": /* B and b vary by POV, capitalized to indicate a named subject */
|
||||
if (options.pov == "third") {
|
||||
povIndex = getPovIndex("third-singular", null);
|
||||
} else {
|
||||
povIndex = getPovIndex(options.pov, options);
|
||||
}
|
||||
case "b":
|
||||
povIndex = getPovIndex(options.pov, options);
|
||||
case "N": /* N and n are always third-person */
|
||||
povIndex = getPovIndex("third-singular", null);
|
||||
case "n":
|
||||
povIndex = getPovIndex("third", options);
|
||||
}
|
||||
|
||||
let replaceValue = verbsHelper.getConjugation(verbsData, verb, tense, povIndex);
|
||||
|
||||
if (isCapital) {
|
||||
replaceValue = capitalize(replaceValue);
|
||||
}
|
||||
|
||||
node.nodeValue = node.nodeValue.replace(searchTerm, replaceValue);
|
||||
verbMethod(node, searchTerm, options);
|
||||
}
|
||||
|
||||
/* Allows for custom words to be cut off */
|
||||
function cutMethod(node, searchTerm, unused) {
|
||||
const match = node.nodeValue.match(searchTerm);
|
||||
if (match == null) { return; }
|
||||
const target = match[1];
|
||||
const amount = match[2];
|
||||
|
||||
if (target.length <= Math.abs(amount)) {
|
||||
node.nodeValue = node.nodeValue.replace(searchTerm, target);
|
||||
cutMethod(node, searchTerm, unused);
|
||||
return;
|
||||
}
|
||||
|
||||
let replaceValue;
|
||||
if (amount < 0) {
|
||||
replaceValue = target.slice(0, amount);
|
||||
} else {
|
||||
replaceValue = target.slice(amount);
|
||||
}
|
||||
|
||||
node.nodeValue = node.nodeValue.replace(searchTerm, replaceValue);
|
||||
cutMethod(node, searchTerm, unused);
|
||||
}
|
||||
|
||||
/* Allows for custom words to be cut off */
|
||||
function exceptionMethod(node, searchTerm, options) {
|
||||
const match = node.nodeValue.match(searchTerm);
|
||||
if (match == null) { return; }
|
||||
|
||||
let replaceValue;
|
||||
if (options.pov == "third") {
|
||||
replaceValue = match[2];
|
||||
} else {
|
||||
replaceValue = match[1];
|
||||
}
|
||||
|
||||
node.nodeValue = node.nodeValue.replace(searchTerm, replaceValue);
|
||||
exceptionMethod(node, searchTerm, options);
|
||||
}
|
||||
|
||||
/* Returns the input word, capitalized */
|
||||
function capitalize(word) {
|
||||
return word.charAt(0).toUpperCase() + word.slice(1);
|
||||
}
|
||||
|
||||
/* Determines the index for point-of-view to be used when conjugating verbs */
|
||||
function getPovIndex(pov, options) {
|
||||
switch (pov) {
|
||||
case "first":
|
||||
return 0;
|
||||
case "second":
|
||||
return 1;
|
||||
case "third-singular":
|
||||
return 2;
|
||||
case "third":
|
||||
if (getPronouns(options.preset, options.other).plurality == "singular") {
|
||||
return 2;
|
||||
} else { /* Plurality is plural, "they go" */
|
||||
return 5;
|
||||
}
|
||||
return getThirdIndex(options);
|
||||
}
|
||||
}
|
||||
|
||||
replaceAll();
|
||||
translate();
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
var browser = require("webextension-polyfill");
|
||||
|
||||
document.addEventListener("DOMContentLoaded", init);
|
||||
|
||||
function init() {
|
||||
|
@ -14,17 +16,19 @@ function init() {
|
|||
function loadDomain() {
|
||||
let tabs = browser.tabs.query({ active: true, currentWindow: true });
|
||||
tabs.then((tabs) => {
|
||||
const hostname = new URL(tabs[0].url).hostname;
|
||||
document.querySelector("#domain").textContent = hostname;
|
||||
const tab = tabs[0];
|
||||
const url = new URL(tab.url);
|
||||
const isAllowedProtocol = url.protocol == "https:" || url.protocol == "http:";
|
||||
|
||||
if (!hostname) {
|
||||
if (!isAllowedProtocol) {
|
||||
disableToggle();
|
||||
return;
|
||||
}
|
||||
|
||||
document.querySelector("#domain").textContent = url.host;
|
||||
let storage = browser.storage.local.get("domains");
|
||||
storage.then((storage) => {
|
||||
const hostname = document.querySelector("#domain").innerHTML;
|
||||
const hostname = url.host;
|
||||
const domains = storage.domains;
|
||||
if (domains === undefined) {
|
||||
browser.storage.local.set({"domains": []});
|
||||
|
@ -252,15 +256,15 @@ async function removeLi() {
|
|||
also.removeChild(this.parentNode);
|
||||
let list = also.querySelectorAll("li");
|
||||
list.forEach((li, index) => {
|
||||
lhs = li.querySelector(".lhs");
|
||||
let lhs = li.querySelector(".lhs");
|
||||
lhs.id = "lhs-" + index;
|
||||
lhs.name = lhs.id;
|
||||
|
||||
rhs = li.querySelector(".rhs");
|
||||
let rhs = li.querySelector(".rhs");
|
||||
rhs.id = "rhs-" + index;
|
||||
rhs.name = rhs.id;
|
||||
|
||||
rhsLabel = li.querySelector("label");
|
||||
let rhsLabel = li.querySelector("label");
|
||||
rhsLabel.for = rhs.id;
|
||||
});
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<script src="service-worker-window.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
/* Broadcast color scheme on browser start, because no change event is fired */
|
||||
updateColorScheme(window.matchMedia('(prefers-color-scheme: dark)'));
|
||||
|
||||
function updateColorScheme(event) {
|
||||
chrome.runtime.sendMessage({
|
||||
content: "colorScheme",
|
||||
isDark: event.matches
|
||||
});
|
||||
}
|
||||
|
||||
/* Broadcast when page is loaded */
|
||||
window.addEventListener("load", updateState);
|
||||
|
||||
function updateState() {
|
||||
chrome.runtime.sendMessage({
|
||||
content: "updateState"
|
||||
});
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
let colorScheme = "light";
|
||||
let state = "neutral";
|
||||
|
||||
/* Update the extension's icon by color scheme and state */
|
||||
function updateIcon(event) {
|
||||
chrome.action.setIcon({
|
||||
path: {
|
||||
16: "icons/" + colorScheme + "-state-" + state + "-16x.png",
|
||||
32: "icons/" + colorScheme + "-state-" + state + "-32x.png",
|
||||
48: "icons/" + colorScheme + "-state-" + state + "-48x.png",
|
||||
64: "icons/" + colorScheme + "-state-" + state + "-64x.png",
|
||||
96: "icons/" + colorScheme + "-state-" + state + "-96x.png",
|
||||
128: "icons/" + colorScheme + "-state-" + state + "-128x.png"
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/* Track CSS media feature offscreen */
|
||||
chrome.offscreen.createDocument({
|
||||
url: "service-worker-window.html",
|
||||
reasons: ["MATCH_MEDIA"],
|
||||
justification: "Update icon by color scheme",
|
||||
})
|
||||
|
||||
/* Listen for color scheme changes */
|
||||
chrome.runtime.onMessage.addListener(
|
||||
function(request, sender, sendResponse) {
|
||||
if (request.content === "colorScheme") {
|
||||
updateColorScheme(request.isDark);
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
/* Update the color scheme to light or dark */
|
||||
function updateColorScheme(isDark) {
|
||||
if (isDark) {
|
||||
colorScheme = "dark";
|
||||
} else {
|
||||
colorScheme = "light";
|
||||
}
|
||||
|
||||
updateIcon();
|
||||
}
|
||||
|
||||
/* Listen for tab changes */
|
||||
chrome.tabs.onUpdated.addListener(updateStateOnReload);
|
||||
chrome.tabs.onActivated.addListener(updateState);
|
||||
|
||||
/* Update whether the extension is enabled for a host */
|
||||
function updateState() {
|
||||
let tabs = chrome.tabs.query({ active: true, currentWindow: true });
|
||||
tabs.then((tabs) => {
|
||||
const tab = tabs[0];
|
||||
if (tab.url === "") {
|
||||
state = "neutral";
|
||||
updateIcon();
|
||||
return;
|
||||
}
|
||||
|
||||
const url = new URL(tab.url);
|
||||
const isAllowedProtocol = url.protocol == "https:" || url.protocol == "http:";
|
||||
|
||||
if (!isAllowedProtocol) {
|
||||
state = "neutral";
|
||||
updateIcon();
|
||||
return;
|
||||
}
|
||||
|
||||
let storage = chrome.storage.local.get("domains");
|
||||
storage.then((storage) => {
|
||||
const hostname = url.host;
|
||||
const domains = storage.domains;
|
||||
if (domains === undefined) {
|
||||
state = "disabled";
|
||||
}
|
||||
else if (domains.includes(hostname)) {
|
||||
state = "enabled";
|
||||
} else {
|
||||
state = "disabled";
|
||||
}
|
||||
}, logError).then(() => {
|
||||
updateIcon();
|
||||
}, logError);
|
||||
}, logError);
|
||||
}
|
||||
|
||||
/* Only update the state if the page was reloaded */
|
||||
function updateStateOnReload(tabIs, changeInfo, tab) {
|
||||
if (changeInfo.url && tab.url.host === changeInfo.url.host) {
|
||||
return;
|
||||
} else {
|
||||
updateState();
|
||||
}
|
||||
}
|
||||
|
||||
/* Required by then */
|
||||
function logError(error) {
|
||||
console.log(`Error: ${error}`);
|
||||
}
|
|
@ -1,205 +0,0 @@
|
|||
Copyright 2019 Ludan Stoecklé
|
||||
Copyright 2015 Forbes Lindesay
|
||||
Copyright 2009-2014 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|