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.
Current browser.js status: disabled. How do I enable it?enabled.
Target version and time stamp of the active browser.js file is .
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.
- 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 screen will tell you where the profile folder is.
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.
Enabling browser.js
If you have changed settings, or changed the file itself the browser.js feature may have become disabled.
- Go to the Browser JavaScript setting and change the value to 2.
- Click the "Save" button below the setting.
- Re-load this page and check if the status message at the top says browser.js is enabled.
If this doesn't work for you, the file may be corrupted. Please follow the instructions on "checking for updates manually" in the next section.
Checking for updates manually
Opera downloads the file automatically once a week, but if you want to make absolutely sure you have the latest file you can follow these steps:
- Go to the Browser JavaScript setting and change the value to 1.
- Click the "Save" button below the setting.
- Use .
Opera may tell you no new Opera version is available, but it will still check for a new version of the browser.js file.
Patches applied by Browser JavaScript
In most cases, when Browser JavaScript applies a fix, a message is posted in the JavaScript console () saying that the page has been changed.
Please note: 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
- bbc.co.uk
-
- Mobile BBC should default to mobile view
- fileplanet.com
-
- Fileplanet.com sniffing blocks Opera
- moneta.co.kr
-
- moneta.co.kr relies on IE quirks for CSS positioning
- nmviewogc.cr.usgs.gov
-
- National Map Viewer on USGS relies on Netscape detection for functionality
- windowsmedia.com
-
- Mobile Windowsmedia site does not trigger mobile view
- americanexpress
-
- AmericanExpress blurs form elements on click
- amazon
-
- Workaround for a layout bug in opera that only affects older versions, causing the search field on amazon.com and amazon.de to becoe 3 pixels wide.
- epa.qld.gov.au
-
- epa.qld.gov.au site uses capturing load events.
- mail.google.com
-
- Hides supported browser complaint in header
- rec.feeds.yahoo
-
- Make "add feeds" dialog work in Y!Mail beta
- slashdot.org
-
- Removes large focus areas covering the article area and the columns to the right.
- anz.com
-
- ANZ online bank form action URLs are incorrectly decoded
- dell
-
- browser sniffing on support.dell.com
- ebay
-
- google
-
- Google calendar date selection fails due to order of blur and mousedown events
- hp.com
-
- HP shopping site is designed for smaller fonts
- ibm.com
-
- IBM driver download has HTML comments inside SCRIPT tag, breaks parsing
- icicibank
-
- ICICI online bank form action URLs are incorrectly decoded
- mail.yahoo
-
- 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
-
- ulead
-
- Ulead.com old Milonic menu
- yahoo
-
- able.co.jp
-
- able.co.jp uses capturing event listeners
- allabout.co.jp
-
- Works around script scheduling bug on AllAbout
- ameba.jp
-
- aol.co.uk
-
- AOL login hidden by IFRAME
- aol.com
-
- 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
- att.com
-
- ATT / Bellsouth browser sniffing
- barnesandnoble.com
-
- Barnes&Noble uses "required" attributes on elements that aren't required
- bbs.dzart.net
-
- Avoid manipulating broken Discuz! markup on bbs.dzart.net
- bbs.hxsd.com
-
- Broken CSS makes fonts too small on bbs.hxsd.com
- bbs.kafan.cn
-
- Setting innerHTML to badly nested markup breaks forum layout on bbs.kafan.cn
- 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
-
- bloglines.com
-
- Bloglines, designMode case sensitivity issue
- bnz.co.nz
-
- bnz.co.nz use getYear when they should use getFullYear
- bookryanair.com
-
- Make Opera's built-in WF2 validation ignore required attributes on bookryanair.com
- britannica.com
-
- Prevent overwriting document with stats graphic on britannica.com
- britishairways
-
- budget.com
-
- Budget.com: menu appears behind IFRAME "shim"
- bugs.co.kr
-
- bugs.co.kr reloads due to SCRIPT with for and event attributes
- cajamadrid.es
-
- Caja Madrid hides login form by CSS mistake
- capitalone.com
-
- CapitalOne login fails - cross-domain access on https disallows setting location
- cdec-sic.cl
-
- Old HierMenus on cdec-sic.cl
- chase.com
-
- chase.com field refocus from onkeypress-problem
- cheaptickets.com
-
- Cheaptickets new Function() issue workaround
- chosun.com
-
- 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
-
- diodeo.com
-
- Offsets a very noticeable image in the header of diodeo.com
- douane.nl
-
- enabling an alternate stylesheet while it is still loading is ignored
- drudgereport.com
-
- 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
- facebook.com
-
- fedex.com
-
- FedEx.com mangles tables by turning TDs into block elements
- fotocenter.aol.de
-
- AOL: browser warnings for various features of aol.de
- foxnews.com
-
- gallery.live.com
-
- Live.com properties overwrite page from click tracking script
- geoaccess.com
-
- BlueCross browser sniffing prevents insurance search
- ibank.isb.ru
-
- browser sniffing breaks ibank.isb.ru
- icelandair
-
- jQuery script scheduling trouble on Icelandair
- icicidirect.com
-
- styling INPUT with text-transform can confuse users
- iieye.com
-
- IE detection prevents other browsers from accessing iieye.com
- ingdirect.com.au
-
- iple.com
-
- Blocks floating flash ad on iple.com
- irishferries.com
-
- Unexpected text nodes in document.all breaks booking
- isbank.com.tr
-
- klm.com
-
- KLM uses Gecko-specific originalTarget
- kr.msn.com
-
- head layout broken on kr.msn.com
- ktfmembers.com
-
- ktfmembers absolutely positioned flash blocks login
- lgmobile.com
-
- LG Mobile Flash does not load as expected because of missing type attribute
- login.live.com
-
- Hotmail: redirect to mobile version
- m.reference.com
-
- Mobile reference.com uses generic doctype
- m.zdnet.com
-
- Mobile zdnet.com should be displayed in mobile view
- mail.126.com
-
- can't read E-mail on 126.com due to XML parse error
- mail.163.com
-
- mail.google
-
- mail.live.com
-
- mail.yahoo.com
-
- makemytrip.com
-
- mapquest.com
-
- MapQuest uses .all collection with text nodes in
- maps.google
-
- Google maps eval callback
- maps.live.com
-
- maps.ubiest.com
-
- Ubiest.com uses CSS filters if document.all exists
- marktplaats.nl
-
- Can't add article to favourites because setting link.search has no effect
- maybank2u.com.my
-
- maybank2u, onresize event causes a refresh whenever the softkeyboard is opened
- microsoft.com
-
- millenet.pl
-
- Semicolon insertion fails after do..while() conditional
- mobil.debitel.de
-
- mobile.answers.com
-
- Mobile answers.com displayed as desktop site
- mobile.handango.com
-
- mobile.handango.com pages are displayed in overview mode, since they are declared without doctype.
- mobile.microsoft.com
-
- Mobile microsoft.com should be displayed as a mobile page
- mobile.orange.ch
-
- Fix for table align making tables behave as inline on mobile.orange.ch
- mobile.youporn.com
-
- Mobile youporn.com uses generic doctype
- 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
- netian.com
-
- Moves the absolutely positioned SMS div on netian.com (after logging in)
- netpia.linkprice.com
-
- Clears popups that are visible after loading subpages on netpia.linkprice.com
- news.bbc.co.uk
-
- news.msn.co.kr
-
- news.msn.co.kr navigation bar is offset from the page
- nick.com
-
- Nick.com flash detection fix
- nokia.com
-
- nrg.co.il
-
- NRG.co.il saving articles does not work
- o2active
-
- o2active.de, making sure narrow centered column does not appear off-screen
- orbitz.com
-
- Orbitz new Function() issue workaround
- orkut.com
-
- pda.naver.com
-
- pda.naver.com appears half-offscreen
- 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
-
- prisjakt.nu
-
- prisjakt.nu capturing load events on back navigation
- rabobank.nl
-
- Rabobank cancels t keypress
- redfin.com
-
- Solve Dojo script scheduling trouble on redfin.com
- 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
- santandertotta.pt
-
- Santandertotta.pt IFRAME resize script detects Opera
- sayclub.com
-
- hides id and password background images that are text input backgrounds
- sfile.ydy.com
-
- Avoid manipulating broken Discuz! markup on sfile.ydy.com
- show.co.kr
-
- Pre-filled text as INPUT background not cleared on focus
- shutterfly.com
-
- Array splice throws on 0-length arrays, breaks Shutterfly.com
- sina.com.cn
-
- spaces.live.com
-
- sperrysoftware.com
-
- Nested tables with 100% height are not laid out as expected, menu is pushed down
- sports.donga.com
-
- Blocks floating flash ad on sports.donga.com that cannot be closed
- spreadsheets
-
- Faking support for event object properties layerX and layerY
- star.moneytoday.co.kr
-
- Clicks on a link to display the front page story in an iframe on star.moneytoday.co.kr
- sun.com
-
- Menu entries off-screen on sun.com due to font size
- surveymonkey.com
-
- sytadin.fr
-
- Sytadin.fr IFRAME resize script detects Opera
- tdwaterhouse.ca
-
- tdwaterhouse.ca login fails - cross-domain access on https disallows setting location
- teletekst.nos.nl
-
- time.com
-
- time.com script causes reload loop if UA contains "Windows CE"
- tiscali.it
-
- Allows some frame nesting on web.tiscali.it
- tistory.com
-
- two login buttons on tistory.com
- 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
- video.nbc.com
-
- vkontakte.ru
-
- vodafonelive.de
-
- wachovia.com
-
- Viewing checks calls createElement with markup strings if document.all exists
- walla.co.il
-
- walmart.com
-
- Walmart hides "find in store" popup unintentionally
- 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
- www.ojogo.pt
-
- yam.de
-
- 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
- live.vodafone.com
-
- Display Vodafone's Google search site in Normal Zoom by default
- mobile.vzwapp.com
-
- VZW mobile portal does not trigger mobile view
- wap.smart.com.ph
-
- 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.
- mk.co.kr
-
- mk.co.kr requests a lot of additional javascript after checking document.all - customer requested fix for load time
- Maconomy/MaconomyPortal
-
- Fix unload form submit behavior on Maconomy portals
- 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
- Generic JS library patches
- Allow scripts to define reserved word top, but not not allow javascript: URLs to read the custom value
- Compatibility layer for Google Gears initialization script
- Router configuration SCRIPT in OPTION tag fix
- PDF security patch
- document.domain can not be set to last TLD
- NHK and iui.js relies on array indexOf
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 report it in our bug tracking system.
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. A quicker way to do this is to access opera:config#Browser JavaScript, since toggling this setting in opera:config does not require restarting Opera.