Created
January 9, 2020 15:25
-
-
Save janssens/31c75d23327da7f25104d4193eca7458 to your computer and use it in GitHub Desktop.
DarkThemeDeepinBehaviorFix UserScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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