Developers › A Journal from Behind the Trenches

Site-specific preferences in Opera 9

October 20, 2005 · by Haavard

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

Readers' comments 13

Left under the original article, as archived.

  • graste20. October 2005, 19:29

    n1 :smile:
  • scipio20. October 2005, 20:48

    Ignore Unrequested Popups

    I always have trouble with double negations. :wink:
  • Alexey Feldgendler21. October 2005, 07:39

    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.
  • Eddie21. October 2005, 15:55

    scripio-

    I too thought about that for a second.
  • Ilya Birman22. October 2005, 13:11

    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.
  • FataL26. October 2005, 20:26

    Yeah, "block unrequested popups" will be much better...
  • Ole30. October 2005, 22:39

    Why not in a separate file? Isn't opera6 allready pretty long?
  • Joel Nothman31. October 2005, 10:44

    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 Vesiak27. November 2005, 08:34

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

  • Nicolas Mendoza9. January 2006, 21:09

    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:
  • dotbit16. January 2006, 15:38

    how about storing overrides in opera6.adr (bookmarks)?
  • Singkong6. June 2006, 07:13

    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)
  • arnymars12. February 2010, 18:37

    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.

About this article

Published inA Journal from Behind the Trenches
DateOctober 20, 2005
AuthorHaavard
OriginalInternet Archive