FAR HTML 5.7 and greater ships with a file NavScript.js (typically installed to C:\Program Files (x86)\Helpware\FAR\extra\). Benefits of including NavScript.jsInclude this at the top (after <body>) of each topic HTML file to achieve the following advantages: - Closing the Nav pane displays a link (top-left) to reopen the Nav
Try it now. Go to helpware site and close the Nav pane [X]. Then click "< Table Of Contents" link to reopen the Nav pane. Developers can edit NavScript.JS to tweak or disable this feature. The code will not display the link if inside a CHM file.
- Allows "sync toc" to work even when browser security is blocking cross frame communication
HTML5 has new local storage JavaScript functions that help us when browser security blocks cross frame communications. NavScript.js uses these functions to pass the topic URL to the nav frame. This only works for HTML 5 enabled browsers (all new browsers).
How to inserting NavScript.js into all HTML topic filesFAR can quickly insert a JS link into all your HTML topic files and will compensates correctly for different folder levels.
- Add NavScript.js to the root folder of your HTML web. Or another location.
- Add your HTML files to FAR. ie. Set the FAR drop file filter to HTML files and drop the root folder onto FAR. Then remove any unwanted files (like nav files etc) that don't require NavScript.js inserted.
- Open Commands > Advanced Find & Replace window, check "Replace Text" and select "Insert NavScript.js" from the insert drop down.
|