User JavaScript is a powerful tool and it can be used for many purposes, including:
- Fixing broken scripts on Web pages. Opera uses browser.js to automatically fix incompatible Web pages, out of date scripts, and pages that inadvertently block Opera.
- Enhancing Web pages by changing or adding your own content to the page.
Installing/Uninstalling User JavaScripts
If you don’t have UserJS directory, create a directory with name userjs (preferably inside profile directory) and enter path to it in Tools > Preferences… > Advanced > Content > JavaScript Options… > User JavaScript files

Path to User JavaScript files
- To install, place User JavaScript file (*.js or *.user.js) inside User JavaScript directory.
- To uninstall, remove corresponding User JavaScript file from User JavaScript directory.
- To disable, change corresponding User JavaScript file extension from *.js to *.js.x
You can also use UserJS Manager for Opera to perform above actions.
Download
Download all the following User JavaScripts in a single zip file, unzip and place it inside User JavaScript directory.
- Autosizer
- Breadcrumb URL
- Clean URI
- Cooliris alike
- Gallery crawler
- Get feed link
- Image thumb
- Link alert
- Power drag
- Linkify URL
- View Selection Source
- Ultimate Search Highlighter
Useful User JavaScripts
-
Autosizer
Autosizer will enhance image viewing in Opera by adding five different sizing modes to images: “Original”, “Shrink to Fit”, “Maximize”, “Fit to Width” and “Fit to Height”. “Shrink to Fit” is enabled by default. Simply click on the image to view in next mode or hold down Shift key while clicking to view in previous mode. Move cursor to top right corner to view the menu. See help for more information.
-
Breadcrumb URL
Breadcrumb URL will place link to each directory of current URL at the top left corner of the page. Useful if you browse without address bar or browse in full screen mode.
-
Clean URI
Clean URI will recognise links that use redirected URLs (example: http://www.google.com/url?q=http://winmerge.sourceforge.net/ ) and replace them with the direct URL.
-
Cooliris alike
Similar to Cooliris extension for Firefox and helps to preview links without leaving current tab. Hold Ctrl key and hover any link to open preview window in top right corner of current tab. Size of preview window can be changed to 3 heights by clicking “Restore” icon.
-
Gallery crawler
Gallery crawler adds link to next and previous image so pictures numbered sequentially can be viewed without flipping through links, ads and poor page design.
-
Get feed link
Get feed link will place feed icons at the top left corner of the page. Useful if you browse without address bar or browse in full screen mode or if you need feed link URL.
-
Image thumb
Image thumb will show thumbnail in bottom left corner when you hover an image link. Hold Ctrl key to view in original size.
This UserJS breaks functioning of autosizer UserJS.
-
Link alert
Link alert identifies links to specific file types, and displays an appropriate icon when the link is hovered.
-
Power drag
Power drag will help you to resize textareas, select boxes, iframes, objects, images or input fields by holding Shift key and then dragging lower right corner of an item. Double click lower right corner to restore the original dimensions. You can enable the dragging corner always, or use another modifier key.
-
Linkify URL
Linkify URL makes text http/https/ftp URLs clickable.
-
View Selection Source
View Selection Source allows you to see HTML source of any part of a page, it’s very useful for web developers. If you don’t know how to edit menu setup see this and add the following under [Hotclick Popup Menu].Item, "View selection source"="Go to page, "javascript:opera.getSelectionSource()""

-
Ultimate Search Highlighter
Ultimate Search Highlighter will show search bar at the top and can show number of search results, jump to next instance of highlighted term or previous (hold Shift key and click on term in toolbar) and supports RegExp highlighting. Move cursor to top to show search bar after timeout period. Get USH button or search field from here or create a search engine with the following.javascript:opera.USH.run(opera.USH.check='%s','newSearch');





using
Good collection. Thanks a ton, Tamil.
using
thanks Tamil
using
Tamil, I’m surprised you didn’t reference something that suppresses blank targets. I can think of nothing more annoying than documents opening in new windows when I didn’t ask for it to happen. So, personally I use this code:
document.addEventListener(’DOMContentLoaded’, function() {
nodes = document.evaluate(’//@target["_blank" or "blank"]‘, document, null, 0, null);
while (attr = nodes.iterateNext())
attr.value = ‘_top’;
}, false);
It doesn’t catch absolutely everything, but it gets the vast majority without causing problems for framed pages and panels.
using
Thanks a lot, very useful
using
nice collection Tamil
using
Here’s one that I have written few years back that you may find useful – a toolbar appears over individual images on the page and allows zooming in/out:
http://userjs.org/scripts/browser/enhancements/zoom-image
Here’s how it looks like:
http://www.freshfavicon.com/i/misc/zoom-image-userjs-preview.png
It works in Opera and Greasemonkey.
BTW, it’s a shame userjs.org does not seem to be maintained any more.
using
Very nice list Tamil, thanks.
btw, the two (IMHO) most useful scripts here Autosizer and Image thumb have some kind of a conflict. Autosizer refuses to work when Image thumb is also loaded. That is in the latest Opera 10, it may work in older version.
using
uuuh nice
and THANKS a lot
using
thx.
using
@J. King opera:config#UserPrefs|IgnoreTarget
Disallow documents to create new windows/pages
http://operawatch.com/news/2008/05/useful-opera-config-opera-preferences-editor-entries.html
using
I use the Google Image Relinker
http://userscripts.org/scripts/show/792
Direct links on Google Image Search
using
Garamujo thanks for that, very helpful
using
This stuff is ancient. It’s a real shame userjs.org died for no apparent reason.
using
What’s this:
”
Javascript URL thread: “javascript:opera.getSelectionSource()”
Error:
name: TypeError
message: Statement on line 1: Type mismatch (usually non-object value supplied where object required)
stacktrace: Line 1 of unknown script
opera.getSelectionSource()
”
??
Opera 10.4205
using
Good job,Tamil!
And I think it’s cool userjavascript,too.
oAutopagerize
http://d.hatena.ne.jp/os0x/20071202/oautopagerize
This userjavascript move like autopagerize(for Greasemonkey).
using
btw, gallery crawler is kinda redundant, since Opera has FastForward which interestingly works wonders on galleries.
using
One that I find really useful that didn’t make the list is a script that automatically adds “&fmt=18″ to the end of all URLs on YouTube. That means whenever you load a video, you always get the high def. version (if there is one).
http://my.opera.com/community/forums/topic.dml?id=225345
using
http://userscripts.org/ has Opera stuff too (in case you didn’t know).
using
I feel Opera is missing a trick by not really advertising its ability to handle userjs as well as buttons. They are a key differentiating point which separates Opera from other browsers, and IMO makes Opera the best browser. A new user just does not know about these features when they download Opera. Maybe it will be a good idea if another pull down menu called “More” is added by the side of help which will contain userjs, buttons, and links to mouse gestures and keyboard shortcuts, or the pull down menu for widgets is broadened to be called “Widgets and more” or something of that sort.
using
Great listing, Tamil.
Power Drag is my fav Opera “add-on” for writing in tiny text fields.
@Nilopal: Good suggestion…Opera should host a central userJS site, and make it easy for Opera users to find it. Definitely another Opera competitive differentiator of which few are aware…
using
You forgot Ospell great spell checker, certainly till opera 10 is out
using
i can’t see your picture of this blog.
using
useful.thanks for sharing
using
Thank You for share… SOmetimes i use Opera when my other browser hang..