Last active
November 22, 2025 05:55
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 Fix Selection Background in Dark Theme on Greasy Fork for Firefox on Android | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Changes the text selection background color in Dark Theme on Firefox for Android to the same color as Chrome. | |
| // @match https://greasyfork.org/* | |
| // @grant GM_addStyle | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org | |
| // @run-at document-start | |
| // @license MIT | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| const isDarkModePreferred = window.matchMedia('(prefers-color-scheme: dark)').matches; | |
| if (isDarkModePreferred) { | |
| const css = ` | |
| ::selection { | |
| background-color: #336298 !important; | |
| } | |
| ::-moz-selection { | |
| background-color: #336298 !important; | |
| } | |
| `; | |
| GM_addStyle(css); | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment