Skip to content

Instantly share code, notes, and snippets.

@luetage
Last active September 21, 2022 10:42
Show Gist options
  • Save luetage/7e7a0a6e781550fec30274c46e09ae1b to your computer and use it in GitHub Desktop.
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.
// ==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