diff --git a/assets/js/local.js b/assets/js/local.js index edad393..150942a 100644 --- a/assets/js/local.js +++ b/assets/js/local.js @@ -60,4 +60,24 @@ window.location.href = pageUrl+$input.attr('name')+'='+$input.val() }) + $(document).render(function () { + setTimeout(function () { + const $body = $('body'), + params = new Proxy(new URLSearchParams(window.location.search), { + get: (searchParams, prop) => searchParams.get(prop), + }); + + if (!params || !params.menuId) return; + + const $button = $(''); + + $body.prepend($button); + $button.trigger('click'); + + const uri = window.location.href.toString(), + cleanUri = uri.substring(0, uri.indexOf("?")); + + window.history.replaceState({}, document.title, cleanUri); + }, 500); + }); }(jQuery)