OGeza
Tera Expert

Hi there Community!

During my workday, I often have to switch between my non-admin and my admin accounts, plus the admin user session is set to expire after 30mins of inactivity. Because of this, I have found myself opening a new tab for the login page, logging in, closing the tab, going back to the previous tab, and refreshing the page so that I can have my admin rights.

I decided to create a bookmark script that would make the whole procedure easier, and since I'm using it, my workflow has dramatically got better. I decided to share the script with you as I assume you also face the same issue.

Here it is:

javascript:
let params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=300,height=300,left=100,top=100`;
let loginWin = window.open("http://" + window.location.hostname + "/login", "login", params);
setInterval(()=>{ if(!loginWin.location.pathname.includes("login")){ loginWin.close(); window.location.reload(); };}, 500);

To use it do the followings:

  • In your browser create a new bookmark (most likely you will have to go to your Favourites page, and have to press a button called something like "Add favourite").
  • The name can be anything (I named it simply "Login").
  • To the URL field paste the entire script from above (even the "javascript:" part!).
  • Open any Servicenow instance, and press the bookmark that you just created
  • Enter your details in the popup (it even works with Password managers such as Keepass), press Log in.

That would be it, hope that it will make your life easier as well! 🙂

P.S.: sometimes the bookmark has to be pressed more than once, but it's still faster than doing the whole procedure as described at the beginning of this article.

Please mark this Article as Helpful if it helped you!
Version history
Last update:
‎07-15-2022 12:33 AM
Updated by: