@@ -65,7 +65,10 @@ <h1>Opening library documentation failed</h1>
65
65
}
66
66
scrollToHash ( ) ;
67
67
setTimeout ( function ( ) {
68
- document . getElementById ( "keyword-statistics-header" ) . innerText = '' + libdoc . keywords . length ;
68
+ document . getElementById ( "keyword-statistics-header" ) . innerText = '' + libdoc . keywords . length ;
69
+ if ( storage . get ( 'keyword-wall' ) === 'open' ) {
70
+ openKeywordWall ( ) ;
71
+ }
69
72
} , 0 ) ;
70
73
} ) ;
71
74
@@ -196,12 +199,26 @@ <h1>Opening library documentation failed</h1>
196
199
function toggleShortcuts ( ) {
197
200
const shortcuts = document . getElementsByClassName ( "shortcuts" ) [ 0 ] ;
198
201
if ( shortcuts . classList . contains ( "keyword-wall" ) ) {
199
- shortcuts . classList . remove ( "keyword-wall" ) ;
202
+ closeKeywordWall ( ) ;
200
203
} else {
201
- shortcuts . classList . add ( "keyword-wall" ) ;
204
+ openKeywordWall ( ) ;
202
205
}
206
+ }
207
+
208
+ function openKeywordWall ( ) {
209
+ const shortcuts = document . getElementsByClassName ( "shortcuts" ) [ 0 ] ;
210
+ shortcuts . classList . add ( "keyword-wall" ) ;
211
+ storage . set ( "keyword-wall" , 'open' ) ;
212
+ const button = document . getElementById ( "toggle-keyword-shortcuts" )
213
+ button . innerText = '-' ;
214
+ }
215
+
216
+ function closeKeywordWall ( ) {
217
+ const shortcuts = document . getElementsByClassName ( "shortcuts" ) [ 0 ] ;
218
+ shortcuts . classList . remove ( "keyword-wall" ) ;
219
+ storage . set ( "keyword-wall" , 'close' ) ;
203
220
const button = document . getElementById ( "toggle-keyword-shortcuts" )
204
- button . innerText = button . innerText === '+' ? '-' : '+' ;
221
+ button . innerText = '+' ;
205
222
}
206
223
207
224
function resetKeywords ( ) {
0 commit comments