10,114c10 < var kpbadd=false, ifm_data="", ifm_ph="", pdhsone=1, parent_style="", pruleprefixtocheck=[], prulenamevaluetocheck=[], pruleph=[], iprule=-1, lastph="&style="; < < function forcsscheck() { < // Thanks to https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/insertRule and https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration < var styleObj = forcsscheck, j=0, k=0, tval='', cval='', nameString='', i, prule='',title=''; < //alert(1); < var efd, fg,found=false, laststyleObj=null, lastj=0, styleEl, pds=[document], styleSheet; < //alert(11); < if (iprule > -1 && iprule < pruleph.length) { < lastph=pruleph[iprule]; < if (pruleph[iprule].indexOf("&style=") != -1 || pruleph[iprule].indexOf("&STYLE=") != -1) { < pds.push(parent.document); < } else if (pruleph[iprule].indexOf("&sTYLE=") != -1) { < pds[0]=parent.document; < } < } else { < if (lastph.indexOf("&style=") != -1 || lastph.indexOf("&STYLE=") != -1) { < pds.push(parent.document); < } else if (lastph.indexOf("&sTYLE=") != -1) { < pds[0]=parent.document; < } < } < //alert(pds.length); < for (fg=0; fg -1 && iprule < pruleprefixtocheck.length) { < //alert(pruleprefixtocheck.length + ' ' + pruleprefixtocheck[1] + ' { ' + prulenamevaluetocheck[1] + '; }'); < //alert(found + ' ' + pruleprefixtocheck[iprule].trim().toLowerCase() + ' { ' + prulenamevaluetocheck[iprule] + ' !important; }'); < if (!found) { < styleEl = pds[fg].createElement('style'); < pds[fg].head.appendChild(styleEl); < // Grab style sheet < styleSheet = styleEl.sheet; < // Insert CSS Rule < styleSheet.insertRule(pruleprefixtocheck[iprule].trim().toLowerCase().replace(/>/g,'>').replace(/</g,'<') + '{' + prulenamevaluetocheck[iprule] + ' !important;}', 0); // styleSheet.cssRules.length); < //alert(pruleprefixtocheck[iprule].trim().toLowerCase().replace(/>/g,'>').replace(/</g,'<') + '{' + prulenamevaluetocheck[iprule] + ' !important;}'); < styleObj = null; < } < while (styleObj != null) { < < while (styleObj != null) { < styleObj=null; < if (k < pds[fg].styleSheets.length) { < //alert("pds[fg].styleSheets[" + k + "].length=" + pds[fg].styleSheets[k].cssRules.length); < //if (j < pds[fg].styleSheets[k].cssRules.length) { < //try { < //alert(pds[fg].styleSheets.length); < try { < styleObj = pds[fg].styleSheets[k].cssRules[j].style; < } catch (efd) { < styleObj = null; < //alert(pds[fg].styleSheets.length); < } < //} catch(efd) { < // alert("k=" + k + " and j=" + j); < // styleObj = null; < //} < //} < } < if (styleObj != null) laststyleObj=styleObj; < < if (styleObj != null) { < prule = styleObj.parentRule.cssText; < title = styleObj.cssText; < < for (i = styleObj.length; i--;) { < nameString = styleObj[i]; < if (pruleprefixtocheck[iprule].trim().toLowerCase() == prule.split('{')[0].trim().toLowerCase() && nameString.toLowerCase() == prulenamevaluetocheck[iprule].split(':')[0].toLowerCase()) { < found=true; < //styleObj.removeProperty(nameString); < tval = ('' + title).split(('' + nameString) + ':')[1].split(';')[0]; < cval=prulenamevaluetocheck=[iprule].split(nameString + ':')[1].split(';')[0]; // prompt('Regarding current CSS Stylesheet definition ... ' + String.fromCharCode(10) + String.fromCharCode(10) + title.split(';')[i] + ';' + String.fromCharCode(10) + String.fromCharCode(10) + ' ... feel free to change the value suggested within the CSS Rule ... ' + String.fromCharCode(10) + String.fromCharCode(10) + prule + String.fromCharCode(10) + String.fromCharCode(10), tval); < if (cval != null) { < if (cval != tval) { < styleObj.setProperty(nameString, cval); < //alert('Within ' + prule + ' ... ' + nameString + ' changed to ' + cval + ' (from ' + tval + ')'); < //document.getElementById('findings').innerHTML+='Within ' + prule + ' ... ' + nameString + ' changed to ' + cval + ' (from ' + tval + ')
'; < } < } < } < } < j++; < lastj=j; < } < } < styleObj = forcsscheck; < k++; < j=0; < } < styleObj = forcsscheck; < j=0; < k=0; < tval=''; < cval=''; < nameString=''; < i=0; < prule=''; < title=''; < found=false; < laststyleObj=null; < lastj=0; < } < iprule--; < setTimeout(forcsscheck,100); < } < } --- > var kpbadd=false, ifm_data="", ifm_ph="", pdhsone=1, parent_style=""; 144c40 < ifm_data=aconto.body.innerHTML.replace(/:not\(/g,'~not(').replace(/:NOT\(/g,'~not(').replace(/:Not\(/g,'~not(').replace(/:not \(/g,'~not(').replace(/:NOT \(/g,'~not(').replace(/:Not \(/g,'~not(').replace(prehuh + '>','').replace('',''); --- > ifm_data=aconto.body.innerHTML.replace(prehuh + '>','').replace('',''); 146c42 < ifm_data=aconto.body.innerHTML.replace(/:not\(/g,'~not(').replace(/:NOT\(/g,'~not(').replace(/:Not\(/g,'~not(').replace(/:not \(/g,'~not(').replace(/:NOT \(/g,'~not(').replace(/:Not \(/g,'~not(').replace('
','').replace('
',''); --- > ifm_data=aconto.body.innerHTML.replace('
','').replace('
',''); 149c45 < var ifm_partsbits = nocomment(ifm_data).split(':'); --- > var ifm_partsbits = nocomment(ifm_data.replace(/:not \(/g,'~not (').replace(/:NOT \(/g,'~not (').replace(/:Not \(/g,'~not (')).split(':'); 177,181d72 < pruleprefixtocheck.push(thisrule.replace(/~not \(/g,':not (').split('{')[0].trim()); < prulenamevaluetocheck.push(cname + ":" + cvalue); < pruleph.push(fromarg); < lastph=fromarg; < iprule=eval(-1 + pruleprefixtocheck.length);