@@ -2,6 +2,22 @@ const whoisRoot = "Root Ventures is a San Francisco-based deep tech seed fund ma
22const timeUnit = 1000 ; // useful for development, set to 10 to run faster, set to 1000 for production
33let killed = false ;
44
5+ function SpawnRickRollPointers ( ) {
6+ function padNumber ( num , length ) {
7+ let str = num . toString ( ) ;
8+ while ( str . length < length ) {
9+ str = '0' + str ;
10+ }
11+ return str ;
12+ }
13+
14+ const colSize = term . cols >= 40 ? 39 : 24
15+
16+ for ( let i = 0 ; i <= colSize ; i ++ ) {
17+ term . stylePrint ( `${ colorText ( `vsabnBRXofjub${ padNumber ( i , 2 ) } ` , "command" ) } ` , false ) ;
18+ }
19+ }
20+
521const commands = {
622 help : function ( ) {
723 const maxCmdLength = Math . max ( ...Object . keys ( help ) . map ( x => x . length ) ) ;
@@ -92,14 +108,7 @@ const commands = {
92108 } ,
93109
94110 test : function ( ) {
95- // innerText HTMLElement pointer for the correct terminal line.
96- // We use this line to replace it with a video element.
97- term . stylePrint ( `${ colorText ( "nf134bf139b" , "command" ) } ` , false ) ;
98-
99- // Mass print of background lines to correctly represent the height of the video
100- for ( let i = 0 ; i < 41 ; i ++ ) {
101- term . stylePrint ( `${ colorText ( "dn19BRXub191" , "command" ) } ` , false ) ;
102- }
111+ SpawnRickRollPointers ( )
103112 } ,
104113
105114 email : function ( ) {
@@ -249,14 +258,7 @@ const commands = {
249258 term . stylePrint ( `No such file: ${ filename } ` ) ;
250259 }
251260 if ( filename == "id_rsa" ) {
252- // innerText HTMLElement pointer for the correct terminal line.
253- // We use this line to replace it with a video element.
254- term . stylePrint ( `${ colorText ( "nf134bf139b" , "command" ) } ` , false ) ;
255-
256- // Mass print of background lines to correctly represent the height of the video
257- for ( let i = 0 ; i < 41 ; i ++ ) {
258- term . stylePrint ( `${ colorText ( "dn19BRXub191" , "command" ) } ` , false ) ;
259- }
261+ SpawnRickRollPointers ( )
260262 }
261263 } ,
262264
0 commit comments