mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-12-01 10:37:18 +01:00
Fix board removal on 404, splice not pop @bui
This commit is contained in:
parent
8b701ef10a
commit
13c75110b9
2
404.php
2
404.php
@ -37,7 +37,7 @@ $page = <<<EOT
|
|||||||
|
|
||||||
$.each(faves, function(k, v) {
|
$.each(faves, function(k, v) {
|
||||||
if ((window.location.pathname === '/' + v + '/') || (window.location.pathname === '/' + v)) {
|
if ((window.location.pathname === '/' + v + '/') || (window.location.pathname === '/' + v)) {
|
||||||
faves.pop(v);
|
faves.splice(k, 1);
|
||||||
localStorage.favorites = JSON.stringify(faves);
|
localStorage.favorites = JSON.stringify(faves);
|
||||||
|
|
||||||
alert('As /' + v + '/ no longer exists, it has been removed from your favorites.');
|
alert('As /' + v + '/ no longer exists, it has been removed from your favorites.');
|
||||||
|
Loading…
Reference in New Issue
Block a user