Browser JavaScript Explained

Browser JavaScript is a feature that allows Opera to automatically fix incompatible Web pages, out of date scripts, and pages that inadvertently block Opera. The script file is automatically distributed by Opera Software ASA, and can be used to apply fixes to specific Web sites, and specific scripts.

Browser JavaScript respects your JavaScript preferences, and will not be loaded if JavaScript is disabled.

Note: Opera also provides User JavaScript, which allows you to apply your own enhancements and fixes to Web pages. Additionally, Opera Software ASA runs the Open the Web initiative, which contacts the authors of problematic Web sites.

Keeping up-to-date

  • Opera automatically checks for updates to Browser JavaScript once every week. Any updates will be automatically downloaded and applied the next time a page is loaded in Opera.
  • You can manually check for updates using Help > Check for updates.
  • Automatic checking is controlled by the Browser JavaScript and Check For New Opera settings in Opera6.ini.
  • Files are downloaded separately for each user of Opera, and you do not have to be an administrator of your computer to make use of this feature.
  • The Browser JavaScript is signed and distributed by Opera Software ASA, and should not be edited.
  • The file will be stored in Opera's profile folder. The Help > About screen will tell you where the profile folder is.
  • Current browser.js status: disabled

If you use a proxy server that requires user name and password to access the internet, please note that Opera will not request user name and password for an authenticating proxy in order to download ua.ini and browser.js. Site patching or upgrade notification will not take place if such proxies are required.

Patches applied by Browser JavaScript

In most cases, when Browser JavaScript applies a fix, a message is posted in the JavaScript console (Tools > Advanced > JavaScript console) saying that the page has been changed.

Some of the fixes apply to specific Opera versions, or on specific platforms only.

Site fixes

saab
  • sniffing on saab.com and saab.de excludes Opera
www.opera.com
  • Browser.js status and version reported on browser.js documentation page
music.download.com
  • Fixing audio samples, old overlibwms library only detects Opera7
fileplanet.com
  • Fileplanet.com sniffing blocks Opera
jobkorea.co.kr
  • Multiple fixes
joins.com
  • Multiple fixes
moneta.co.kr
  • moneta.co.kr relies on IE quirks for CSS positioning
americanexpress
  • AmericanExpress blurs form elements on click
epa.qld.gov.au
  • epa.qld.gov.au site uses capturing load events.
rec.feeds.yahoo
  • Make "add feeds" dialog work in Y!Mail beta
ebay
  • Multiple fixes
google
  • Multiple fixes
hp.com
  • HP shopping site is designed for smaller fonts
ibm.com
  • IBM driver download has HTML comments inside SCRIPT tag, breaks parsing
mail.yahoo
  • Multiple fixes
orkut.com
  • Orkut uses curly braces in regular expressions without escaping them
scandinavian.net
  • Selects are reset if first option is removed in onchange
sony
  • UDM on sony.com breaks if insertRule throws exceptions
t-online.de
  • Multiple fixes
ulead
  • Ulead.com old Milonic menu
yahoo
  • Multiple fixes
able.co.jp
  • able.co.jp uses capturing event listeners
adobe.com
  • adobe.com browser sniffing causes endless scrolling
airfrance
  • AirFrance use getYear when they should use getFullYear
airgreenland.com
  • Air Greenland is not compatible with WF2 spec required attribute
aol.co.uk
  • AOL login hidden by IFRAME
aol.com
  • Multiple fixes
apple.com
  • Apple.com is written for higher resolutions than a TV
apple.viamichelin.com
  • Text on Apple store locator page is misaligned and overlapping
barnesandnoble.com
  • Barnes&Noble uses "required" attributes on elements that aren't required
belastingdienst.nl
  • enabling an alternate stylesheet while it is still loading is ignored
betfair.com
  • Betfair relies on firstChild defined on attribute nodes
bioware.com
  • bioware.com uses outdated HierMenus
blogger.com
  • Multiple fixes
bloglines.com
  • Bloglines, designMode case sensitivity issue
bnz.co.nz
  • bnz.co.nz use getYear when they should use getFullYear
britishairways
  • Multiple fixes
