The menace of the Opera

User Javascript changing moronic attitude ;-)

Hi
Some people really don't get it do they??
Ben Goodger http://www.bengoodger.com/weblog/ has some check on his blog that detects what browser you use and if you use something else than Firefox or Safari you get a lame message saying you should download Firefox.
IMO this guy really has missed the point. Browser vendors like Mozilla and Opera has struggled with this kinda moronic attitude for ages and now this guy that is a Mozilla developer goes and do the same thing.

We'll we have a User Javascript that corrects the information on the page.
Stick this in your user javascript file and have a look :-)

[PS This is not officially sanctioned by opera, but is funny anyways]




if( location.href == 'http:\/\/www.bengoodger.com\/weblog\/' ) {
window.opera.addEventListener(
'BeforeScript',
window.foobar = function (e) {
if(e.element.text.match(/opera/i)) {
e.element.text = "document.write(\'

The page you are reading "+
"is written by a narrow minded Firefox fanboy who does not like "+
"the fact that the browser you are using supports more CSS than "+
"Firefox. As a result, this page would normally contain a lie "+
"about Opera, but this has been removed by Opera\\\'s User "+
"JavaScript. Enjoy :)

"download\/\" style=\"margin-left: 190px;\"> "promote.opera.com\/banners\/opera\/windows\/ow-get-00-en-but1."+
"gif\" alt=\"Download Opera - more than just a browser\" title=\""+
"For the fastest and most innovative browsing experience\"><\/a>"+
"<\/h3>\');";
window.opera.removeEventListener('BeforeScript',window.foobar,false);
}
},false);
}

Netscape 8 beta. They don't wan't bugs reported?userjs.org up and running

Comments

Ole Kasperfractalgp Friday, April 1, 2005 12:40:13 PM

Someone might make a point about the fact that the Opera ad contained in the JavaScript will only be seen by Opera users.... :) :whistle:

olli Friday, April 1, 2005 12:40:13 PM

Yeah, but it sure beats the Firefox ad ;-)

Rijk Friday, April 1, 2005 12:40:13 PM

Olli wants to join the crowd of Opera people blogging about userscript, the best thing since sliced bread :)

Dennis-Hawks Friday, April 1, 2005 12:40:13 PM

:(
Does not work for me, checked everything for failures, i.e. right paths, and so on. Copy and pasted to my user.js, downloaded from Rijk page, in which I also copy&pasted other js-codes found there.

Dennis-Hawks Friday, April 1, 2005 12:40:13 PM

Sorry, I am a moron, guys. Path was not right and I had to add www before going to this site.

scipio Friday, April 1, 2005 12:40:13 PM

A less aggressive fix: ;)

if(window.location.href.indexOf('www.bengoodger.com')>-1){
window.opera.addEventListener('BeforeScript',function(ev){if (ev.element.text.indexOf('else if (navigator.userAgent.indexOf("Firefox")')>-1 ) {ev.element.text=ev.element.text.replace('else if (navigator.userAgent.indexOf("Firefox")','else if (navigator.userAgent.indexOf("Opera")');}},false);
}

olli Friday, April 1, 2005 12:40:13 PM

Yo scipio you can do is way much easyer if you just put it in ua.ini ;-)

Daniel O'ConnorCloCkWeRX Friday, April 1, 2005 12:40:13 PM

A Mozilla Foundation Developer Promoting A Mozilla Foundation Product In His Own Personal Site?

MY GOD! SOMEBODY STOP HIM!

olli Friday, April 1, 2005 12:40:13 PM

Yeah I was just waiting for someone to really not get the point.. And please also see date of my post ;-)

Mark 'Tarquin' Wilton-Jonestarquinwj Friday, April 1, 2005 12:40:13 PM

It's not the promoting that I (personally) object to. After all, we all promote our chosen browser on our sites. It is the lies/insults towards other browsers that I object to.

Opera and Mozilla (and by the same token, Safari and the other standards-oriented browsers) struggled against the problems caused by non-compliant websites, by IE-ONLY-ism. Their paths may be different, but their goal is very similar in terms of standards compliance. Opera and Mozilla/Firefox should be standing together to help improve the Web, and to clean up some of the rubbish that IE dominance has left behind.

But for a Firefox developer to dismiss Opera deliberately with a lie like that is just insulting. It belittles the work that Opera have put into the developement of the browser. I, for one, am not impressed with a childish message like the one that normally appears on that site. The response in this journal entry is a reminder of that. And as Olli says, it is written on a very specific date ....

scipio Friday, April 1, 2005 12:40:13 PM

But would Ben know he was just fooled by an Opera user in that case?

olli Friday, April 1, 2005 12:40:13 PM

I guess not.. What do I know I only work here ;-)

scipio Friday, April 1, 2005 12:40:13 PM

Actually, he won't know it either if someone uses a function like the one I posted in his user.js. He can't tell whether the Opera visitor has seen his "warning" or not, but at least his web stats show that there was an Opera user there.

olli Friday, April 1, 2005 12:40:13 PM

I prefer the stats showing him having no visitors ;-)

icare Friday, April 1, 2005 12:40:13 PM

I feel great, tonight.
being an Opera user...:D

João EirasxErath Friday, April 1, 2005 12:40:13 PM

:)

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.