diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index ec89ae0228c..d6d3171afbf 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -2908,10 +2908,14 @@ function defocusSearchBar() { ["⏎", "Go to active search result"], ["+", "Expand all sections"], ["-", "Collapse all sections"], - ].map(x => "
" + - x[0].split(" ") - .map((y, index) => (index & 1) === 0 ? "" + y + "" : " " + y + " ") - .join("") + "
" + x[1] + "
").join(""); + ].map(function(x) { + return "
" + + x[0].split(" ") + .map(function(y, index) { + return (index & 1) === 0 ? "" + y + "" : " " + y + " "; + }) + .join("") + "
" + x[1] + "
"; + }).join(""); var div_shortcuts = document.createElement("div"); addClass(div_shortcuts, "shortcuts"); div_shortcuts.innerHTML = "

Keyboard Shortcuts

" + shortcuts + "
"; @@ -2929,7 +2933,9 @@ function defocusSearchBar() { "You can look for items with an exact name by putting double quotes around \ your request: \"string\"", "Look for items inside another one by searching for a path: vec::Vec", - ].map(x => "

" + x + "

").join(""); + ].map(function(x) { + return "

" + x + "

"; + }).join(""); var div_infos = document.createElement("div"); addClass(div_infos, "infos"); div_infos.innerHTML = "

Search Tricks

" + infos; diff --git a/src/librustdoc/html/static/storage.js b/src/librustdoc/html/static/storage.js index a50ed5b662b..b8b6fcbaf3a 100644 --- a/src/librustdoc/html/static/storage.js +++ b/src/librustdoc/html/static/storage.js @@ -157,7 +157,7 @@ var updateSystemTheme = (function() { if (!window.matchMedia) { // fallback to the CSS computed value return function() { - let cssTheme = getComputedStyle(document.documentElement) + var cssTheme = getComputedStyle(document.documentElement) .getPropertyValue('content'); switchTheme(