bruneiair.com
  • Brunei Air site uses action attribute on button, conflicts with WebForms2
budget.com
  • Budget.com: menu appears behind IFRAME "shim"
bugs.co.kr
  • bugs.co.kr reloads due to SCRIPT with for and event attributes
capitalone.com
  • CapitalOne login fails - cross-domain access on https disallows setting location
cheaptickets.com
  • Cheaptickets new Function() issue workaround
chosun.com
  • chosun.com scrollarea fix
continental.com
  • Continental.com document.activeElement fix enables airport choice popup
dancenter.com
  • Dancenter use getYear when they should use getFullYear
dcf-access.dcf.state.fl.us
  • Access Florida invalid markup problem
deviantart.com
  • Multiple fixes
douane.nl
  • enabling an alternate stylesheet while it is still loading is ignored
elkjop.no
  • Elkjøp UI breaks on Nintendo Wii because select-multiple by default doesn't un-select other options on click
estadao.com.br
  • Estadao redefines window.XMLHttpRequest with a function declaration
eurosport
  • Eurosport hides content with negative z-index unintentionally
fotocenter.aol.de
  • AOL: browser warnings for various features of aol.de
gallery.live.com
  • Live.com properties overwrite page from click tracking script
geoaccess.com
  • BlueCross browser sniffing prevents insurance search
hangame.com
  • hangame.com SPANs should be inline-block
icicidirect.com
  • styling INPUT with text-transform can confuse users
idg.se
  • speed up back/forward navigation, ensure ads do not re-appear
ingdirect.com.au
  • ING Direct login issues
ipop.co.kr
  • ipop.co.kr SPAN should be inline-block
irishferries.com
  • Unexpected text nodes in document.all breaks booking
isbank.com.tr
  • Multiple fixes
klm.com
  • KLM uses Gecko-specific originalTarget
lgmobile.com
  • LG Mobile Flash does not load as expected because of missing type attribute
mail.google
  • Multiple fixes
mail.live.com
  • Multiple fixes
makemytrip.com
  • Multiple fixes
mapquest.com
  • MapQuest uses .all collection with text nodes in
maps.live.com
  • Multiple fixes
maps.ubiest.com
  • Ubiest.com uses CSS filters if document.all exists
maybank2u.com.my
  • maybank2u, onresize event causes a refresh whenever the softkeyboard is opened
monster
  • Monster category tree broken by their selectNodes function overwriting .text on nodes
msnbc.com
  • MSNBC sniffing hides Flash content
music.mu-mo.net
  • mu-mo.net uses SCRIPT for..event.. syntax
n-gage.com
  • N-Gage plugin sniffing does not give Flash to Mac Opera
namooya.com
  • Namooya.com main flash does not appear
nbc4.tv
  • NBC4.tv uses capturing load events
nbcolympics.com
  • NBC Olympics site uses capturing load events
nectar.com
  • Nectar uses getYear where they should use getFullYear
news.msn.co.kr
  • news.msn.co.kr navigation bar is offset from the page
nick.com
  • Nick.com flash detection fix
nrg.co.il
  • Multiple fixes
o2active
  • o2active.de, making sure narrow centered column does not appear off-screen
orbitz.com
  • Orbitz new Function() issue workaround
pda.naver.com
  • pda.naver.com appears half-offscreen
peugeot.no
  • Peugeot.no defines function inside conditional
picasaweb.google
  • Picasaweb browser sniffing removes functionality Opera has no problems with, for example slideshow
poczta.onet.pl
  • poczta.onet.pl RTE broken in 9.50
pogo.com
  • Multiple fixes
prisjakt.nu
  • prisjakt.nu capturing load events on back navigation
reviews.cnet.com
  • CNet videos: document.write adds a script that depends on variables defined later
sabadellatlantico.com
  • SabadellAtlantico use getYear when they should use getFullYear
singaporeair.com
  • Singapore Airlines booking not working because they confuse post and get requests
spaces.live.com
  • Multiple fixes
sperrysoftware.com
  • Nested tables with 100% height are not laid out as expected, menu is pushed down
