about summary refs log tree commit diff
path: root/src/tools/rustdoc-js/tester.js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-01-18 12:03:53 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2021-01-18 12:03:53 +0100
commit1d1ab21ad937608d89f0c9f29394be4995823f9c (patch)
tree412b7856b57b7eb03467ea2b75391d7508a383e1 /src/tools/rustdoc-js/tester.js
parentefdb859dcdf7077cf6b8c85af0ea8820c93bcbdf (diff)
downloadrust-1d1ab21ad937608d89f0c9f29394be4995823f9c.tar.gz
rust-1d1ab21ad937608d89f0c9f29394be4995823f9c.zip
Remove inline script tags
Diffstat (limited to 'src/tools/rustdoc-js/tester.js')
-rw-r--r--src/tools/rustdoc-js/tester.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tools/rustdoc-js/tester.js b/src/tools/rustdoc-js/tester.js
index 63f2d2f5d2f..3f6bd603975 100644
--- a/src/tools/rustdoc-js/tester.js
+++ b/src/tools/rustdoc-js/tester.js
@@ -263,8 +263,7 @@ function loadMainJsAndIndex(mainJs, searchIndex, storageJs, crate) {
                            "handleAliases", "getQuery", "buildIndex", "execQuery", "execSearch"];
 
     ALIASES = {};
-    finalJS += 'window = { "currentCrate": "' + crate + '" };\n';
-    finalJS += 'var rootPath = "../";\n';
+    finalJS += 'window = { "currentCrate": "' + crate + '", rootPath: "../" };\n';
     finalJS += loadThings(["hasOwnProperty", "onEach"], 'function', extractFunction, storageJs);
     finalJS += loadThings(arraysToLoad, 'array', extractArrayVariable, mainJs);
     finalJS += loadThings(variablesToLoad, 'variable', extractVariable, mainJs);