Created
May 7, 2024 04:38
-
-
Save SoCuul/b1f9f2ed48cb55938c25897a54453440 to your computer and use it in GitHub Desktop.
Linkwarden Colour Theming
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 Linkwarden Colour Theming | |
| // @namespace com.socuul.linkwarden_colour_theming | |
| // @version 0.0.1 | |
| // @description | |
| // @author SoCuul | |
| // @match http://yourlinkwardeninstance.com/* | |
| // @match https://yourlinkwardeninstance.com/* | |
| // @icon https://www.google.com/s2/favicons?domain=https://linkwarden.app&sz=128 | |
| // @grant GM_addStyle | |
| // ==/UserScript== | |
| (function() { | |
| const accentHue = 'choose any number from 0-360' | |
| GM_addStyle(` | |
| :root { | |
| --p: 0.499982 0.11929 ${accentHue} !important; | |
| } | |
| @media (prefers-color-scheme:dark) { | |
| :root { | |
| --p: 0.827586 0.101277 ${accentHue} !important; | |
| } | |
| [data-theme=light] { | |
| --p: 0.499982 0.11929 ${accentHue} !important; | |
| } | |
| :root:has(input.theme-controller[value=light]:checked) { | |
| --p: 0.499982 0.11929 ${accentHue} !important; | |
| } | |
| [data-theme=dark] { | |
| --p: 0.827586 0.101277 ${accentHue} !important; | |
| } | |
| :root:has(input.theme-controller[value=dark]:checked) { | |
| --p: 0.827586 0.101277 ${accentHue} !important; | |
| } | |
| `) | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment