Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// ==UserScript==
// @name Explain XKCD
// @namespace
// @version 1
// @description just add explain button
// @author Ilgiz Magazov
// @match*
// @grant none
// ==/UserScript==
$('.comicNav').each(function(index) {
var btn = '<a rel="answer" href="' + document.location.pathname + '" accesskey="e">Explain</a>';
var li = document.createElement('li');
li.innerHTML = btn;
this.insertBefore(li, this.children[3]);

This comment has been minimized.

Copy link

ooker777 commented Apr 18, 2017

It's not working. I have changed all http to https but it doesn't help. I'm on the latest Firefox on Windows 7.


This comment has been minimized.

Copy link

utkuerd commented Oct 14, 2017

Add below line to header to get jQuery

// @require

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.