Created
March 5, 2023 00:36
-
-
Save instance-id/a23f1e001bbc0c8744c9cf7627db805d to your computer and use it in GitHub Desktop.
Disables CodeMirror editor in Gists so you can use FireNvim
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 Github Gist - Hide CodeMirror for Firenvim | |
// @namespace Violentmonkey Scripts | |
// @match https://gist.github.com/* | |
// @run-at document-start | |
// @version 1.0 | |
// @author instance.id | |
// @description Hide CodeMirror for Firenvim | |
// ==/UserScript== | |
// ==UserScript== | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
let cmParent = 'div.commit-create.position-relative' | |
let codeMirror = 'div div.CodeMirror.cm-s-github-light' | |
let textArea = 'div textarea.form-control.file-editor-textarea.js-blob-contents.js-code-textarea' | |
function delayedQuery() { | |
let q1 = document.querySelector(cmParent).querySelector(codeMirror).setAttribute("style", "display: none;") | |
let q2 = document.querySelector(textArea).setAttribute("style", "display: flex;") | |
} | |
setTimeout(delayedQuery, 300) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment