Skip to content

Instantly share code, notes, and snippets.

@janssens
Created January 9, 2020 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janssens/31c75d23327da7f25104d4193eca7458 to your computer and use it in GitHub Desktop.
Save janssens/31c75d23327da7f25104d4193eca7458 to your computer and use it in GitHub Desktop.
DarkThemeDeepinBehaviorFix UserScript
// ==UserScript==
// @name DarkThemeDeepinBehaviorFix
// @description Firefox clean behavior while using Deepin dark theme
// @version 1
// @author Gaëtan JANSSENS
// @include *
// @icon https://www.linuxinsider.com/ai/671878/linux-distro-international.jpg
// @run-at document-end
// @grant none
// ==/UserScript==
// [1] skip all iframe
if (window.self!=window.top) {return}
// create element
function ce(n) { return document.createElement(n); } // end of function
// add style
function addStyle(css) {
var head = document.head || document.getElementsByTagName('head')[0];
if (head) {
var style = ce("style");
style.type = "text/css";
style.appendChild(document.createTextNode(css));
head.appendChild(style);
} // end if
} // end of function
let s='textarea{ background-color: white; }';
s+='input,textarea{ color: black }';
addStyle(''+s);
console.log(''+s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment