Skip to content

Commit

Permalink
Merge branch 'manifestv2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Eliastik committed Mar 6, 2023
2 parents 5b0d4fe + b7b47c8 commit 5c506da
Show file tree
Hide file tree
Showing 27 changed files with 1,293 additions and 603 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

## Changelog:

## Version 2.10.3 (3/5/2023) :

* Major improvement of the display when the function Preserve element colors is enabled with the function Increase contrast: display problems could occur, they have been fixed. The Color preservation function is now enabled by default for new installations;
* In case some important permissions for the extension are not allowed, an alert is now displayed on the popup suggesting to allow them;
* Small adjustments to the user interface: elements have been made more rounded, other adjustments have been made;
* The warning that appears when exiting/refreshing the Advanced Settings page now only appears if unsaved changes have been made;
* Changes in preparation for the release of the Manifestv3 API-based version for Firefox (this version still runs on Manifestv2 for this browser, the MV3-based version will be released later);
* Bug fixes and technical improvements:
* Fixed a bug when displaying some settings in the popup;
* Fixed a rare bug that prevented the popup from scrolling in some cases, especially in case of low screen resolution, under Firefox;
* Fixed the text color of the Increase contrast function that was not applied to the placeholders of the input elements;
* Fixed a random bug that caused requests to automatically update filters to occur multiple times, unnecessarily;
* The exchange of page URLs between content script/background service worker is now done using the SHA-256 hash, for privacy reasons;
* Fixed the display of the Readme file in Firefox when the dark mode of the interface is enabled;
* Updated dependencies.

### Version 2.10.2 (11/1/2022) :

* Migration to Manifest v3 API (Chrome/Edge/Opera versions only). The impacts on the features of Page Shadow are very minor:
Expand Down Expand Up @@ -336,6 +352,22 @@

## Journal des changements :

## Version 2.10.3 (05/03/2023) :

* Amélioration majeure de l'affichage lorsque la fonction Conserver les couleurs des éléments est activée avec la fonction Augmenter le contraste : des problèmes d'affichage pouvaient se produire, ils ont été corrigés. La fonction de préservation des couleurs est donc activée par défaut pour les nouvelles installations ;
* Dans le cas où certaines permissions importantes pour le fonctionnement de l'extension ne sont pas autorisées, une alerte s'affiche désormais sur la popup proposant de les autoriser ;
* Petits ajustements de l'interface utilisateur : les éléments ont été rendus plus arrondis, d'autres ajustements ont été effectués ;
* L'avertissement s'affichant si on quitte/actualise la page des Paramètres avancés ne s'affiche désormais que si des modifications non enregistrées ont été effectuées ;
* Modifications préparant la sortie de la version basée sur l'API Manifestv3 pour Firefox (cette version fonctionne encore sous Manifestv2 pour ce navigateur, la sortie de la version se basant sur MV3 se fera plus tard) ;
* Corrections de bugs et améliorations techniques :
* Correction d'un bug lors de l'affichage de certains paramètres dans la popup ;
* Correction d'un bug rare empêchant le défilement de la popup dans certains cas, notamment en cas de résolution d'écran faible, sous Firefox ;
* Correction de la couleur du texte de la fonction Augmenter le contraste qui n'était pas appliquée aux placeholders des éléments input ;
* Correction d'un bug aléatoire qui faisait que les requêtes mettant à jour de manière automatique les filtres se faisaient parfois de multiples fois, de manière inutile ;
* L'échange de l'URL des pages entre content script/background service worker s'effectue désormais en utilisant le hash SHA-256, pour des raisons de confidentialité ;
* Correction de l'affichage du fichier Lisez-moi sous Firefox lorsque le mode sombre de l'interface est activé ;
* Mise à jour des dépendances.

### Version 2.10.2 (01/11/2022) :

* Migration vers l'API Manifest v3 (versions Chrome/Edge/Opera uniquement). Les impacts sur les fonctionnalités de Page Shadow sont très mineurs :
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<img src="https://raw.githubusercontent.com/Eliastik/page-shadow/master/screen.png" width="300" alt="Page Shadow" /> <img src="https://raw.githubusercontent.com/Eliastik/page-shadow/master/screen_2.png" width="300" alt="Page Shadow" />

An extension by Eliastik (eliastiksofts.com) - Contact : http://www.eliastiksofts.com/contact/
* Latest version: 2.10.2 (11/1/2022)
* Latest version: 2.10.3 (3/5/2023)
* Official website: http://eliastiksofts.com/page-shadow
* Github repository: https://github.com/Eliastik/page-shadow

