File tree 1 file changed +3
-2
lines changed
src/librustdoc/html/static/js
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ if (getSettingValue("hide-sidebar") === "true") {
194
194
addClass(document.documentElement, "hide-sidebar");
195
195
}
196
196
197
- ( function() {
197
+ function updateSidebarWidth () {
198
198
const desktopSidebarWidth = getSettingValue("desktop-sidebar-width");
199
199
if (desktopSidebarWidth) {
200
200
document.documentElement.style.setProperty(
@@ -209,7 +209,7 @@ if (getSettingValue("hide-sidebar") === "true") {
209
209
srcSidebarWidth + "px"
210
210
);
211
211
}
212
- }()) ;
212
+ };
213
213
214
214
// If we navigate away (for example to a settings page), and then use the back or
215
215
// forward button to get back to a page, the theme may have changed in the meantime.
@@ -223,5 +223,6 @@ if (getSettingValue("hide-sidebar") === "true") {
223
223
window.addEventListener("pageshow", ev => {
224
224
if (ev.persisted) {
225
225
setTimeout(updateTheme, 0);
226
+ setTimeout(updateSidebarWidth, 0);
226
227
}
227
228
});
You can’t perform that action at this time.
0 commit comments