Fix ES5 errors (IE11)
This commit is contained in:
parent
9503ea19ed
commit
719c8d40cc
2 changed files with 12 additions and 6 deletions
|
@ -2908,10 +2908,14 @@ function defocusSearchBar() {
|
||||||
["⏎", "Go to active search result"],
|
["⏎", "Go to active search result"],
|
||||||
["+", "Expand all sections"],
|
["+", "Expand all sections"],
|
||||||
["-", "Collapse all sections"],
|
["-", "Collapse all sections"],
|
||||||
].map(x => "<dt>" +
|
].map(function(x) {
|
||||||
x[0].split(" ")
|
return "<dt>" +
|
||||||
.map((y, index) => (index & 1) === 0 ? "<kbd>" + y + "</kbd>" : " " + y + " ")
|
x[0].split(" ")
|
||||||
.join("") + "</dt><dd>" + x[1] + "</dd>").join("");
|
.map(function(y, index) {
|
||||||
|
return (index & 1) === 0 ? "<kbd>" + y + "</kbd>" : " " + y + " ";
|
||||||
|
})
|
||||||
|
.join("") + "</dt><dd>" + x[1] + "</dd>";
|
||||||
|
}).join("");
|
||||||
var div_shortcuts = document.createElement("div");
|
var div_shortcuts = document.createElement("div");
|
||||||
addClass(div_shortcuts, "shortcuts");
|
addClass(div_shortcuts, "shortcuts");
|
||||||
div_shortcuts.innerHTML = "<h2>Keyboard Shortcuts</h2><dl>" + shortcuts + "</dl></div>";
|
div_shortcuts.innerHTML = "<h2>Keyboard Shortcuts</h2><dl>" + shortcuts + "</dl></div>";
|
||||||
|
@ -2929,7 +2933,9 @@ function defocusSearchBar() {
|
||||||
"You can look for items with an exact name by putting double quotes around \
|
"You can look for items with an exact name by putting double quotes around \
|
||||||
your request: <code>\"string\"</code>",
|
your request: <code>\"string\"</code>",
|
||||||
"Look for items inside another one by searching for a path: <code>vec::Vec</code>",
|
"Look for items inside another one by searching for a path: <code>vec::Vec</code>",
|
||||||
].map(x => "<p>" + x + "</p>").join("");
|
].map(function(x) {
|
||||||
|
return "<p>" + x + "</p>";
|
||||||
|
}).join("");
|
||||||
var div_infos = document.createElement("div");
|
var div_infos = document.createElement("div");
|
||||||
addClass(div_infos, "infos");
|
addClass(div_infos, "infos");
|
||||||
div_infos.innerHTML = "<h2>Search Tricks</h2>" + infos;
|
div_infos.innerHTML = "<h2>Search Tricks</h2>" + infos;
|
||||||
|
|
|
@ -157,7 +157,7 @@ var updateSystemTheme = (function() {
|
||||||
if (!window.matchMedia) {
|
if (!window.matchMedia) {
|
||||||
// fallback to the CSS computed value
|
// fallback to the CSS computed value
|
||||||
return function() {
|
return function() {
|
||||||
let cssTheme = getComputedStyle(document.documentElement)
|
var cssTheme = getComputedStyle(document.documentElement)
|
||||||
.getPropertyValue('content');
|
.getPropertyValue('content');
|
||||||
|
|
||||||
switchTheme(
|
switchTheme(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue