@@ -1246,7 +1246,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/how-to-read-rustdoc.html\
1246
1246
return ;
1247
1247
}
1248
1248
const isSrcPage = hasClass ( document . body , "src" ) ;
1249
- const hideSidebar = ( ) => {
1249
+ function hideSidebar ( ) {
1250
1250
if ( isSrcPage ) {
1251
1251
window . rustdocCloseSourceSidebar ( ) ;
1252
1252
updateLocalStorage ( "src-sidebar-width" , null ) ;
@@ -1257,30 +1257,30 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/how-to-read-rustdoc.html\
1257
1257
updateLocalStorage ( "desktop-sidebar-width" , null ) ;
1258
1258
document . documentElement . style . removeProperty ( "--desktop-sidebar-width" ) ;
1259
1259
}
1260
- } ;
1261
- const showSidebar = ( ) => {
1260
+ }
1261
+ function showSidebar ( ) {
1262
1262
if ( isSrcPage ) {
1263
1263
window . rustdocShowSourceSidebar ( ) ;
1264
1264
} else {
1265
1265
removeClass ( document . documentElement , "hide-sidebar" ) ;
1266
1266
updateLocalStorage ( "hide-sidebar" , "false" ) ;
1267
1267
}
1268
- } ;
1269
- const changeSidebarSize = size => {
1268
+ }
1269
+ function changeSidebarSize ( size ) {
1270
1270
if ( isSrcPage ) {
1271
1271
updateLocalStorage ( "src-sidebar-width" , size ) ;
1272
1272
document . documentElement . style . setProperty ( "--src-sidebar-width" , size + "px" ) ;
1273
1273
} else {
1274
1274
updateLocalStorage ( "desktop-sidebar-width" , size ) ;
1275
1275
document . documentElement . style . setProperty ( "--desktop-sidebar-width" , size + "px" ) ;
1276
1276
}
1277
- } ;
1278
- const isSidebarHidden = ( ) => {
1277
+ }
1278
+ function isSidebarHidden ( ) {
1279
1279
return isSrcPage ?
1280
1280
! hasClass ( document . documentElement , "src-sidebar-expanded" ) :
1281
1281
hasClass ( document . documentElement , "hide-sidebar" ) ;
1282
- } ;
1283
- const resize = e => {
1282
+ }
1283
+ function resize ( e ) {
1284
1284
if ( currentPointerId === null || currentPointerId !== e . pointerId ) {
1285
1285
return ;
1286
1286
}
@@ -1296,8 +1296,8 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/how-to-read-rustdoc.html\
1296
1296
}
1297
1297
changeSidebarSize ( Math . min ( pos , window . innerWidth - 100 ) ) ;
1298
1298
}
1299
- } ;
1300
- const stopResize = e => {
1299
+ }
1300
+ function stopResize ( e ) {
1301
1301
if ( currentPointerId === null ) {
1302
1302
return ;
1303
1303
}
@@ -1310,8 +1310,8 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/how-to-read-rustdoc.html\
1310
1310
resizer . releasePointerCapture ( currentPointerId ) ;
1311
1311
currentPointerId = null ;
1312
1312
}
1313
- } ;
1314
- const initResize = e => {
1313
+ }
1314
+ function initResize ( e ) {
1315
1315
if ( currentPointerId !== null || e . altKey || e . ctrlKey || e . metaKey || e . button !== 0 ) {
1316
1316
return ;
1317
1317
}
@@ -1331,7 +1331,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/how-to-read-rustdoc.html\
1331
1331
window . addEventListener ( "pointerup" , stopResize , false ) ;
1332
1332
addClass ( resizer , "active" ) ;
1333
1333
addClass ( document . documentElement , "sidebar-resizing" ) ;
1334
- } ;
1334
+ }
1335
1335
resizer . addEventListener ( "pointerdown" , initResize , false ) ;
1336
1336
} ( ) ) ;
1337
1337
0 commit comments