forked from rDrama/rDrama
1
0
Fork 0

replace hash to prevent unnecessary jumping when the user alrdy has a hash

master
Aevann 2023-09-29 07:50:42 +03:00
parent a92b99940c
commit 99fcbebff5
1 changed files with 4 additions and 1 deletions

View File

@ -644,7 +644,10 @@ if (screen_width <= 768) {
if (object) {
object.addEventListener('shown.bs.modal', function (e) {
location.hash = `m-${e.target.id}`;
if (location.hash)
location.replace(`${location.href.split('#')[0]}#m-${e.target.id}`);
else
location.hash = `m-${e.target.id}`;
});
object.addEventListener('hide.bs.modal', function (e) {