Skip to content

Instantly share code, notes, and snippets.

@tggreene
Created April 5, 2022 10:46
Show Gist options
  • Save tggreene/9f370ac6616fee10ff0df616347f707f to your computer and use it in GitHub Desktop.
Save tggreene/9f370ac6616fee10ff0df616347f707f to your computer and use it in GitHub Desktop.
TamperMonkey Scittle
// ==UserScript==
// @name <name>
// @namespace http://tampermonkey.net/
// @version 0.1
// @description <description>
// @author You
// @match <match>
// @require https://cdn.jsdelivr.net/npm/scittle@0.1.2/dist/scittle.js
// @resource cljs file:///path/to/some.cljs
// @grant GM_getResourceText
// @run-at document-body
// ==/UserScript==
(function() {
'use strict';
const script = GM_getResourceText('cljs');
var scriptTag = document.createElement('script');
scriptTag.type = 'application/x-scittle';
scriptTag.appendChild(document.createTextNode(script));
document.body.append(scriptTag);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment