Popular Vulnerable Code

Nails

I like Nine Inch Nails,and I like hip-hop.
-Axl Rose

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
if(window.location.href.indexOf("?") > -1){
var str = window.location.href.substr(window.location.href.indexOf("?")+1).split(/#/);
var ary  = str[0].split(/&/);
for(var i=0; i<ary.length; i++){
var split = ary[i].split(/=/),
key = split[0],
value = split[1];
switch(key){
case "locale":
// locale string | null
dojo.config.locale = locale = value;
break;
case "dir":
// rtl | null
document.getElementsByTagName("html")[0].dir = value;
break;
case "theme":
// tundra | soria | noir | squid | nihilo | null
theme = value;
break;
case "a11y":
if(value){ testMode = "dijit_a11y"; }
}
}
}

// always include the default theme files:
if(theme || testMode){

if(theme){
var themeCss = d.moduleUrl("dijit.themes",theme+"/"+theme+".css");
var themeCssRtl = d.moduleUrl("dijit.themes",theme+"/"+theme+"_rtl.css");
document.write('<link rel="stylesheet"type="text/css"href="'+themeCss+'">');
document.write('<link rel="stylesheet"type="text/css"href="'+themeCssRtl+'">');
}

if(dojo.config.parseOnLoad){
dojo.config.parseOnLoad = false;
dojo.config._deferParsing = true;
}

d.addOnLoad(function(){

// set the classes
var b = dojo.body();
if(theme){
dojo.removeClass(b, defTheme);
if(!d.hasClass(b, theme)){ d.addClass(b, theme); }
var n = d.byId("themeStyles");
if(n){ d.destroy(n); }
}
if(testMode){ d.addClass(b, testMode); }
if(dojo.config._deferParsing){
// attempt to elimiate race condition introduced by this
// test helper file.  120ms to allow CSS to finish/process?
setTimeout(dojo.hitch(d.parser, "parse", b), 120);
}

});
}

})();

if(window.location.href.indexOf(“?”) >-1){

var str = window.location.href.substr(window.location.href.indexOf(“?”)+1).split(/#/);

var ary = str[0].split(/&/);

for(var i=0;i<ary.length;i++){

var split = ary[i].split(/=/),

key = split[0],

value = split[1];

switch(key){

case “locale”:

// locale string | null

dojo.config.locale = locale = value;

break;

case “dir”:

// rtl | null

document.getElementsByTagName(“html”)[0].dir = value;

break;

case “theme”:

// tundra | soria | noir | squid | nihilo | null

theme = value;

break;

case “a11y”:

if(value){testMode = “dijit_a11y”;}

}

}

}

// always include the default theme files:

if(theme || testMode){

if(theme){

var themeCss = d.moduleUrl(“dijit.themes”,theme+”/”+theme+”.css”);

var themeCssRtl = d.moduleUrl(“dijit.themes”,theme+”/”+theme+”_rtl.css”);

document.write(‘<link rel=”stylesheet”type=”text/css”href=”‘+themeCss+’”>’);

document.write(‘<link rel=”stylesheet”type=”text/css”href=”‘+themeCssRtl+’”>’);

}

if(dojo.config.parseOnLoad){

dojo.config.parseOnLoad = false;

dojo.config._deferParsing = true;

}

d.addOnLoad(function(){

// set the classes

var b = dojo.body();

if(theme){

dojo.removeClass(b,defTheme);

if(!d.hasClass(b,theme)){d.addClass(b,theme);}

var n = d.byId(“themeStyles”);

if(n){d.destroy(n);}

}

if(testMode){d.addClass(b,testMode);}

if(dojo.config._deferParsing){

// attempt to elimiate race condition introduced by this

// test helper file. 120ms to allow CSS to finish/process?

setTimeout(dojo.hitch(d.parser,“parse”,b),120);

}

});

}

})();

If you enjoyed this post,make sure you subscribe to my RSS feed!

3 comments to Nails

Leave a Reply

  

  

  

You can use these HTML tags

<a href=""title=""><abbr title=""><acronym title=""><b><blockquote cite=""><cite><code><del datetime=""><em><i><q cite=""><strike><strong><pre lang=""line=""escaped=""highlight="">