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 = {};
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user