blob: 89f1989dc3b61a2911caf67603f019e1e7c50d06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// ==UserScript==
// @name Fix Input Dark Theme
// @author Jesús E. & Enmanuel E.
// @namespace fixForMyDarkTheme
// @description Scan all inputs and add a inherit color option for not blind inputs in your dark theme
// @homepageURL https://git.sr.ht/~heckyel/book/blob/master/scripts-greasemonkey
// @include *
// @grant none
// @version 0.0.2
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
// ==/UserScript==
/* jshint esversion: 6 */
function fixForMyDarkTheme(){
const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
const name = GM_info.script.name;
const version = GM_info.script.version;
const log = (...args) => console.log('%cUSERSCRIPT | %s %s | %s', consoleCSS, name, version, ...args);
log('successfully initialized');
let i, inputs;
inputs = document.getElementsByTagName('input');
for (i = 0; i < inputs.length; i++) {
inputs[i].style.color='inherit';
log('fixed input');
}
}
fixForMyDarkTheme();
// ohm ... m(-_-)m ... thanks
|