summaryrefslogtreecommitdiff
path: root/src/librustdoc/html/static/js/source-script.js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-05-02 14:32:56 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-05-05 11:07:14 +0200
commit1e204ddb3bc960b25b9d0c451df85529ec744283 (patch)
treeadbb8d27815eaf53503dd38f8ed6b97091103231 /src/librustdoc/html/static/js/source-script.js
parent12d3f107c1634ed41a800e220ccf99b665d906d8 (diff)
downloadrust-1e204ddb3bc960b25b9d0c451df85529ec744283.tar.gz
Use "strict" mode in JS scripts
Diffstat (limited to 'src/librustdoc/html/static/js/source-script.js')
-rw-r--r--src/librustdoc/html/static/js/source-script.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/js/source-script.js b/src/librustdoc/html/static/js/source-script.js
index 290bf40a8f5..f788d41d2de 100644
--- a/src/librustdoc/html/static/js/source-script.js
+++ b/src/librustdoc/html/static/js/source-script.js
@@ -9,7 +9,10 @@
// Local js definitions:
/* global addClass, getCurrentValue, hasClass, onEachLazy, removeClass, browserSupportsHistoryApi */
/* global updateLocalStorage */
-(function () {
+
+"use strict";
+
+(function() {
function getCurrentFilePath() {
const parts = window.location.pathname.split("/");