I have mascot_bg=5 atm, that atelope-like thingy I think (at least that's what I had for bg last time I was here) which is apparently not available anymore.
This makes bgchanger.js throw up js error instead of falling back to whatever backgrounds it still has.
Plusungood.
Patch attached.
--- http://e621.net/javascripts/bgchanger.js 2013-04-20 11:07:20.253129112 +0300 +++ http://e621.net/javascripts/bgchanger.js 2013-04-20 11:09:37.506459308 +0300 @@ -56,7 +56,8 @@ function onloadfunction() { cur = parseInt(getCookie("mascot_bg")); - if (isNaN(cur)) cur = Math.floor(Math.random()*mascots.length); + if (isNaN(cur) || cur < 0 || cur >= mascots.length) + cur = Math.floor(Math.random()*mascots.length); if (getparam("mascot") && !isNaN(getparam("mascot"))) // override from ?mascot=x param {
Updated by TonyCoon