Forum:Load a script only on one page

Hi,

I ported a script, as well as parts of jQuery UI elements to the Dead Frontier Wiki to be used on this page. Unfortunately, when imported to Common.js, these scripts seem to be in conflict with the "Visual Mode" in the editor window, which is stuck on the "Loading..." message. My question is: is there a way for a script/function to be loaded only on a particular page? — Sovq 07:29, October 20, 2011 (UTC)


 * Tried the simple if solution?

if (wgPageName == "Stat_Calculator") { importScript(...); //Or whatever }
 * - Tjcool007 (Talk) 08:30, October 20, 2011 (UTC)


 * Thanks, was just about to write that I found a similar solution. Yours looks better though, thanks. — Sovq 09:15, October 20, 2011 (UTC)