mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Disable history when browsing files locally
http://stackoverflow.com/a/32454237/3586583
This commit is contained in:
@@ -530,7 +530,9 @@
|
|||||||
|
|
||||||
// Because searching is incremental by character, only the most
|
// Because searching is incremental by character, only the most
|
||||||
// recent search query is added to the browser history.
|
// recent search query is added to the browser history.
|
||||||
if (browserSupportsHistoryApi()) {
|
// Do not do this on local due to chrome security errors.
|
||||||
|
// http://stackoverflow.com/a/32454237/3586583
|
||||||
|
if (browserSupportsHistoryApi() && window.location.protocol != "file:") {
|
||||||
if (!history.state && !params.search) {
|
if (!history.state && !params.search) {
|
||||||
history.pushState(query, "", "?search=" +
|
history.pushState(query, "", "?search=" +
|
||||||
encodeURIComponent(query.query));
|
encodeURIComponent(query.query));
|
||||||
|
|||||||
Reference in New Issue
Block a user