Add userscript
This commit is contained in:
parent
ebd4a2d0bb
commit
fb8514b1fc
22
userscript.js
Normal file
22
userscript.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
// ==UserScript==
|
||||||
|
// @name Use native HTML color input
|
||||||
|
// @namespace http://sofiaritz.com/
|
||||||
|
// @version 0.1
|
||||||
|
// @description Replaces minicolors with the native HTML color input
|
||||||
|
// @author Sofía Aritz
|
||||||
|
// @match https://<YOUR_URL>/*
|
||||||
|
// @icon https://www.google.com/s2/favicons?sz=64&domain=<YOUR_URL>
|
||||||
|
// @grant none
|
||||||
|
// ==/UserScript==
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
Array.from(document.getElementsByClassName("minicolors-input")).forEach(v => {
|
||||||
|
v.type = "color"
|
||||||
|
v.classList = []
|
||||||
|
})
|
||||||
|
|
||||||
|
Array.from(document.getElementsByClassName("minicolors-swatch")).forEach(v => v.remove())
|
||||||
|
Array.from(document.getElementsByClassName("precolors")).forEach(v => v.remove())
|
||||||
|
})();
|
Loading…
Reference in a new issue