The “Mindoo Xulrunner Prefs.js Management Plugin” can be used to manage the local Xulrunner preferences file “prefs.js” of the IBM Notes Client based on a set of Notes.ini variables. Preferences can get added if they do not exist yet, overwritten if they already exist and have a different value and they can be removed.


Xulrunner is the browser engine that is used for XPages in the Notes Client (XPiNC).

The original purpose of this plugin was to set one specific preference in the prefs.js file that allows XPages developers to close the current XPiNC tab by calling the JavaScript function “window.close();”, which is by default not possible (highest tested clients IBM Notes R9), because browser security restrictions are in place.


This is the preference to set for the described purpose:

 

user_pref("dom.allow_scripts_to_close_windows", true);

 

But there may also be other useful preferences, so we developed the plugin in a flexible way.


We use a plugin to manage the prefs.js file, because the file content cannot be changed anymore as soon as the Xulrunner engine has been launched and has read the prefs.js content (e.g. when used in a sidebar plugin or an open tab).

So we needed a way to make sure the modification is made right on Notes Client startup, which is not a hard task for an Eclipse plugin, but almost impossible using LotusScript.


Credits
Thanks to Steve Pridemore who discovered the Xulrunner preference to enable „window.close();“ and wrote about it in the XPages Skype chat!