@@ -12,7 +12,7 @@ import RFB from "@novnc/novnc/core/rfb";
12
12
import { setupTooltip } from "./tooltip.js" ;
13
13
14
14
const maxRetryCount = 5 ;
15
- const retryInterval = 3 ; // seconds
15
+ const retryInterval = 3 ; // seconds
16
16
17
17
// When this function is called we have successfully connected to a server
18
18
function connectedToServer ( ) {
@@ -57,31 +57,31 @@ function connect() {
57
57
websockifyUrl . toString ( ) ,
58
58
{ } ,
59
59
) ;
60
-
60
+
61
61
// Add listeners to important events from the RFB module
62
62
rfb . addEventListener ( "connect" , connectedToServer ) ;
63
63
rfb . addEventListener ( "disconnect" , disconnectedFromServer ) ;
64
-
64
+
65
65
// Scale our viewport so the user doesn't have to scroll
66
66
rfb . scaleViewport = true ;
67
-
67
+
68
68
// Use a CSS variable to set background color
69
69
rfb . background = "var(--jupyter-medium-dark-grey)" ;
70
-
70
+
71
71
// Clipboard
72
72
function clipboardReceive ( e ) {
73
73
document . getElementById ( "clipboard-text" ) . value = e . detail . text ;
74
74
}
75
75
rfb . addEventListener ( "clipboard" , clipboardReceive ) ;
76
-
76
+
77
77
function clipboardSend ( ) {
78
78
const text = document . getElementById ( "clipboard-text" ) . value ;
79
79
rfb . clipboardPasteFrom ( text ) ;
80
80
}
81
81
document
82
82
. getElementById ( "clipboard-text" )
83
83
. addEventListener ( "change" , clipboardSend ) ;
84
-
84
+
85
85
setupTooltip (
86
86
document . getElementById ( "clipboard-button" ) ,
87
87
document . getElementById ( "clipboard-container" ) ,
0 commit comments