Skip to content

Instantly share code, notes, and snippets.

@wildmichael
Created July 4, 2017 14:59
Show Gist options
  • Save wildmichael/e75ddda638060e10495603a8beb0aef9 to your computer and use it in GitHub Desktop.
Save wildmichael/e75ddda638060e10495603a8beb0aef9 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name xkcd display alt text
// @namespace http://www.xkcd.com/themiwi
// @include https://xkcd.com/*
// @version 1
// @grant none
// @require https://code.jquery.com/jquery-3.2.1.slim.min.js
// ==/UserScript==
(function () {
var img = $('#comic > img');
img.wrap('<figure id=\'figure\'></figure>');
img.after('<figcaption>' + img.attr('title') + '</figcaption>');
}) ();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment