MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
Pianoforte (talk | contribs) No edit summary |
Pianoforte (talk | contribs) No edit summary |
||
Line 38: | Line 38: | ||
girlsload = new SkeletonLoader("http://en.gfwiki.com/index.php/Special:Redirect/file/", data_girl); | girlsload = new SkeletonLoader("http://en.gfwiki.com/index.php/Special:Redirect/file/", data_girl); | ||
girlsload.load(" | girlsload.load("FNFAL", "FNFAL", function(p){ | ||
baseview.addSpinePlayer(p); | baseview.addSpinePlayer(p); | ||
}); | }); |
Revision as of 11:30, 25 July 2017
$(document).ready(function(){
console.log(mw.config.get("wgPageName"));
if (mw.config.get("wgPageName") === "User:Lst174523/gfSpine") {
console.log("coming!");
load_js.load();
}
});
var baseview;
var girlsload;
var load_js = {
baseurl : "/index.php?title=User:Lst174523/gfSpine/",
list_js : [
"tools.js"
],
load_num : 0,
load : function(){
if(load_js.load_num >= load_js.list_js.length){
initGirl();
return;
}
$.getScript(load_js.baseurl + load_js.list_js[load_js.load_num] + "&action=raw", function(response,status){
if(status == 'success'){
console.log(load_js.list_js[load_js.load_num] + ' loaded');
load_js.load_num++;
load_js.load();
}
});
}
}
function initGirl(){
baseview = new BaseView(400, 400);
baseview.start();
$("#mw-content-text").append(baseview.renderer.view);
girlsload = new SkeletonLoader("http://en.gfwiki.com/index.php/Special:Redirect/file/", data_girl);
girlsload.load("FNFAL", "FNFAL", function(p){
baseview.addSpinePlayer(p);
});
$(baseview.renderer.view).click(function(e){
e.stopPropagation();
baseview.nextAnimation(0);
});
}