Expand Down Expand Up @@ -85,7 +85,7 @@ Page Shadow is distributed under GPL-3.0 license (see LICENCE.txt file)

#### License notice

Copyright (C) 2015-2022 Eliastik (eliastiksofts.com)
Copyright (C) 2015-2023 Eliastik (eliastiksofts.com)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -113,7 +113,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<img src="https://raw.githubusercontent.com/Eliastik/page-shadow/master/screen_fr.png" width="300" alt="Page Shadow" /> <img src="https://raw.githubusercontent.com/Eliastik/page-shadow/master/screen_fr_2.png" width="300" alt="Page Shadow" />

Une extension by Eliastik (eliastiksofts.com) - Contact : http://www.eliastiksofts.com/contact/
* Version actuelle : 2.10.2 (01/11/2022)
* Version actuelle : 2.10.3 (05/03/2023)
* Site officiel : http://eliastiksofts.com/page-shadow
* Dépôt Github : https://github.com/Eliastik/page-shadow

Expand Down Expand Up @@ -194,7 +194,7 @@ Page Shadow est distribué sous licence GNU GPL-3.0 (voir le fichier LICENCE.txt

#### Avis de licence

Copyright (C) 2015-2022 Eliastik (eliastiksofts.com)
Copyright (C) 2015-2023 Eliastik (eliastiksofts.com)

Ce programme est un logiciel libre ; vous pouvez le redistribuer ou le
modifier suivant les termes de la GNU General Public License telle que
Expand Down
12 changes: 8 additions & 4 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,20 @@ This is a roadmap/to-do list of things that are planned to be fixed or developed

#### Planned

* [ ] Manifestv3 for Firefox
* [ ] Display an information popup to inform users to allow the permission "Access data on all websites" for the extension to work properly
* [x] Manifestv3 for Firefox
* [x] Display an information popup to inform users to allow the permission "Access data on all websites" for the extension to work properly
* [ ] Tests
* [x] Only display confirmation on Advanced settings page reload/exit when a change of the settings is unsaved (uses existing code for displaying icon)
* [x] Use SHA-256 to exchange URLs between background script and content script

#### Bugs

* [x] (Medium) Fix Preserve bright color white text on white background/black text on black background
* Similar to the issue of wrong background detection
* [x] (Minor) When using the Modern popup theme, if the features Invert colors or Blue light reduction filter are not enabled, when opening the options of these features, the options displayed are not the stored options (no checkbox checked, default color temperature)
* [x] (Medium) Fix displaying of settings with the popup theme "Modern"
* [x] (Minor) User bug: button to validate the hour of auto enable/disable (popup) for the extension is not displayed and it's not possible to scroll to access it (only on Firefox)
* [x] (Minor) Page Shadow filters: seem to flood HEAD request

### Futures versions

Expand Down Expand Up @@ -118,9 +123,8 @@ This is a roadmap/to-do list of things that are planned to be fixed or developed

#### Known issues/bugs

* [ ] (Medium) Fix Preserve bright color white text on white background/black text on black background
* Similar to the issue of wrong background detection
* [ ] (Minor) Issues with Shadow DOM: Google Earth broken with "Increase page contrast" mode -> fixed by disabling auto override with filter rules ; to definitely fix: detection of transparent backgrounds in Shadow Roots
* [ ] (Minor) Filter: disable class for matched filter on an element but no longer matched following changes in the element
* [ ] (Minor) Ignore get parameters (after ? character) in URL for preset list and whitelist/blacklist list ?
* [ ] (Minor) Sometimes when opening custom themes settings, the link color of the custom theme 1 is copied to the text color randomly + edit icon displayed
* [ ] (Minor) Bug with error in filters: open errors from a built-in filter, then the errors from custom filter: the window will be blank
151 changes: 151 additions & 0 deletions gulpfile.2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
"use strict";

const gulp = require("gulp");
const clean = require("gulp-clean");
const cleanCss = require("gulp-clean-css");
const less = require("gulp-less");
const zip = require("gulp-zip");
const webpack = require("webpack-stream");
const rename = require("gulp-rename");
const compiler = require("webpack");
const eslint = require("eslint-webpack-plugin");
const plumber = require("gulp-plumber");

let currentMode = "development";

const zipTimestamp = new Date(2022, 10, 1);

gulp.task("set-prod-mode", () => {
currentMode = "production";
return gulp.src("./");
});

gulp.task("clean", () => {
return gulp.src("./build/*", {read: false})
.pipe(clean());
});

gulp.task("clean-directories", () => {
gulp.src("./build/chrome/*", {read: false})
.pipe(clean());
gulp.src("./build/edge/*", {read: false})
.pipe(clean());
gulp.src("./build/firefox/*", {read: false})
.pipe(clean());
return gulp.src("./build/global/*", {read: false})
.pipe(clean());
});

gulp.task("copy-global", () => {
return gulp.src(["./src/**", "!./src/img/src/**", "!./src/js/*.js", "!./src/img/icon_old.png", "!./src/img/icon_chrome.png", "!./src/css/src/**", "!./src/css/*.less", "!./src/css/content_old.css", "!./src/js/utils/**"])
.pipe(gulp.dest("./build/global/"));
});

gulp.task("compile-less", () => {
return gulp.src("./src/css/*.less")
.pipe(less())
.pipe(gulp.dest("./build/global/css/"));
});

gulp.task("compress-css", () => {
return gulp.src("./build/global/css/*.css")
.pipe(cleanCss())
.pipe(gulp.dest("./build/global/css/"));
});

gulp.task("compile-js", () => {
return gulp.src("./src/js/*.js")
.pipe(webpack({
entry: {
background: "./src/js/background.js",
options: "./src/js/options.js",
pageTest: "./src/js/pageTest.js",
popup: "./src/js/popup.js",
content: "./src/js/content.js"
},
output: {
filename: "./[name].js",
},
mode: currentMode,
devtool: currentMode != "production" ? "inline-source-map" : false,
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|libs)/,
use: {
loader: "babel-loader"
}
},
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /\.(woff(2)?|ttf|eot)$/,
type: "asset/resource",
generator: {
filename: "../webfonts/[name][ext]",
},
},
{
test: /\.(eot|ttf|svg)(\?.*$|$)/,
use: ["raw-loader", "ignore-loader"]
},
]
},
optimization: {
splitChunks: {
chunks(chunk) {
return chunk.name !== "background" && chunk.name !== "content";
},
name: "shared"
}
},
plugins: [new eslint()]
}, compiler))
.pipe(plumber())
.pipe(gulp.dest("./build/global/js/"));
});

