Skip to content

Instantly share code, notes, and snippets.

@suchi
Created April 5, 2012 08:04
Show Gist options
  • Save suchi/2308894 to your computer and use it in GitHub Desktop.
Save suchi/2308894 to your computer and use it in GitHub Desktop.
FreeStyle Wiki Permlinker
// ==UserScript==
// @name FreeStyleWiki PermLinker
// @namespace http://www.suchi.org/
// @version 0.2
// @description add permlink dagger
// ==/UserScript==
var a = document.querySelectorAll('h2>a,h3>a,h4>a');
for(i = 0; i < a.length; i++) {
h = a[i].parentNode;
dag = d.createElement('a');
dag.classList.add('anchor_super');
dag.innerHTML = "&dagger;";
dag.href = '#' + a[i].name;
h.appendChild(dag);
} void(0)
@suchi
Copy link
Author

suchi commented Apr 12, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment