summaryrefslogtreecommitdiff
path: root/src/librustdoc/html/static/js/source-script.js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-01-10 14:50:16 +0100
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-02-02 21:34:44 +0100
commit7efba33582ab226e64a8cbee73041d44e7789528 (patch)
tree5d10a15411d1d7b9157ad7dca1aaa4c0a820f414 /src/librustdoc/html/static/js/source-script.js
parenta00e130dae74a213338e2b095ec855156d8f3d8a (diff)
downloadrust-7efba33582ab226e64a8cbee73041d44e7789528.tar.gz
Unify storage getter and setter functions
Diffstat (limited to 'src/librustdoc/html/static/js/source-script.js')
-rw-r--r--src/librustdoc/html/static/js/source-script.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/js/source-script.js b/src/librustdoc/html/static/js/source-script.js
index 498f60e9f25..90490acccfd 100644
--- a/src/librustdoc/html/static/js/source-script.js
+++ b/src/librustdoc/html/static/js/source-script.js
@@ -82,11 +82,11 @@ function toggleSidebar() {
if (child.innerText === ">") {
sidebar.classList.add("expanded");
child.innerText = "<";
- updateLocalStorage("rustdoc-source-sidebar-show", "true");
+ updateLocalStorage("source-sidebar-show", "true");
} else {
sidebar.classList.remove("expanded");
child.innerText = ">";
- updateLocalStorage("rustdoc-source-sidebar-show", "false");
+ updateLocalStorage("source-sidebar-show", "false");
}
}
@@ -97,7 +97,7 @@ function createSidebarToggle() {
var inner = document.createElement("div");
- if (getCurrentValue("rustdoc-source-sidebar-show") === "true") {
+ if (getCurrentValue("source-sidebar-show") === "true") {
inner.innerText = "<";
} else {
inner.innerText = ">";
@@ -120,7 +120,7 @@ function createSourceSidebar() {
var sidebar = document.createElement("div");
sidebar.id = "source-sidebar";
- if (getCurrentValue("rustdoc-source-sidebar-show") !== "true") {
+ if (getCurrentValue("source-sidebar-show") !== "true") {
container.classList.remove("expanded");
} else {
container.classList.add("expanded");