gulp.task("copyChrome", () => {
return gulp.src(["./build/global/**", "./manifests/chrome/**/*", "!./build/global/css/content_invert_firefox.css"])
.pipe(gulp.dest("./build/chrome/"));
});

gulp.task("copyFirefox", () => {
return gulp.src(["./build/global/**", "./manifests/firefox/**/*", "!./build/global/css/content_invert_firefox.css", "!./build/global/css/content_invert.css"])
.pipe(gulp.dest("./build/firefox/"));
});

gulp.task("copyFirefoxContentCSS", () => {
return gulp.src("./build/global/css/content_invert_firefox.css")
.pipe(rename("content_invert.css"))
.pipe(gulp.dest("./build/firefox/css/"));
});

gulp.task("build", () => {
const manifestChrome = require("./manifests/chrome/manifest.json"),
distFileName = manifestChrome.name + " v" + manifestChrome.version;
return gulp.src("build/firefox/**/**/*")
.pipe(zip(distFileName + " Firefox.zip", { compress: true, modifiedTime: zipTimestamp }))
.pipe(gulp.dest("./build"));
});

gulp.task("watch", () => {
gulp.watch(["src/js/*.js", "src/js/utils/*.js", "src/css/*.css", "src/css/*.less", "src/locales/**/*.json", "src/*.html", "src/*.txt", "manifests/**/*.json"], gulp.series("build-directory-dev"));
});

gulp.task("build-directory-dev", gulp.series("clean", "copy-global", "compile-less", "compile-js", "copyChrome", "copyFirefox", "copyFirefoxContentCSS"));

gulp.task("build-directory-prod", gulp.series("set-prod-mode", "clean", "copy-global", "compile-less", "compile-js", "compress-css", "copyChrome", "copyFirefox", "copyFirefoxContentCSS"));

gulp.task("build-prod", gulp.series("build-directory-prod", "build", "clean-directories"));

gulp.task("clean-build", gulp.series("clean"));

gulp.task("default", gulp.series("build-prod"));

gulp.task("build", gulp.series("build-prod"));

gulp.task("build-dev", gulp.series("build-prod"));
2 changes: 1 addition & 1 deletion manifests/chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Page Shadow",
"version": "2.10.2",
"version": "2.10.3",
"default_locale": "en",
"manifest_version": 2,
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion manifests/firefox/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Page Shadow",
"version": "2.10.2",
"version": "2.10.3",
"default_locale": "en",
"manifest_version": 2,
"icons": {
Expand Down
Loading

0 comments on commit 5c506da

Please sign in to comment.