Greasy Fork is available in English.

Invert colors

Invert Colors

// ==UserScript==
// @name         Invert colors
// @namespace    -
// @version      1.0
// @description  Invert Colors
// @icon         https://i.imgur.com/hS3gXVD.gif
// @author       LongName
// @match        https://agarpowers.xyz/
// @match        https://flarex.fun/
// @match        https://agma.io/
// @grant        none
// ==/UserScript==
(function () {
  const style = "html {-webkit-filter: invert(100%); -moz-filter: invert(100%); -o-filter: invert(100%); -ms-filter: invert(100%); }";
  const head = document.getElementsByTagName("head")[0];
  const styleTag = document.createElement("style");

  if (window.counter) {
    window.counter++;
    if (window.counter % 2 === 0) {
      style = "html {-webkit-filter: invert(0%); -moz-filter: invert(0%); -o-filter: invert(0%); -ms-filter: invert(0%); }";
    }
  } else {
    window.counter = 1;
  }

  styleTag.type = "text/css";
  if (styleTag.styleSheet) {
    styleTag.styleSheet.cssText = style;
  } else {
    styleTag.appendChild(document.createTextNode(style));
  }
  head.appendChild(styleTag);
}());