Skip to content

Instantly share code, notes, and snippets.

Created August 25, 2011 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/1170323 to your computer and use it in GitHub Desktop.
Save anonymous/1170323 to your computer and use it in GitHub Desktop.
Real World Haskell の HTML 中に節番号振るヤツ
// ==UserScript==
// @name section_numbers_for_real_world_haskell.js
// @namespace http://yuyat.jp/
// @description Gives section numbers for Real World Haskell book online.
// @include http://book.realworldhaskell.org/read/*
// ==/UserScript==
(function () {
Array.forEach(document.getElementsByClassName('title'), function (e,i) {
if (i > 0) {
e.innerHTML = i + ". " + e.innerHTML;
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment