2023-10-22 10:33:19 +00:00
|
|
|
// ==UserScript==
|
|
|
|
// @name Use native HTML color input
|
2023-10-22 10:35:44 +00:00
|
|
|
// @namespace https://sofiaritz.com/
|
2023-10-22 10:33:19 +00:00
|
|
|
// @version 0.1
|
2023-10-22 10:36:46 +00:00
|
|
|
// @source https://git.sofiaritz.com/sofia/forgejo-native-color-input/src/branch/main/userscript.js
|
2023-10-22 10:33:19 +00:00
|
|
|
// @description Replaces minicolors with the native HTML color input
|
|
|
|
// @author Sofía Aritz
|
|
|
|
// @icon https://www.google.com/s2/favicons?sz=64&domain=<YOUR_URL>
|
|
|
|
// @grant none
|
2023-10-22 10:39:52 +00:00
|
|
|
|
|
|
|
// @match https://<YOUR_URL>/*
|
|
|
|
// @match https://codeberg.org/*
|
|
|
|
// @match https://next.forgejo.org/*
|
2023-10-22 10:33:19 +00:00
|
|
|
// ==/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())
|
|
|
|
})();
|