Hiding Notes links for Mobile Web users

Probably you are working in a collaborative environment where users access their beloved Notes apps with multiple clients: The Notes client, The Notes Browser plugin, Web browser and mobile devices.

Not all Notes applications have defined business cases in which they should become web-enabled. This could be because of application complexity or that the life-cycle / ownership of the application is poorly defined.

Nevertheless it is hard to prohibit that links to these applications or documents in them are being published on web-pages (probably you want to promote the distribution of information). Luckily there is that lovely tool called the IBM Notes Browser Plugin but this plugin is restricted to normal web browsers and not to all of them.

And then you have your ‘leading’ technology adapting usergroup that prefer to access Notes data in app and web-page form. For them the Notes Browser Plugin is not available so why should you bother to show them links to documents in applications that have not been web-enabled yet?

The following script will hide these Notes link on web-pages  and replace them with just text. It uses the deviceBean which provides an easy to use and easy to program way of identifying a popular range of mobile and tablet devices.

var isMobile = ‘#{javascript:return deviceBean.isMobile()}’;
if (isMobile==’true’){
$( document ).ready(function() {
$(“a[href^=’Notes://’]”).each(function () {
$(this).replaceWith($(this).text());
});
});
}

Add it to the onClientLoad event of your XPage.

Leave a comment