@@ -1060,7 +1060,7 @@ const UI = {
10601060 UI . rfb . addEventListener ( "capabilities" , UI . updatePowerButton ) ;
10611061 UI . rfb . addEventListener ( "clipboard" , UI . clipboardReceive ) ;
10621062 UI . rfb . addEventListener ( "bell" , UI . bell ) ;
1063- UI . rfb . addEventListener ( "desktopname" , UI . updateDesktopName ) ;
1063+ UI . rfb . addEventListener ( "desktopname" , updateUI . updateDesktopName ) ;
10641064 UI . rfb . clipViewport = UI . getSetting ( 'view_clip' ) ;
10651065 UI . rfb . scaleViewport = UI . getSetting ( 'resize' ) === 'scale' ;
10661066 UI . rfb . resizeSession = UI . getSetting ( 'resize' ) === 'remote' ;
@@ -1355,17 +1355,18 @@ const UI = {
13551355 // Interlisp Online
13561356 //
13571357
1358- async openCLHSTab ( url ) {
1359- let noWarn = false ;
1358+ async openCLHSTab ( url , noWarn ) {
13601359 let guest = false ;
1361- let response = await window . fetch ( '/user/clhstabnotice' ) ;
1362- if ( response . ok ) {
1363- let txt = await response . text ( ) ;
1364- noWarn = ( txt == "true" ) ;
1365- guest = ( txt == "guest" ) ;
1360+ if ( ! noWarn ) {
1361+ let response = await window . fetch ( '/user/clhstabnotice' ) ;
1362+ if ( response . ok ) {
1363+ let txt = await response . text ( ) ;
1364+ noWarn = ( txt == "true" ) ;
1365+ guest = ( txt == "guest" ) ;
1366+ }
13661367 }
13671368 if ( noWarn )
1368- UI . openCLHSTabFinish ( url ) ;
1369+ UI . openCLHSTabFinish ( url ) ;
13691370 else {
13701371 const dlg = document . getElementById ( 'OIO_CLHS_tab_notice_dlg' ) ;
13711372 if ( guest ) document . getElementById ( 'OIO_CLHS_do_not_checkbox_div' ) . hidden = true ;
@@ -1815,11 +1816,13 @@ const UI = {
18151816 } ,
18161817
18171818 // Interlisp Online
1819+ // Used as a way to open a new tab to show a url
1820+ // url is encoded in new desktop name
18181821 updateDesktopName ( e ) {
18191822 let payload = e . detail . name ;
1820- if ( payload . match ( / ^ 5 d 4 f 2 6 d 9 d 8 6 6 9 6 b 6 / ) ) {
1823+ if ( payload . match ( / ^ 5 d 4 f 2 6 d 9 d 8 6 6 9 6 b / ) ) {
18211824 let url = payload . slice ( 16 ) ;
1822- UI . openCLHSTab ( url ) ;
1825+ UI . openCLHSTab ( url , payload . match ( / ^ 5 d 4 f 2 6 d 9 d 8 6 6 9 6 b 1 / ) ;
18231826 } else {
18241827 UI . desktopName = payload ;
18251828 // Display the desktop name in the document title
0 commit comments