From 131a9e3884916160974d1c0d9878ebc968663402 Mon Sep 17 00:00:00 2001 From: HandyRandyx Date: Fri, 4 Oct 2024 22:20:51 -0300 Subject: [PATCH] [Hot Cards] Add missing popstate event listener (#451) --- plugins/hotCards/hotCards.yml | 2 +- plugins/hotCards/utils/helpers.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/hotCards/hotCards.yml b/plugins/hotCards/hotCards.yml index 2da3a651..413f41b9 100644 --- a/plugins/hotCards/hotCards.yml +++ b/plugins/hotCards/hotCards.yml @@ -1,6 +1,6 @@ name: Hot Cards description: Adds custom styling to card elements that match a Tag ID or a Rating Threshold. -version: 1.2.0 +version: 1.2.1 url: https://github.com/stashapp/CommunityScripts/tree/main/plugins/hotCards # requires: CommunityScriptsUILibrary ui: diff --git a/plugins/hotCards/utils/helpers.js b/plugins/hotCards/utils/helpers.js index 103cefae..ef0b228b 100644 --- a/plugins/hotCards/utils/helpers.js +++ b/plugins/hotCards/utils/helpers.js @@ -85,6 +85,10 @@ function overrideHistoryMethods(callback) { return result; }; }); + + window.addEventListener("popstate", function () { + callback(); + }); } /** Path Change Listener */