Dot eating

Subscribe to RSS feed

Sticky post

Disclaimer

This is personal blog of mine. All opinions stated here and all files published are mine and must not be in any way connected nor are necessarily endorsed by my employer.

Opera 10.53 makes IE9 p2 look bad?

Second technology preview of IE9 was released.

Accompanying movie was released (wmv, mp4) which compares it to Firefox and Chrome to show how effective IE9's hardware acceleration is. But is it really so much better than every other browser? Let's try some demos made by Microsoft in this other browser that MS forgot to test with.

(also see notes below)
Browser Flip
IE:

Opera:


Flickr Explorer
IE:

Opera:


Note: Both IE's and Opera's frame rate were affected by a large margin by Fraps. Real FPS, without capturing, was roughly twice as big in Flickr Explorer for example.

Just draw your own conclusions and imagine what Opera will achieve will hardware acceleration if it performs very similar to hardware accelerated IE now.

Also, IE team, what's up with using non-official Opera logo? Here, pick up new, shiny one.

Tested on hp probook 4510s.

UJS Manager

If anyone is interested in trying out the Unite service that I've been working for some time now then here it is:
Download: http://unite.opera.com/application/401/
Forum thread: http://my.opera.com/community/forums/topic.dml?id=287894

It's just a very simple manager for user scripts folder but there is a lot more potential in Unite Services that can be made to good use here. Like scripts update mechanism, installing new scripts from browser (like shoust has done in his service http://my.opera.com/community/forums/topic.dml?id=284485 ), synchronizing scripts from different computers and more.

Patch for user scripts activation prompt

A while ago, I did a patch that removes User Scripts activation prompt that popups once in session when running scripts on secure pages. I hesitated to make it public before as I was afraid of immoral usage. But then I came to a conclusion that if some bad person (attacker) has access to someone else (victim) computer, he could do a lot more damage and in easier ways then patching Opera and installing some nasty user scripts.

Putting my concerns out of the way, here is the patch:
Don't use on Opera 10.10 and higher. It won't work and crash Opera when enabling Unite.
opera-userjs_activation.zip
(extract all files to Opera directory, close Opera and run patch_https_ujs_prompt.bat)

Happy usage.

Watch fullscreen flash while working on another screen

Flash has annoying habit of closing fullscreen mode whenever "anything" happens. Like when wind blows through the window or there is an earthquake on another continent. No seriously, it closes whenever it looses focus. But that is still too sensitive. I can't watch movie in fullscreen on one screen when working on another. It closes whenever I click on that second screen.

So here is a version of flash plugin that does not do that. It's version 10.0.22.87 (latest at this time) with one byte changed (compare with original if you don't believe me wink).
Removed. See below for better alternative.

Axel Gembe made patcher that handles both ActiveX and Netscape Flash plugins. It automatically finds and patches them so it's much easier to use and should also handle future 10.0 Flash versions. If any.
Download on author's page: http://deve.loping.net/projects/ignoflash/

As a sticky note for myself, I'm attaching picture of the jump that has to be patched. Will come in handy when new version comes out and when I will forget how I've done that. smile
(search for one of the DefWindowProcA calls that have similar surroundings)

PS. You can still close fullscreen flash with ESC key or using any UI button that might be provided by flash player.

PS2. Maybe there is a native solution for that? Like some hidden ini tweak for flash? Speak up if you know about such.

[edited 12.07.2009] Updated plugin with different patching approach. Fixes problem that prevented closing fullscreen mode when clicking "links" within flash. This was bad cause new tabs has been opening in background.

[edited 16.07.2009] Reverted updated plugin. It was worse then previous version.

[edited 10.08.2009] Updated plugin to version 10.0.32.18

[edited 9.12.2009] Updated plugin to version 10.0.42.34

[edited 13.02.2010] Updated plugin to version 10.0.45.2

Better Gmail title tweak

There is a Title Tweaks addon in Gmail Labs that reorganizes Gmail title so that unread count is a little closer to the beginning of page title. Well, with Opera's killer feature Ellipsis in Center (hello Opera, why this is so well hidden?), that addon is just useless.

So I made a little tweak myself. It moves unread count to the beginning.

Plus, I made it so that it sums up unread mails from different, manually chosen, views and shows them in one global counter.
That is useful when you have a filter that gives custom labels to specific mails and skips inbox at the same time. Normally you would have unread counter only when this specific view is focused. With this userjs, you are always notified about unread mails within that label no matter what view you have focused.

There is also third advantage that this script gives. You will see unread count even when having individual mail opened in Gmail.

If you want to configure script, just look inside the file. There is a small explanation inside on how to include custom views.

Download: gmail_title_tweak.js

Eolass patent bites the dust

This patch is not supported nor functional anymore. Please check follow-up solution by XenoAntares - http://my.opera.com/XAntares/blog/xanocta
Or read below if you like reading.

Some background:
Eolas (E) is a company that patented a certain way of interacting with embedded objects on web pages. This is why in Opera, you sometimes have to click (for example) a flash player to "activate" it before it can actually be controlled. That sucks.

