White background replacer

Replaces the background white color with a darker one in order to decrease eye strain

Aquí están todas las versiones de este script. Mostrar únicamente las versiones en las que hubo cambios de código.

  • v2.24 16/03/2024

    - feat: better handling of global backgrounds

  • v2.23 15/03/2024

    - Fix sending Boolean to isWhite()

  • v2.22 14/03/2024
  • v2.21 11/03/2024

    - Better error handling
    - Fix modification of computed style

  • v2.20 07/03/2024

    - Fix bad handling of style properties.

  • v2.19 06/03/2024

    - Fixed detection of transparent background as white

  • v2.18 26/02/2024

    - Fix wrong background color detection

  • v2.17 25/02/2024

    - Fix bug causing color change always

  • v2.16 23/02/2024

    - Refactor of known background variables. You may add new ones to the knownVarNames array.

  • v2.15 06/02/2024

    - Better error handling

  • v2.14 06/02/2024

    - Fix not changing global background color

  • v2.13 04/02/2024

    - Support for HSLA color format added
    - Changed colors are now a bit transparent

  • v2.12 09/01/2024

    Better detection; Darker and less chromatic colors;

  • v2.11 27/09/2023

    - Commented debug logs, uncomment for debugging purposes.

  • v2.10 03/09/2023

    - Reversing zero-alpha-channel-background detection as it had unwanted effects on some web sites.

  • v2.9 30/08/2023

    - Re-implemented alpha detection to detect invisible black backgrounds.

  • v2.8 30/08/2023

    - Removed low alpha detection as it had unexpected results.

  • v2.7 30/08/2023

    - Changing #content css selector to body.
    - Detect low alpha values for background.

  • v2.6 25/08/2023

    Handle no rules access: Inserting new style element.

  • v2.5 24/08/2023

    Trying to use getComputedStyle for the document first.

  • v2.4 31/01/2023

    Detecting HSL color values.
    Detecting CSS variables.

  • v2.3 11/11/2022
    • Detection of any bright color not just absolute white.
    • Using appropriate log levels.
  • v2.1 09/11/2022
  • v2.0 09/11/2022
  • v2.0 09/11/2022

    In this major release:

    • Compacted code and made it more general.
    • Automatically changes color periodically to prevent eye fatigue.
  • v1.3 02/11/2022

    Deprecated CSSRule.type was removed.
    @include directive was replaced by @match.
    One of colors was changed to be a bit darker.

  • v1.2 06/09/2019
  • v1.2 26/04/2019 Added log source note; Check if style property exists in rules before accessing it;
  • v1.1 26/04/2019 Don't place a color when BG is undefined; Change text color if it is the same as BG;
  • v1.0 25/04/2019
  • v1.0 25/04/2019 Refactored the code and removed BG image checks.
  • v0.9 04/01/2019 Added image check for all CSSRule types;
  • v0.8 04/01/2019 Removed parent iteration; Makes sure no BG images;
  • v0.7 24/12/2018 Delaying the execution to make sure other scripts are run; Looking for images when checking if a style is having or is inheriting a background
  • v0.6 22/12/2018 Looks into parent CSSRules to see if a color is set
  • v0.6 22/12/2018 Looks into parent CSSRules to see if a color is set
  • v0.5 12/10/2018 Aded support for importRule
  • v0.4 10/10/2018 Can see if cssRule is style
  • v0.2.1 10/10/2018 One of "document.body"s was a rule
  • v0.2 07/10/2018
  • v0.1 18/05/2018