diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2013-03-22 21:46:26 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2013-03-22 21:46:26 +0100 |
commit | 43eacd14999d9f2adb8f3130dbd77480aa31f849 (patch) | |
tree | 1a90c8924dba448f9ed1c8abe3cb65d1b28f9d1f /parts | |
parent | 588da3e3465402c9530a3f5fe78b85ba0180910b (diff) | |
download | ontogen-43eacd14999d9f2adb8f3130dbd77480aa31f849.tar.gz ontogen-43eacd14999d9f2adb8f3130dbd77480aa31f849.tar.xz ontogen-43eacd14999d9f2adb8f3130dbd77480aa31f849.zip |
Fix last remaining external resource
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'parts')
-rw-r--r-- | parts/ns-schema.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/parts/ns-schema.js b/parts/ns-schema.js new file mode 100644 index 0000000..739fdb4 --- /dev/null +++ b/parts/ns-schema.js @@ -0,0 +1 @@ +function hilight(){
var isIE = (navigator.userAgent.indexOf('MSIE') != -1);
//var dummy = document.getElementById('stinfo');
//var dumreg = new RegExp("^([^ &]+)","g");
//dummy.innerHTML = dummy.innerHTML.replace(dumreg,'<span>$1</span>');
var ex = document.getElementsByTagName('pre');
var term = new RegExp();
var n = ex.length;
for(i=0;i<n;i++){
if(! term.source){
var pfx = ex[i].className;
if(pfx.substr(0,3) == "ex "){
term = term.compile("<(/?)(" + pfx + ex[i].className.substr(3) + ")","g");
}else if(pfx){
term = term.compile("<(/?)(" + pfx + "[^ &]+)","g");
}
}
if(term.source){
var res = ex[i].innerHTML.replace(term,'<$1<b>$2</b>');
res = res.replace(/(<!--)(.*?)(-->)/gm,"<span class='comment'>$1$2$3</span>");
if(isIE)
ex[i].outerHTML = "<pre>" + res + "</pre>"; // IE trims \n for innerHTML
else
ex[i].innerHTML = res;
}
}
}
window.onload = hilight;
\ No newline at end of file |