diff options
-rw-r--r-- | CustomApps/betterLibrary/betterlibrary.js | 3 | ||||
-rw-r--r-- | CustomApps/betterLibrary/index.js | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/CustomApps/betterLibrary/betterlibrary.js b/CustomApps/betterLibrary/betterlibrary.js index 6dad487..1469609 100644 --- a/CustomApps/betterLibrary/betterlibrary.js +++ b/CustomApps/betterLibrary/betterlibrary.js @@ -9,8 +9,9 @@ var lastViewIcons; //items-view 1=icons 2=list var lastViewCompact; //library-row-mode 1=compact 2=normal // Disables betterlibrary when the pages is left -function startListener() { +function startBetterLibListener() { Spicetify.Platform.History.listen((location) => { + console.log("betterlib listener called") if (location.pathname != '/betterlibrary' && betterLibIsEnabled) disableBetterLib(); }); diff --git a/CustomApps/betterLibrary/index.js b/CustomApps/betterLibrary/index.js index 7d0001b..546710f 100644 --- a/CustomApps/betterLibrary/index.js +++ b/CustomApps/betterLibrary/index.js @@ -11,7 +11,7 @@ const { // this is called when the page is open function render() { - startListener(); //I added this + startBetterLibListener(); //I added this enableBetterLib(); //And this return react.createElement(Grid, { title: "Open in the main view" }); } |