Skip to content

Node.js based forum software built for the modern web

added popstate check to trigger ajaxify on back button keypress. forward button doesn't work yet

psychobunny5aa3dab28913
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js
index 36f4e233e8..bf80c175f2 100644
--- a/public/src/ajaxify.js
+++ b/public/src/ajaxify.js
@@ -20,6 +20,10 @@ var ajaxify = {};
};
+ window.onpopstate = function(event) {
+ ajaxify.go(document.location.href.replace(rootUrl +'/', ''));
+ };
+
ajaxify.go = function(url, callback) {
// leave room and join global
if (current_room != 'global') {