(function() { // Client-side trailing slash enforcer for dumb static servers var path = window.location.pathname; if (path.length > 1 && path.substr(-1) !== '/' && path.indexOf('.') === -1) { window.location.replace(path + '/' + window.location.search + window.location.hash); } })();