Fixed the Blue Screen in Google Chrome 17+

This commit is contained in:
Dmitriy Simushev 2012-03-02 19:59:55 +00:00
parent b006c39c40
commit e07756c59f
2 changed files with 2 additions and 2 deletions

View File

@ -22,4 +22,4 @@ document.getElementsBySelector=function(a){if(!document.getElementsByTagName)ret
if(m!=null)for(var o=0;o<m.length;o++)g[j++]=m[o]}b=[];for(j=f=0;j<g.length;j++)g[j].className&&g[j].className.match(RegExp("\\b"+d+"\\b"))&&(b[f++]=g[j])}else{if(!b[0])return;f=token;g=[];for(n=j=0;n<b.length;n++){m=b[n].getElementsByTagName(f);for(o=0;o<m.length;o++)g[j++]=m[o]}b=g}return b}; if(m!=null)for(var o=0;o<m.length;o++)g[j++]=m[o]}b=[];for(j=f=0;j<g.length;j++)g[j].className&&g[j].className.match(RegExp("\\b"+d+"\\b"))&&(b[f++]=g[j])}else{if(!b[0])return;f=token;g=[];for(n=j=0;n<b.length;n++){m=b[n].getElementsByTagName(f);for(o=0;o<m.length;o++)g[j++]=m[o]}b=g}return b};
var NodeUtils={getNodeValue:function(a,b){var c=a.getElementsByTagName(b);if(c.length==0)return"";var c=c[0].childNodes,d="";for(i=0;i<c.length;i++)d+=c[i].nodeValue;return d},getNodeText:function(a){var a=a.childNodes,b="";for(i=0;i<a.length;i++)b+=a[i].nodeValue;return b},getAttrValue:function(a,b){for(k=0;k<a.attributes.length;k++)if(a.attributes[k].nodeName==b)return a.attributes[k].nodeValue;return null}},CommonUtils={getRow:function(a,b){var c=b.rows[a];if(c!=null)return c;if(b.rows.head!=null)return null; var NodeUtils={getNodeValue:function(a,b){var c=a.getElementsByTagName(b);if(c.length==0)return"";var c=c[0].childNodes,d="";for(i=0;i<c.length;i++)d+=c[i].nodeValue;return d},getNodeText:function(a){var a=a.childNodes,b="";for(i=0;i<a.length;i++)b+=a[i].nodeValue;return b},getAttrValue:function(a,b){for(k=0;k<a.attributes.length;k++)if(a.attributes[k].nodeName==b)return a.attributes[k].nodeValue;return null}},CommonUtils={getRow:function(a,b){var c=b.rows[a];if(c!=null)return c;if(b.rows.head!=null)return null;
for(k=0;k<b.rows.length;k++)if(b.rows[k].id==a)return b.rows[k];return null},getCell:function(a,b,c){var d=b.cells[a];if(d!=null)return d;if(c.rows.head!=null)return null;for(k=0;k<b.cells.length;k++)if(b.cells[k].id==a)return b.cells[k];return null},insertCell:function(a,b,c,d,f,g){a=a.insertCell(-1);a.id=b;if(d)a.align=d;a.className=c;if(f)a.height=f;a.innerHTML=g}}; for(k=0;k<b.rows.length;k++)if(b.rows[k].id==a)return b.rows[k];return null},getCell:function(a,b,c){var d=b.cells[a];if(d!=null)return d;if(c.rows.head!=null)return null;for(k=0;k<b.cells.length;k++)if(b.cells[k].id==a)return b.cells[k];return null},insertCell:function(a,b,c,d,f,g){a=a.insertCell(-1);a.id=b;if(d)a.align=d;a.className=c;if(f)a.height=f;a.innerHTML=g}};
function playSound(a){var b=document.createElement("div");if(navigator.userAgent.toLowerCase().indexOf("opera")!=-1)b.style="position: absolute; left: 0px; top: -200px;";document.body.appendChild(b);b.innerHTML='<embed src="'+a+'" hidden="true" autostart="true" loop="false">'}function htmlescape(a){return a.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;").replace('"',"&quot;")}; function playSound(a){var b=document.createElement("div");if(navigator.userAgent.toLowerCase().indexOf("opera")!=-1)b.style="position: absolute; left: 0px; top: -200px;";document.body.appendChild(b);b.innerHTML='<audio autoplay src="'+a+'"><embed src="'+a+'" hidden="true" autostart="true" loop="false"></audio>'}function htmlescape(a){return a.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;").replace('"',"&quot;")};

View File

@ -513,7 +513,7 @@ function playSound(wav_file) {
player.style = "position: absolute; left: 0px; top: -200px;"; player.style = "position: absolute; left: 0px; top: -200px;";
} }
document.body.appendChild(player); document.body.appendChild(player);
player.innerHTML = '<embed src="'+wav_file+'" hidden="true" autostart="true" loop="false">'; player.innerHTML = '<audio autoplay src="'+wav_file+'"><embed src="'+wav_file+'" hidden="true" autostart="true" loop="false"></audio>';
} }
function htmlescape(str) { function htmlescape(str) {