spreadsheets
  • Faking support for event object properties layerX and layerY
sun.com
  • Menu entries off-screen on sun.com due to font size
synaptics.com
  • Synaptics.com outdated HVMenu
tdwaterhouse.ca
  • tdwaterhouse.ca login fails - cross-domain access on https disallows setting location
teletekst.nos.nl
  • Teletext focus fix
thaiair.com
  • Thai Air site uses getYear, detects Opera and appends 1900
time.com
  • Multiple fixes
toeslagen.nl
  • enabling an alternate stylesheet while it is still loading is ignored
united.com
  • United.com flight search problem: hidden images do not load, so no onload event
usairways.com
  • USAirways is not compatible with WF2 spec required attribute
verizon.com
  • Multiple fixes
video.nbc.com
  • NBC.com video problems
wachovia.com
  • Viewing checks calls createElement with markup strings if document.all exists
walla.co.il
  • Multiple fixes
washingtonpost.com
  • Washington Post picks wrong script branch because site thinks Opera is IE
westjet.com
  • Westjet browser sniffing causes reload loop
wetter.rtl.de
  • Font size adjustments to avoid overlapping on wetter.rtl.de
worldofwarcraft.com
  • Mouseover popups do not appear due to document.all sniffing
yellowpages.com.au
  • Yellow pages event capture fix
ynet.co.il
  • YNet article comments display fix
zdnet.com.com
  • ZDnet video site plays non-existing files if browser is Opera
aumypage.duogate.jp
  • au my page XMLHttp re-use issue
id.orange.fr
  • Frame breaker runs into tight security policy
wap.smart.com.ph
  • Multiple fixes
xhtml.emome.net
  • emome.net wap portal does not trigger mobile view
https://www.bookryanair.com/skylights/cgi-bin/skylights.cgi
  • Selects are reset if an option is changed from onchange.
wp-admin
  • Wordpress Admin prev/next link styling makes them unclickable

Patched scripts

  • Old versions of the following popular script libraries, all of which fail in Opera:
    • "Sothink menus" versions 3.72 and earlier; changes browser detection to make the menus use the correct code in Opera.
    • "Milonic menus": changes browser detection to make the menus use the correct code in Opera.
    • "HierMenus": changes browser detection so the menu is not disabled in Opera.
    • "Likno AllWebMenus", builds earlier than 498; changes browser detection to make the menus use the correct code in Opera.
    • "Menu/Pop Menu": (HV Menu); changes browser detection so the menu is not disabled in Opera.
    • "Ultimate Dropdown Menu": changes browser detection so the menu is not disabled in Opera.
    • "OpenCube menus": changes browser detection to make the menus use the correct code in Opera.
    • "Coolmenus": changes browser detection to make the menus use the correct code in Opera.
    • "DynAPI": changes browser detection to make the library use the correct code in Opera.
    • "Transmenus": changes browser detection and code to make the library use the correct code in Opera.
    • "TinyMCE" 2.x versions: works around a bug that prevents enabling editing mode. 3.0.x versions: works around an issue that breaks the enter key
  • Working around incompatibility with prototype - argument extends array but not all methods work correctly
  • Prototype requires function.toString to return a unique string per function
  • The required attribute does not take the value false according to WebForms2 - remove "required=false" from form elements
  • Remove non-breaking spaces inserted by rich text editing bug
  • Fake support for MozOpacity properties on style object (some platforms only)
  • Allow scripts to define reserved word top, but not not allow javascript: URLs to read the custom value
  • documentElement.firstChild must always be the HEAD element
  • Router configuration SCRIPT in OPTION tag fix
  • PDF security patch

Note to webmasters

There are several reasons why Opera might modify your pages. These include:

  • Opera may prevent a browser detect on your pages from causing problems.
  • Opera may fix incompatible, invalid, out-of-date, or problematic code used on your pages.

If you think Opera is modifying your page incorrectly or unnecessarily, or if you have removed the cause of the problems, please mail web-compliance@opera.com.

If you wish to disable Browser JavaScript to allow you to test your fixes, you can do this by setting Browser JavaScript to 0 in Opera6.ini.