Skip to content

Commit 55c0922

Browse files
Rollup merge of #57504 - GuillaumeGomez:re-enable-history, r=QuietMisdreavus
Re-enable history api on file:// protocol Fixes #57135. I tested locally on chrome (since it was the browser having issues with history management on `file://` protocol) and it worked fine so I guess we can re-enable it. r? @QuietMisdreavus
2 parents ad43389 + 830b3b8 commit 55c0922

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustdoc/html/static/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ if (!DOMTokenList.prototype.remove) {
150150
}
151151

152152
function browserSupportsHistoryApi() {
153-
return document.location.protocol != "file:" &&
154-
window.history && typeof window.history.pushState === "function";
153+
return window.history && typeof window.history.pushState === "function";
155154
}
156155

157156
var main = document.getElementById("main");

0 commit comments

Comments
 (0)