User blog:Benjaminthewill123123/Has anyone else ever considered/used this?

The other day I was thinking about a way to only load scripts that I need on certain namespaces, so... I came up with this. var  Loaded =  '1' ; if ( wgNamespaceNumber == "-1" ) { var Loaded = '0' ; importArticles<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ type<span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">"script" <span class="sy0" style="color:rgb(51,153,51);">, articles<span class="sy0" style="color:rgb(51,153,51);">: <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">"w:c:creepypasta:MediaWiki:AjaxRefresh.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">"w:c:creepypasta:MediaWiki:NoLightBox.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">"w:c:creepypasta:MediaWiki:AJAXRollback.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">"w:c:dev:WHAM/code.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( wgNamespaceNumber <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">"0" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var Loaded <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'0' <span class="sy0" style="color:rgb(51,153,51);">; importArticles<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ type<span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">"script" <span class="sy0" style="color:rgb(51,153,51);">, articles<span class="sy0" style="color:rgb(51,153,51);">: <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">"w:c:creepypasta:MediaWiki:Redlinks.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">"w:c:creepypasta:MediaWiki:AJAXRollback.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">"w:c:creepypasta:MediaWiki:AjaxUndo.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">"w:c:dev:AjaxPatrol/code.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( wgNamespaceNumber <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">"1" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var Loaded <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'0' <span class="sy0" style="color:rgb(51,153,51);">; importArticles<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ type<span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">"script" <span class="sy0" style="color:rgb(51,153,51);">, articles<span class="sy0" style="color:rgb(51,153,51);">: <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">"w:c:dev:Sine/code.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( wgNamespaceNumber <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">"2" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var Loaded <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'0' <span class="sy0" style="color:rgb(51,153,51);">; importArticles<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ type<span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">"script" <span class="sy0" style="color:rgb(51,153,51);">, articles<span class="sy0" style="color:rgb(51,153,51);">: <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">"w:c:dev:AjaxPatrol/code.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">"w:c:creepypasta:MediaWiki:AjaxUndo.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">"w:c:creepypasta:MediaWiki:AJAXRollback.js" <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( wgNamespaceNumber <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">"3" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var Loaded <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'0' <span class="sy0" style="color:rgb(51,153,51);">; importArticles<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ type<span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">"script" <span class="sy0" style="color:rgb(51,153,51);">, articles<span class="sy0" style="color:rgb(51,153,51);">: <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">"w:c:dev:Sine/code.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">"w:c:creepypasta:MediaWiki:AjaxUndo.js" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">"w:c:creepypasta:MediaWiki:AJAXRollback.js" <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( Loaded <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'1' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ alert<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'Script load failure' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} So What I want to know is if there is anything else I should be doing with this? (other than adding the other namespaces)