fixes #68: ToS requred or voluntary with DB2?
This commit is contained in:
@@ -41,6 +41,17 @@ $(document).ready(function() {
|
||||
$("#resize-links").toggle();
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// TOS link
|
||||
if (!location.href.match(/terms_of_service/) && Danbooru.Cookie.get("tos") !== "1") {
|
||||
// Setting location.pathname in Safari doesn't work, so manually extract the domain.
|
||||
var domain = location.href.match(/^(http:\/\/[^\/]+)/)[0];
|
||||
location.href = domain + "/terms_of_service?url=" + location.href;
|
||||
}
|
||||
|
||||
$("#tos-agree-link").click(function() {
|
||||
Danbooru.Cookie.put("tos", "1");
|
||||
})
|
||||
});
|
||||
|
||||
var Danbooru = {};
|
||||
|
||||
Reference in New Issue
Block a user