From e0c2c572236495d07ce8bf1cd1297b861542173f Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Tue, 10 Aug 2021 00:41:50 +0000 Subject: [PATCH] isCatalog no longer fooled by custom pages --- gulp/res/js/localstorage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gulp/res/js/localstorage.js b/gulp/res/js/localstorage.js index 29d3cbb0..48c14b30 100644 --- a/gulp/res/js/localstorage.js +++ b/gulp/res/js/localstorage.js @@ -1,7 +1,7 @@ -const isCatalog = window.location.pathname.endsWith('catalog.html'); +const isCatalog = /^\/(\w+\/(manage\/)?)?catalog.html/.test(window.location.pathname); const isThread = /\/\w+\/thread\/\d+.html/.test(window.location.pathname); const isModView = /\/\w+\/manage\/(thread\/)?(index|\d+).html/.test(window.location.pathname); -const isManage = /\/(\w+\/manage|globalmanage)\/(recent|reports|bans|boards|logs|settings|banners|accounts|news).html/.test(window.location.pathname); +const isManage = /\/(\w+\/manage|globalmanage)\/(recent|reports|bans|boards|logs|settings|banners|accounts|news|custompages).html/.test(window.location.pathname); const isGlobalRecent = window.location.pathname === '/globalmanage/recent.html'; const isRecent = isGlobalRecent || window.location.pathname.endsWith('/manage/recent.html');