File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -678,7 +678,7 @@ public function show_forms() {
678678 /**
679679 * Tabbable JavaScript codes & Initiate Color Picker
680680 *
681- * This code uses query arguments and localstorage for displaying active tabs
681+ * This code uses URL hash fragments and localStorage for displaying active tabs
682682 *
683683 * @return void
684684 */
@@ -692,11 +692,10 @@ public function script() {
692692 // Switches option sections
693693 $('.group').hide();
694694 var activetab = '';
695- var urlParams = new URLSearchParams(window.location.search);
696- var queryTab = urlParams.get('tab');
695+ var urlHash = window.location.hash;
697696
698- if (queryTab ) {
699- activetab = '#' + queryTab ;
697+ if (urlHash ) {
698+ activetab = urlHash ;
700699 if (typeof (localStorage) != 'undefined') {
701700 localStorage.setItem("activetab", activetab);
702701 }
@@ -734,8 +733,7 @@ function () {
734733 if (typeof (localStorage) != 'undefined') {
735734 localStorage.setItem("activetab", clicked_group);
736735 }
737- urlParams.set('tab', clicked_group.substring(1));
738- history.replaceState(null, '', '?' + urlParams.toString());
736+ history.replaceState(null, '', clicked_group);
739737 $('.group').hide();
740738 $(clicked_group).fadeIn();
741739 evt.preventDefault();
You can’t perform that action at this time.
0 commit comments