FANDOM


(Created page with "The RuneScape Wiki appears to use a custom script to import all of their other scripts. Even if you did copy the entire Common.js, I don't think it would work as they are dire...")
 
 
Line 15: Line 15:
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
  +
-----
  +
Edit:
  +
  +
Although, generally, the best solution is to just copy the JS/CSS to your wiki. Then you are just dealing with local scripts instead of scripts hosted by another wiki.

Latest revision as of 22:52, May 31, 2020

The RuneScape Wiki appears to use a custom script to import all of their other scripts. Even if you did copy the entire Common.js, I don't think it would work as they are directly using AJAX requests which do not recognize the the "u:domain" format for interwiki imports. Plus, you would be importing way more than just the calculator. I suggest the following.

if ($(".jcConfig").length) {
    importArticles({
        type: "script",
        articles: [
            "u:runescape:Common.js/calc.js"
        ]
    }, {
        type: "style",
        articles: [
            "u:runescape:Common.css/calc.css"
        ]
    });
}

Edit:

Although, generally, the best solution is to just copy the JS/CSS to your wiki. Then you are just dealing with local scripts instead of scripts hosted by another wiki.

Community content is available under CC-BY-SA unless otherwise noted.