A Blog From Behind the Trenches

Attack of the Bugs

Site-specific preferences in Opera 9

More details on this is coming, but here's something to get you started.

How it works

All site-specific overrides are stored in opera6.ini. If you want to add overrides for a specific site, add the domain name in the "[Overrides]" section. Then, add a new section with the domain name, e.g. "[www.opera.com]". Each item in that section will override the Opera default for that domain. Items have two parts: the INI section where the setting is stored and the setting name separated by a vertical bar, e.g. "Extensions|Scripting=0". The following settings will disable scripting at www.opera.com:

[Overrides]
www.opera.com

[www.opera.com]
Extensions|Scripting=0

Overrides can be disabled by setting the domain name to 0, e.g. "www.opera.com=0" in the "[Overrides]" section. Override matching is done on sub-domain basis, so the server www.example.com will be matched by an override for example.com, but not vice versa. If overrides are defined both for the exact match and for the general domain, the longest match will always take precedence.

Available site-specific preferences

Here are some of the available site-specific preferences.

User Prefs|Ignore Unrequested Popups
User Prefs|Target Destination
User Prefs|User JavaScript
User Prefs|User JavaScript File
User Prefs|Allow Script To Hide URL
User Prefs|Enable Referrer

Multimedia|Always Load Favicon

Extensions|Scripting

User Display Mode|Author CSS
User Display Mode|User CSS
Author Display Mode|Author CSS
Author Display Mode|User CSS

User Agent|Spoof UserAgent ID

Proxy|*
Fonts|*
Colors|*

Opera 9.0 Preview 1Microsoft wants webmasters to fix broken sites. For IE7.

Comments

graste Thursday, October 20, 2005 7:29:16 PM

n1 smile

scipio Thursday, October 20, 2005 8:48:04 PM

Ignore Unrequested Popups

I always have trouble with double negations. wink

Alexey Feldgendlerfeldgendler Friday, October 21, 2005 7:39:19 AM

Why aren't most ini settings supported per-site? What's wrong with, for example, having "Show images" enabled for sites on the intranet and disabled for all others? That's the feature I've always been dreaming of.

Eddieelcid73 Friday, October 21, 2005 3:55:00 PM

scripio-

I too thought about that for a second.

Ilya Birmanilyabirman Saturday, October 22, 2005 1:11:37 PM

2scipio, elcid73: with "Ignore Unrequested Popups" the problem is not with double negation. The problem is with the word "ignore".

In what sense do you ignore unrequested popups?

Do you mean, "The page is showing a popup window - ok, ignore this, just let it do" or "The page is asking browser to show a popup window - ignore this request". I really don't know.

In the UI it's called "Block unwanted popups" which doesn't have this problem. Also it doesn't have the feel of double negation.

FataL Wednesday, October 26, 2005 8:26:26 PM

Yeah, "block unrequested popups" will be much better...

Oleusername_zen Sunday, October 30, 2005 10:39:25 PM

Why not in a separate file? Isn't opera6 allready pretty long?

Joel Nothmanmoo Monday, October 31, 2005 10:44:47 AM

feldgendler: have you tried changing "show images"? the blog only says "some of the available site-specific preferences". I haven't so I don't know...

Micho Vesiakvmicho Sunday, November 27, 2005 8:34:23 AM

An user friendly interface for this would be really welcome (somethink like right-click on the page -> per site settings -> disable javascript / .... )

Nicolas Mendozanicomen Monday, January 9, 2006 9:09:08 PM

Good to see Opera is coming along with features that most Amiga browsers had in the early nighties wink

At least the other "modern" browsers won't catch up ten years down the road wink

dotbit Monday, January 16, 2006 3:38:21 PM

how about storing overrides in opera6.adr (bookmarks)?

Singkong Tuesday, June 6, 2006 7:13:52 AM

I want to allow popups just on Wikipedia - how do I do it? The info on editing the .ini file seems confusing and incomplete.

This information also needs to be added to http://en.wikipedia.org/wiki/Wikipedia:Popups#Opera - or if someone answers me here, I can add it to the wikipedia page.

Another problem is that sometimes the javascript in the Wikipedia popups feature just creates a tiny box, the size of one letter, when hovering over a wikilink. The feature works better in Internet Explorer. sad Does that mean it's a Opera bug? (The feature is described at http://en.wikipedia.org/wiki/Wikipedia:Popups - the feature added by a registered Wikipedian editing their .js file)

Apart from this, Opera 9 is mostly wonderful - good job.

Singkong
(using Opera 9.00 Beta on Windows XP)

arnymars Friday, February 12, 2010 6:37:27 PM

Why Fit-to-Width (Rendering mode) is not allowed in override? Its allowed to override in Session files, and often required for sites designed for a particular screen size.

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.