spot my browser.js bug
Wednesday, January 4, 2006 10:42:26 PM
So, can you spot the broken logic in this browser.js excerpt?
if( hostname.indexOf('walla.co.il') ==hostname.length-11 ){
// Walla.co.il odd CSS styling causes display problems
// Bugs 184398, 184399
opera.addEventListener('BeforeEvent.load',
function(){ if(document.documentElement){(document.documentElement.appendChild(document.createElement('style'))).appendChild(document.createTextNode(' .btn-t,.btn{display:inline !important;} .wp-0-b{width:auto !important}'));
opera.removeEventListener('BeforeEvent.load', arguments.callee, false);
opera.postError('Opera has modified the JavaScript on '+hostname+'. See browser.js for details');}}
,false);
}









Jere # Thursday, January 5, 2006 3:22:11 PM
Kelson VibberKelson # Friday, January 6, 2006 1:58:27 AM
Interestingly enough, I do use a class called "btn" on some pages, but the elements I apply it to were already inline, so the extra rule didn't change anything. Otherwise I probably would have noticed something was going on a lot sooner!
Hallvord R. M. Steenhallvors # Friday, January 6, 2006 3:29:52 AM
Wonder how many sites in the world use a 10 character host name and ".btn{display:block}" in their CSS? :-o I hope the bug has not broken anything, and it is fixed now in any case.
jimjjewett # Friday, January 6, 2006 8:44:23 PM
Does the fix also give more detail on which fix was applied, so we can track it down more easily in the future?
Hallvord R. M. Steenhallvors # Saturday, January 7, 2006 3:54:51 AM
João EirasxErath # Tuesday, January 10, 2006 11:17:14 AM
// several sites in the Netherlands (mainly newspapers) use the same sniffer script to block Opera.
//Bug: 182328
if( hostname.lastIndexOf('.nl')+3==hostname.length ){
I wonder what happens on a LAN where some http server has a 2 letter name ?? A check for hostname.length>2 would fix this
Hallvord R. M. Steenhallvors # Wednesday, January 11, 2006 4:26:43 AM