Web Browser Wednesday

Google/Opera A few weeks ago I made a post about Google services that don’t work properly in Opera. I was happy, yet surprised, to see that Opera Watch had linked to the article in a post that they made which sparked me to do some searching around to see what Google problems I might be able to make Opera-compatible. I am far from being a JavaScript programmer so my main goal was simply to get around the browser compatibility checks.

One of the main things that most Opera users always try when a site doesn’t work properly is to mask the site. By doing that it will force the Opera to identify itself as another browser, like Internet Explorer or Mozilla. It isn’t always the most effective thing but it works fine a majority of the time.

Over the summer I wrote a quick article that showed how you could use masking to get Google Talk to display in Gmail. It wasn’t anything extravagant but it got the job done. There is actually a way that you can prevent Gmail from trying to identify which browser you are using. All you have to do is visit and Opera users will get all of the features that you would have in Firefox and Internet Explorer. There might be some incompatibilities but from what I can tell the Google Talk almost works perfectly in Gmail when using Opera. Just change your bookmark to use that URL and you’ll be all set.

Okay, that wasn’t anything too special because it is just a URL. Unfortunately Google didn’t put that in every service that they offer so to get around the prompt in Google Calendar it took a little more work. What’s the end result? Google Calendar will load completely without ever displaying the annoying prompt that Opera users have suffered with for a long time:

Google Calendar Compatibility For Opera

It is time to stop that popup using a bit of our own JavaScript that I whipped up. It took me a few hours to write this up…okay okay, it really only took a few seconds after I looked at the Google Calendar source code but a little exaggeration never hurt anyone. :)

Here are the steps you need to take to eliminate the prompt in Google Calendar:

  1. Find a folder that you can place a JavaScript file in and try to make it a place that won’t get deleted, otherwise you’ll have to do this again. Also, you should try to make sure that there aren’t any unintentional JavaScript files located in that folder otherwise Opera may get confused. By that I mean that there shouldn’t be any other files in that directory with the extension .js and have nothing to do with your Opera installation.
  2. Right-click on this JavaScript file and save it to that directory from Step 1.
  3. Go to Tools > Preferences > Advanced > Content > JavaScript options and into the User JavaScript files box enter in or browse for the directory from Step 1.
  4. That’s it, pull up the Google Calendar homepage and the prompt will be suppressed.

There is really only one line of code in the file that does anything. Basically it stops all JavaScript confirmation windows from appearing on the Google Calendar site only, which is essentially the same as pressing the Cancel button. What about deleting an event from the calendar then? That isn’t a JavaScript confirmation prompt so it will be displayed just like it is in other browsers.

So far I have been able to confirm that everything works in Google Calendar except for the Settings screen. For some reason I can’t adjust any of the settings in Opera but as long as you get everything configured in another browser you can switch to Opera and it should all work okay. This is somehow a result of using my script but I don’t see how blocking confirmation dialogs affects this. Everything appears to render okay on the main screen though:

Google Calendar in Opera

These surely aren’t a solution to the compatibility problems but they are a workaround that should please most people. The best part about both of these tweaks is that they don’t involve any sort of masking so websites are not going to throw any IE or Mozilla specific code at Opera that it can’t handle. Of course using Google Calendar in Opera via masking wasn’t really an option because it would render terribly. I do hope to see more of Google’s services becoming Opera-compatible in the future so that these fixes won’t even be necessary.

P.S. If someone knows how to block the specific dialog box using the JavaScript please let me know and I will update the code on this site. Thanks! :D