1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-21 04:59:49 +01:00

Merge branch 'bui-master'

This commit is contained in:
8chan 2014-10-03 05:58:41 +00:00
commit 8c70404036

15
404.php
View File

@ -29,6 +29,21 @@ $page = <<<EOT
<div class="ban">
<p style="text-align:center"><img src="/static/404/{$errorimage}" style="width:100%"></p>
</div>
<script type="text/javascript">
if (localStorage.favorites) {
var faves = JSON.parse(localStorage.favorites);
$.each(faves, function(k, v) {
if (window.location.pathname === '/' + v + '/') {
faves.pop(v);
localStorage.favorites = JSON.stringify(faves);
alert('As /' + v + '/ no longer exists, it has been removed from your favorites.');
}
})
}
</script>
EOT;
echo Element("page.html", array("config" => $config, "body" => $errorimage ? $page : "", "title" => "404 Not Found"));