Opera is the only browser that I know of, that currently have this annoying system in place. IE had it, but it reached to a pocket full of money to buy a license from E.

Other (open source) browsers don't implement this mechanism because E was kind enough to commit not to pursue legal actions against open source browsers that are violating its patent. Why? I guess because it wouldn't really be able to enforce that anyway. Builds without this future would pop up everywhere in no-time.

Solution:
Make a "custom" Opera build.

Now I look at it, finding out how to bypass this system took more time then it had to.

My starting point was to grab onto the string "Click to activate and use this control". It's displayed in status bar when hovering over non-activated embed.
It can be found in english.lng listed as:
-191213401="Click to activate and use this control"

Looks like Opera is using signed long's to identify strings. We can't just search for this number in opera.dll file and expect to find it there. Storing numbers as strings would be highly inefficient. Programs store numbers in hexadecimal instead so we have to convert this value to hex. Even windows calc will do the job in Scientific mode.
decimal -191213401 is 0xF49A50A7 in hex but we won't find that too in compiled file (even if we do, it won't be relevant to what we are looking for). PC's use little endian byte order so we have to search for reversed bytes: 0xA7509AF4, actually.

In a build I've been working on, this address was found twice in opera.dll. Those were the places where Opera actually referenced this string and as there were only two of those, it wasn't really hard to figure out that first one was the one I was looking for.

Found that out by setting a breakpoint in both of them and reloading a page that contained "non-activated" embed. Only one of those breakpoints triggered.

Tracing back from a code that references string, I eventually came to a code that created an "overlay" window. This is how Opera implemented "click-to-activate" thing. Invisible window is being positioned on top of non-activated embed and prevents interaction with it until clicked (when it is destroyed).

Cutting story short (I don't recall exact steps of this process as I've done that months ago - only some residual logs made this post possible), I've traced back again to find out where Opera decided to call CreateWindowEx function, that created our evil overlay. And below are the results of this work.

Patch:
For current versions of Opera 10 (alpha) and Opera 9.64 this change does the trick:
search: F7 D8 1B C0 F7 D8 C2 04 00 FF 74
replace: F7 D8 1B C0 B0 01 C2 04 00 FF 74

For Opera 9.63 (thanks Lex1 for correcting):
search: F7 D8 1B C0 F7 D8 5B C2 04 00
replace: F7 D8 1B C0 B0 01 5B C2 04 00

In 10alpha, search pattern can be found two times but only first one is relevant. Second match is actually involved in HTTPS related stuff so better not touch it.

Before hexediting opera.dll it has to be unpacked first. Use UPX command: "upx -d opera.dll"
For hex editing free XVI32 will do the job (not very friendly hexeditor though).

Download:
If you prefer to use a "ready to go" package then download this file, extract to Opera directory and run patch_click_to_activate.bat.
Patch for Opera 9.64 and Opera 10: opera-c2a.zip

For some 32/64 bit linux distributions use this patch script (thanks kylebaker for structuring script nicely): click-to-activate-removal-opera-10.sh
To use, download to any directory and execute these commands as a root:
chmod +x click-to-activate-removal-opera-10.sh
./click-to-activate-removal-opera-10.sh

PS. Pun intended in title ;>

Updated Gallery Viewer to v1.2

I have updated my userjs Gallery Viewer to version 1.2.

New in this version is support for sites that are not directly linking to images. Every such site has to be analyzed and added to script with settings specific to itself.
I have already added support for Google Images and My Opera albums.

From now on, I won't be making new posts to announce new versions. If you are interested in knowing when new version comes out - subscribe to Gallery Viewer post.

Google Reader dropdown fix

You might have noticed that in Google Reader, dropdown for searching feeds, does not work (you can't select any feed).

It is some Opera CSS bug but it can be easily workarounded with one CSS rule.

Just get the file and set it in Site Preferences->Display for Google Reader site:
googlereader.css

[UserJS] Gallery Viewer

have updated my script that entered Opera UserJS Contest.
This version adds support for framesets (gallery will unfortunately open in new window in this case) and also supports images inside iframes.
Cross domain image discovering will eventually come in future versions.

Gallery Viewer is a script that makes it easy to browse images on some pages.
It will gather all links on page that looks as potential images and display them all in a gallery like view. Too big images will be resized down to fit window.

Mouse navigation:
  • wheel down - go to next image
  • wheel up - go to previous image
  • hover upper part of window - show thumbnails
  • click X in top-left corner - close Gallery Viewer

Keyboard shortcuts:
  • space OR right arrow - go to next image
  • left arrow - go to previous image
  • esc - close Gallery

Download
gallery-viewer.js v1.2
readme.txt

Toolbar button:
Script must be started by button so get this one:
button

* v1.2
 [added] site specific image URIs (now Google Images and My Opera albums are supported - more can be added quite easily)
 [fixed] error in console when closing gallery before first image loaded
* v1.1
 [added] support for framesets and documents with iframes (in same domain)
 [added] duplicates are ignored