@@ -3,7 +3,7 @@ import window from 'window';
33import $ from '$' ;
44import _ from '_' ;
55import ko from 'ko' ;
6- import { $html , $ body} from 'Common/Globals' ;
6+ import { $body } from 'Common/Globals' ;
77import { EventKeyCode , Magics } from 'Common/Enums' ;
88import { trim , inArray , changeTheme } from 'Common/Utils' ;
99import { reload as translatorReload } from 'Common/Translator' ;
@@ -40,43 +40,6 @@ function cmdHelp(cmds) {
4040 return require ( 'Html/Cmds/Help.html' ) . replace ( '{{ commands }}' , cmds . join ( ' ' ) ) ;
4141}
4242
43- /**
44- * @returns {void }
45- */
46- function initGlass ( ) {
47- let state = null ;
48- try {
49- if ( window . localStorage && window . localStorage . setItem )
50- {
51- state = '1' === '' + window . localStorage . getItem ( 'rl-labs-glass' ) ;
52- }
53- }
54- catch ( e ) { } // eslint-disable-line no-empty
55-
56- if ( null !== state )
57- {
58- $html . toggleClass ( 'glass' , ! ! state ) ;
59- }
60- }
61-
62- /**
63- * @returns {string }
64- */
65- function cmdGlass ( ) {
66- const state = ! $html . hasClass ( 'glass' ) ;
67-
68- try {
69- if ( window . localStorage && window . localStorage . setItem )
70- {
71- window . localStorage . setItem ( 'rl-labs-glass' , state ? '1' : '0' ) ;
72- }
73- }
74- catch ( e ) { } // eslint-disable-line no-empty
75-
76- $html . toggleClass ( 'glass' , state ) ;
77- return '' ;
78- }
79-
8043/**
8144 * @returns {string }
8245 */
@@ -124,7 +87,7 @@ class CmdContoller
12487
12588 cmdHelper = ko . observable ( '' ) ;
12689
127- cmds = [ 'help' , 'version' , 'glass' , ' clear', 'theme' , 'lang' ] ;
90+ cmds = [ 'help' , 'version' , 'clear' , 'theme' , 'lang' ] ;
12891 cmdsWithParameters = [ 'theme' , 'lang' ] ;
12992
13093 isAdmin = false ;
@@ -205,9 +168,6 @@ class CmdContoller
205168 case 'help' :
206169 result = cmdHelp ( this . cmds ) ;
207170 break ;
208- case 'glass' :
209- result = cmdGlass ( ) ;
210- break ;
211171 case 'v' :
212172 case 'version' :
213173 result = cmdVersion ( ) ;
@@ -390,6 +350,3 @@ export function toggle()
390350 } , Magics . Time50ms ) ;
391351 }
392352}
393-
394- // init
395- initGlass ( ) ;
0 commit comments