Last active
September 21, 2022 10:42
-
-
Save luetage/7e7a0a6e781550fec30274c46e09ae1b to your computer and use it in GitHub Desktop.
Show default cursor over website text. Fork/copy of the Opera add-on ☛ https://addons.opera.com/en/extensions/details/cursoradjust/ created by Christoph142.
This file contains 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 CursorAdjust | |
// @namespace https://gist.github.com/luetage/7e7a0a6e781550fec30274c46e09ae1b | |
// @updateURL https://gist.github.com/luetage/7e7a0a6e781550fec30274c46e09ae1b/raw | |
// @description Show default cursor over website text. | |
// @version 2022.9.0 | |
// @author Christoph142, luetage | |
// @match <all_urls> | |
// ==/UserScript== | |
(function () { | |
"use strict"; | |
const css = ` | |
body { | |
cursor: default; | |
} | |
[contenteditable] { | |
cursor: text; | |
} | |
`; | |
const inject = () => { | |
const style = document.createElement("style"); | |
style.id = "usrjs-cursor-adjust"; | |
style.innerHTML = css; | |
document.getElementsByTagName("head")[0].appendChild(style); | |
}; | |
inject(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment