fixes #68: ToS requred or voluntary with DB2?

This commit is contained in:
albert
2011-09-14 18:11:45 -04:00
parent b817da8d82
commit e38bc14411
3 changed files with 69 additions and 31 deletions

View File

@@ -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 = {};

View File

@@ -1168,6 +1168,32 @@ div#news-ticker {
}
div#terms-of-service {
width: 40em;
margin: 5em auto;
h1 {
font-size: $h2_size;
}
p {
margin-bottom: 1em;
}
ul {
margin-left: 1em;
}
li {
list-style-type: disc;
}
section {
margin-bottom: 2em;
}
}
/*** post mode menus ***/
body#mode-view {
background-color: "#FFF";