Difference between revisions of "Template:USTC-Software/script"
Line 3: | Line 3: | ||
USTC.load_css_wiki("style"); | USTC.load_css_wiki("style"); | ||
$("#top_menu_under").remove(); | $("#top_menu_under").remove(); | ||
− | $("# | + | $("#firstHeading").remove(); |
− | $("# | + | var p = $("#mw-content-text > p") |
− | + | p.splice(0, 1); | |
+ | p.remove(); | ||
$("#bodyContent div.visualClear").remove(); | $("#bodyContent div.visualClear").remove(); | ||
USTC.load_css("//fonts.googleapis.com/css?family=Montserrat|Josefin+Sans"); | USTC.load_css("//fonts.googleapis.com/css?family=Montserrat|Josefin+Sans"); |
Revision as of 08:29, 18 September 2015
window.USTC = {}; USTC.init = function() {
USTC.load_css_wiki("style"); $("#top_menu_under").remove(); $("#firstHeading").remove(); var p = $("#mw-content-text > p") p.splice(0, 1); p.remove(); $("#bodyContent div.visualClear").remove(); USTC.load_css("//fonts.googleapis.com/css?family=Montserrat|Josefin+Sans");
}; USTC.load_css = function(name) {
var node = document.createElement("link"); node.rel = "stylesheet"; node.href = name; node.type = "text/css"; document.head.appendChild(node);
}; USTC.load_css_wiki = function(name) {
USTC.load_css("/Template:USTC-Software/" + name + "?action=raw&ctype=text/css");
}; $(USTC.init);