Skip navigation.

Opera FAQs, Tips, Tricks & Tweaks

Cool tips for Opera browser

Posts tagged with "JavaScript"

How to create search engine with two parameters in Opera?

, , , ...

Sometimes we need to specify two parameters for search as in the following search.

http://images.google.com/images?imgtype=face&q=monkey

It is possible to create search engine for the above using JavaScript.

By creating a search engine with the following JavaScript in address field, you can search Google Images from address bar by typing <search engine keyword><space><search parameter 1><space><search parameter 2> (example: gi face monkey)

javascript:var s='%s';var p=s.indexOf('+');if(p>-1){var s1=s.split('+');var s2=s.slice(p+1)};window.location.href='http://images.google.com/images?imgtype='+s1[0]+'&q='+s2;

To create search engine for another site, modify images.google.com/images?imgtype='+s1[0]+'&q='+s2; part in the above JavaScript. When you perform search, s1[0] will be replaced by first parameter & s2 with second parameter.

If <search parameter 1> is more than one word use the following JavaScript. Use dot instead of space as separtor between search parameters.

javascript:var s='%s';var p=s.indexOf('.');if(p>-1){var s1=s.split('.');var s2=s.slice(p+1)};window.location.href='http://images.google.com/images?imgtype='+s1[0]+'&q='+s2;

Update: Apr 28, 2008

How to undo 'Stop executing scripts on this page' option in Opera?

, ,

Opera Stop Executing Scripts On This Page

You can stop execution of JavaScript in a tab by checking Stop executing scripts on this page option and it is valid until you close tab.

If you want execution of JavaScript later just close tab and reopen it from trash can.

Opera multiple home pages

, , , ...

Folder nickname
Command line shortcut
Keyboard shortcut
Button
JavaScript

Folder Nickname (Won't work in Opera 9.10-9.24 due to bug.)

Create a new folder in bookmarks and set nickname. Bookmarks → Manage Bookmarks... → Right click on folder → Properties... → Nickname Place bookmark of the sites you want as home page inside created folder. Enter nickname of folder as home page. Tools → Preferences... → General → Home page

Set nickname to folder in Opera
Set nickname to folder

Place bookmark of the sites you want as home page inside a folder
Place bookmark of the sites you want as home page inside a folder

Opera homepage
Set homepage

Command Line Shortcut

Create a shortcut to Opera similar to following one.

"%ProgramFiles%\Opera\Opera.exe" www.site1.com www.site2.com bookmark_nickname

Keyboard Shortcut

If you don't know how to edit keyboard setup see this. Search for Go to homepage and change action to Go to page, "http://www.site1.com/" & New page & Go to page, "http://www.site2.com/"

Button

Drag & drop Go to homepage button to any toolbar. Note path to Toolbar Configuration file, close Opera, open and change www.site1.com & www.site2.com in toolbar configuration file.

JavaScript

Enter javascript:open('http://www.site1.com');open('http://www.site2.com');void 0 in Tools → Preferences... → General → Home page and Tools → Preferences... → General → Pop-ups → Open all pop-ups or Open pop-ups in background.

Update: Apr 29, 2007

How to avoid focus to another tab while viewing a tab in Opera?

, , , ...

Disable Allow script to raise window

[or]

Tools → Preferences... → Advanced → Content → JavaScript Options... → [DISABLE] Allow raising of windows

JavaScript Options... in Opera
JavaScript Options...

Disable allow raising of windows in Opera
Disable Allow raising of windows

Download Opera, the fastest and most secure browser