No longer testing on document.all

Not testing for document.all to determin browser type & version anymore
Now actually testing for rules & pageX instead
This commit is contained in:
Matt Pass
2012-06-23 17:22:48 +01:00
parent 9cbb9f7529
commit 95c0aa1812

View File

@@ -85,8 +85,8 @@ var ICEcoder = {
ICEcoder.content.style.height = (winH-headerH-footerH-tabsBarH-findBarH) + "px";
// Resize the CodeMirror instances to match the window size
document.all ? strCSS = 'rules' : strCSS = 'cssRules';
cMCSS = ICEcoder.content.contentWindow.document;
cMCSS.styleSheets[2].rules ? strCSS = 'rules' : strCSS = 'cssRules';
cMCSS.styleSheets[2][strCSS][1].style['width'] = ICEcoder.content.style.width;
cMCSS.styleSheets[2][strCSS][1].style['height'] = ICEcoder.content.style.height;
cMCSS.styleSheets[2][strCSS][2].style['width'] = ICEcoder.content.style.width;
@@ -1119,7 +1119,7 @@ var ICEcoder = {
getMouseXY: function(e) {
var tempX, tempY, scrollTop, IE;
IE = document.all ? true : false;
IE = !e.pageX ? true : false;
if (IE) {
top.ICEcoder.mouseX = e.clientX + document.body.scrollLeft;
top.ICEcoder.mouseY = e.clientY + document.body.scrollTop;
@@ -1517,8 +1517,8 @@ var ICEcoder = {
}
// Show visible tabs or not
document.all ? strCSS = 'rules' : strCSS = 'cssRules';
cMCSS = ICEcoder.content.contentWindow.document;
cMCSS.styleSheets[2].rules ? strCSS = 'rules' : strCSS = 'cssRules';
visibleTabs ? cMCSS.styleSheets[2][strCSS][5].style['content'] = '"\\21e5"' : cMCSS.styleSheets[2][strCSS][5].style['content'] = '" "';
top.tabWidth = tabWidth;