Advertisement
Guest User

external browser

a guest
Dec 11th, 2023
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     document.addEventListener('click', (e: any) => {
  2.         if (e.target.tagName === 'A' &&
  3.             e.target.href.match(/^https?:\/\//)) {
  4.             Log.Debug('catching link. opening in external browser');
  5.             e.preventDefault();
  6.             window.open(e.target.href, '_system');
  7.         }
  8.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement