Difference between revisions of "Template:USTC-Software/script.js"

(Created page with "window.USTC = {}; USTC.init = function() { USTC.load_css("//ustc.software/wiki/style.css"); $("#content > h1").remove(); $("#bodyContent > p").remove(); $("#bodyC...")
 
Line 1: Line 1:
 
window.USTC = {};
 
window.USTC = {};
 
USTC.init = function() {
 
USTC.init = function() {
     USTC.load_css("//ustc.software/wiki/style.css");
+
     USTC.load_css("style.css");
 
     $("#content > h1").remove();
 
     $("#content > h1").remove();
 
     $("#bodyContent > p").remove();
 
     $("#bodyContent > p").remove();
Line 7: Line 7:
 
     $("#bodyContent div.visualClear").remove();
 
     $("#bodyContent div.visualClear").remove();
 
};
 
};
USTC.load_css = function(filename) {
+
USTC.load_css = function(name) {
 
     var node = document.createElement("link");
 
     var node = document.createElement("link");
 
     node.rel = "stylesheet";
 
     node.rel = "stylesheet";
     node.href = filename;
+
     node.href = "/Template:USTC-Software/" + name + "?action=raw&ctype=text/css";
 
     node.type = "text/css";
 
     node.type = "text/css";
 
     document.head.appendChild(node);
 
     document.head.appendChild(node);
 
};
 
};
 
$(USTC.init);
 
$(USTC.init);

Revision as of 04:37, 6 August 2015

window.USTC = {}; USTC.init = function() {

   USTC.load_css("style.css");
   $("#content > h1").remove();
   $("#bodyContent > p").remove();
   $("#bodyContent div.printfooter").remove();
   $("#bodyContent div.visualClear").remove();

}; USTC.load_css = function(name) {

   var node = document.createElement("link");
   node.rel = "stylesheet";
   node.href = "/Template:USTC-Software/" + name + "?action=raw&ctype=text/css";
   node.type = "text/css";
   document.head.appendChild(node);

}; $(USTC.init);