Merge branch 'pr/14'

This commit is contained in:
Fermi
2019-06-14 21:29:04 +01:00
506 changed files with 10079 additions and 6600 deletions
@@ -158,7 +158,16 @@ function byondDecode(message) {
// The replace for + is because FOR SOME REASON, BYOND replaces spaces with a + instead of %20, and a plus with %2b.
// Marvelous.
message = message.replace(/\+/g, "%20");
message = decoder(message);
try {
// This is a workaround for the above not always working when BYOND's shitty url encoding breaks. (byond bug id:2399401)
if (decodeURIComponent) {
message = decodeURIComponent(message);
} else {
throw new Error("Easiest way to trigger the fallback")
}
} catch (err) {
message = unescape(message);
}
return message;
}
@@ -361,7 +370,7 @@ function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = 'expires='+d.toUTCString();
document.cookie = cname + '=' + cvalue + '; ' + expires;
document.cookie = cname + '=' + cvalue + '; ' + expires + "; path=/";
}
function getCookie(cname) {