minetest_modding_book/static/script.js

20 lines
466 B
JavaScript
Raw Normal View History

// @license magnet:?xt=urn:btih:90dc5c0be029de84e523b9b3922520e79e0e6f08&dn=cc0.txt CC0
// This script is licensed under CC0
2015-01-01 20:05:03 +03:00
$(function() {
2015-01-01 20:14:18 +03:00
$("#printable").click(function() {
$("body").addClass("printable");
});
2015-01-01 20:05:03 +03:00
return $("h2, h3, h4, h5, h6").each(function(i, el) {
var $el, icon, id;
$el = $(el);
id = $el.attr('id');
if (id) {
return $el.prepend($("<a />").addClass("header-link").attr("href", "#" + id).html("#"));
}
});
});
// @license-end