Skip to content

Instantly share code, notes, and snippets.

@j-f1
Last active August 8, 2018 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-f1/91a99c3989aa6c38ee1fcabb67a0f428 to your computer and use it in GitHub Desktop.
Save j-f1/91a99c3989aa6c38ee1fcabb67a0f428 to your computer and use it in GitHub Desktop.
Temporarily install various Charcoal userscripts on a chat page

Usage

Visit Charcoal HQ, then:

In your browser console:

$.getScript('https://rawgit.com/j-f1/91a99c3989aa6c38ee1fcabb67a0f428/raw/install-charcoal-scripts.js')

Alternatively, add this bookmarklet:

javascript:void%20function(){$.getScript(%22https://rawgit.com/j-f1/91a99c3989aa6c38ee1fcabb67a0f428/raw/install-charcoal-scripts.js%22)}();

(I’d make this into a link to install via drag-and-drop, but GitHub Gist removes javascript: links for security reasons)

load(
'https://charcoal-se.org/userscripts/vendor/debug.min.js',
[
'https://cdn.rawgit.com/joewalnes/reconnecting-websocket/fd7c819bb15eeee3452c17e317c0a3664c442965/reconnecting-websocket.min.js',
'https://charcoal-se.org/userscripts/autoflagging/autoflagging.user.js'
],
'https://charcoal-se.org/userscripts/fire/fire.user.js',
[
'https://charcoal-se.org/userscripts/vendor/actioncable.min.js',
'https://charcoal-se.org/userscripts/sds/sds.user.js'
]
)
// hack for FIRE:
window.GM_info = {
'Feedback Instantly, Rapidly, Effortlessly': {
version: '1.0.30',
downloadURL: 'https://charcoal-se.org/userscripts/fire/fire.user.js'
}
}
function load(script, ...children) {
$.getScript(script, () => {
for (const child of children) {
if (Array.isArray(child)) {
load(...child)
} else {
$.getScript(child)
}
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment