fixes #86: ToS page not linked to some menu items

This commit is contained in:
albert
2011-09-24 10:53:52 -04:00
parent 9b41a3ea27
commit e4694e4469

View File

@@ -53,7 +53,7 @@
if (loc.match(/^\/(comment|pool|note|post)/) && this.get("tos") != "1") { if (loc.match(/^\/(comment|pool|note|post)/) && this.get("tos") != "1") {
// Setting location.pathname in Safari doesn't work, so manually extract the domain. // Setting location.pathname in Safari doesn't work, so manually extract the domain.
var domain = location.href.match(/^(https?:\/\/[^\/]+)/)[0]; var domain = location.href.match(/^(https?:\/\/[^\/]+)/)[0];
location.href = domain + "/static/terms_of_service?url=" + location.href; location.href = domain + "/terms_of_service?url=" + encodeURIComponent(location.href);
return; return;
} }