Thursday, September 29, 2016

Oracle offline documentation links always open in new window

First of all, try to renew downloaded documentation, recent versions (at least September 2016) doesn't have such issue. If you can't, the following is for you.

Later offline versions of Oracle 11g and 12c offline documentations use java scripts for generating links. During offline browsing every link opens new window, which is uncomfortable for navigating/reading etc. Playing with styles in the directory

(unzipped_documentation_directory)/dcommon

 didn't bring any result as well as modifying files

(unzipped_documentation_directory)/dcommon/js/common.js
(unzipped_documentation_directory)/dcommon/js/headfoot.js
(unzipped_documentation_directory)/dcommon/js/headfoot_prev.js

 for changing strings containing 'img.style.display = "inline"' to 'img.style.display = "none"' etc.

The following workaround doesn't claim to be a panacea.

For myself I've decided to change firefox setting "browser.link.open_newwindow" to 1 with help of about:config. This setting prevents to open new windows and tabs for all web pages. But it's always possible to use right mouse button or shift/ctrl+left mouse button to open links in new window/tab respectivly, allowing you to make decision whether display page in the current window or not.

The similar possibility exists in other popular browsers.