Skip to content

Instantly share code, notes, and snippets.

@syoichi
Forked from cherenkov/fsplinker.user.js
Created April 12, 2012 09:19
Show Gist options
  • Save syoichi/2365793 to your computer and use it in GitHub Desktop.
Save syoichi/2365793 to your computer and use it in GitHub Desktop.
add permlink dagger
// ==UserScript==
// @name FreeStyleWiki PermLinker
// @namespace http://www.suchi.org/
// @version 0.2
// @description add permlink dagger
// ==/UserScript==
Array.prototype.forEach.call(
document.querySelectorAll('h2 > a[name], h3 > a[name], h4 > a[name]'),
function addAnchor(link) {
link.parentNode.insertAdjacentHTML(
'BeforeEnd',
'<a class="anchor_super" href="#' + link.name + '">&dagger;</a>'
);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment