How to allow a single user to browse servicenow instance using browser(chrome,edge etc) on Mobile.

vinitaraico
Tera Contributor

Hi Team,

 

In Our instance we have restricted users to  browse ServiceNow instance using browser(chrome,edge etc) on Mobile ,However now i need it enable for  single users I tried below in  "For Mobile" UI script but didn't help Any suggestion appreciated

 

(function() {
    if (!snmCabrillo.isNative() && detectmob())
        window.location.href = "https://www.google.com/";
})();

function detectmob() {


    if(gs.getUserID=='sys_id of user')
    {
        return false;
    }
    if (navigator.userAgent.match(/Android/i) ||
        navigator.userAgent.match(/webOS/i) ||
        navigator.userAgent.match(/iPhone/i) ||
        navigator.userAgent.match(/iPad/i) ||
        navigator.userAgent.match(/iPod/i) ||
        navigator.userAgent.match(/BlackBerry/i) ||
        navigator.userAgent.match(/Windows Phone/i)
    ) {
        return true;
    } else {
        return false;
    }
}
0 REPLIES 0