I don't like github's online text editor. It messes up with my vimium's key bindings.
I wrote this snippet for Tampermonkey (you can trim the outer boilerplace and just paste it into console).
This snippet changes the textview so that it would not allow to place a cursor inside of it.
The downside is that you can't click on the symbols but I only want to see the code when I browse.
Edit: Also the scroll using vimium is lagging. The regular arrow and pgup/pgdn scroll doesn't lag... but still... There are too many unneeded elements under that text view. It's just text... whyyy
// ==UserScript==
// @name GitHub disable text editing
// @namespace
// @version 0.1
// @description try to take over the world!
// @author You
// @match
// @icon
// @grant none
// ==/UserScript==
(function() {
'use strict';
function disableTextViews() {
Array.from(document.querySelectorAll("#read-only-cursor-text-area")).forEach(e => {
if (!e.disabled) {
e.disabled = true;
e.style.cursor = "text";
}
})
}
//
const MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
var observer = new MutationObserver(function(mutations, observer) {
disableTextViews()
});
observer.observe(document, {
subtree: true,
attributes: true
});
})(); How do you get Conjure working on Clojure code fences in markdown files? I'd like to be able to eval code in my Clerk notebooks which use the .md extension.