From 830b3b8c75a5b7476de7ce07ee53c590f09f82f1 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 10 Jan 2019 23:59:42 +0100 Subject: [PATCH] Re-enable history api on file:// protocol --- src/librustdoc/html/static/main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 75b0f5df0d8b3..250e4a466fc96 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -150,8 +150,7 @@ if (!DOMTokenList.prototype.remove) { } function browserSupportsHistoryApi() { - return document.location.protocol != "file:" && - window.history && typeof window.history.pushState === "function"; + return window.history && typeof window.history.pushState === "function"; } var main = document.getElementById("main");