From c7c83aaa6cfca8c9bf3535e09d0c1d33e81ab863 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Sat, 20 Jul 2024 18:47:19 +0000 Subject: [PATCH] Sync uncommitted code --- play.pokemonshowdown.com/js/client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/play.pokemonshowdown.com/js/client.js b/play.pokemonshowdown.com/js/client.js index e96af7068ff..7b1ea5a67b3 100644 --- a/play.pokemonshowdown.com/js/client.js +++ b/play.pokemonshowdown.com/js/client.js @@ -458,7 +458,8 @@ function toId() { var settings = Dex.prefs('serversettings') || {}; if (Object.keys(settings).length) app.user.set('settings', settings); // HTML5 history throws exceptions when running on file:// - Backbone.history.start({pushState: !Config.testclient}); + var useHistory = !Config.testclient && (location.pathname.slice(-5) !== '.html'); + Backbone.history.start({pushState: useHistory}); app.ignore = app.loadIgnore(); }); }