Thread:The Zog./@comment-25653892-20150317054137

So I would like your help with some Javascript or other.

Over at my own wiki I'm trying to make a script that will change the site background to a solid hue on wiki-related pages, but leave it be on user- and thread-related pages. I am trying to go about this by, on a technical level, adding  CSS for   based on the presence of certain namespace strings in the page's URL. I am pretty much a complete newb at Js tho, so no dice, even after a zillionth edit, a zillionth google, and a zillionth clearing the caches for the zillionth time. Please help me master ;(

Here's the script I've slapped together. It is inserted at MediaWiki/Wikia.js if that makes any difference. If you can notice, and help me iron out, any well-camoflauged (for me at least) bugs in the code, then, uh… do dat. pls.

if(document.URL.indexOf(":") !> 0) { $(document).ready(function {       document.getElementById("WikiaSiteWrapper").style.background="#0064de";    }) }; if(document.URL.indexOf("Talk") > 0) { $(document).ready(function {       document.getElementById("WikiaSiteWrapper").style.background="#0064de";    }) }; if(document.URL.indexOf("Template") > 0) { $(document).ready(function {       document.getElementById("WikiaSiteWrapper").style.background="#0064de";    }) }; if(document.URL.indexOf("Category") > 0) { $(document).ready(function {       document.getElementById("WikiaSiteWrapper").style.background="#0064de";    }) };

In the more-than-likely case that you find yourself facepalming at my stupidity, Mr. Wiki McCoder, I'll remind you in advance that I am a useless, oblivious idiot at Javascript, so sorry for wasting your time if you feel that I am doing so, and sorry in addition for making this a run-on sentence, this really is not easy thing to do senpai 