SubscribeRSS Feed

Useful User JavaScripts for Opera

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 Opera User JavaScript directory
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.

  1. Autosizer
  2. Breadcrumb URL
  3. Clean URI
  4. Cooliris alike
  5. Gallery crawler
  6. Get feed link
  7. Image thumb
  8. Link alert
  9. Power drag
  10. Linkify URL
  11. View Selection Source
  12. Ultimate Search Highlighter

Useful User JavaScripts

  1. 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.

    Autosizer

  2. 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.

    Breadcrumb URL

  3. 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.

    Clean URI

  4. 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.

    Cooliris Alike

  5. 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.

    Gallery crawler

  6. 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.

    Get Feed Link

  7. 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.

    Image Thumb

    This UserJS breaks functioning of autosizer UserJS.

  8. Link alert
    Link alert identifies links to specific file types, and displays an appropriate icon when the link is hovered.

    Link Alert

  9. 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.

    Power Drag

  10. Linkify URL
    Linkify URL makes text http/https/ftp URLs clickable.

    Linkify URL

  11. 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()""

    View Selection Source

  12. 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');

    Ultimate Search Highlighter

If you enjoyed this post, then make sure you subscribe to my RSS Feed.




24 Comments

  1. 1 Manoj

    Good collection. Thanks a ton, Tamil.

  2. 2 mihau

    thanks Tamil

  3. 3 J. King

    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.

  4. 4 andresruiz

    Thanks a lot, very useful

  5. 5 Chas4

    nice collection Tamil

  6. 6 Vasil Dinkov

    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. :?

  7. 7 Alpha-Toxic

    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.

  8. 8 ish

    uuuh nice

    and THANKS a lot ;)

  9. 9 Jani

    thx.

  10. 10 Garamujo, O

    @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

  11. 11 Garamujo, O

    I use the Google Image Relinker

    http://userscripts.org/scripts/show/792

    Direct links on Google Image Search

  12. 12 mihau

    Garamujo thanks for that, very helpful

  13. 13 SuitCase

    This stuff is ancient. It’s a real shame userjs.org died for no apparent reason.

  14. 14 Mladen

    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

  15. 15 AC

    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).

  16. 16 blah

    btw, gallery crawler is kinda redundant, since Opera has FastForward which interestingly works wonders on galleries.

  17. 17 BAMAToNE

    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

  18. 18 dutchie_

    http://userscripts.org/ has Opera stuff too (in case you didn’t know).

  19. 19 Nilotpal

    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.

  20. 20 Kamalesh

    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…

  21. 21 Tom

    You forgot Ospell great spell checker, certainly till opera 10 is out

  22. 22 biesky

    i can’t see your picture of this blog.

  23. 23 zrmbilisim

    useful.thanks for sharing

  24. 24 monique

    Thank You for share… SOmetimes i use Opera when my other browser hang..