diff --git a/app/assets/javascripts/common.js b/app/assets/javascripts/common.js index cc5e65649..3b808e410 100644 --- a/app/assets/javascripts/common.js +++ b/app/assets/javascripts/common.js @@ -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 = {}; diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 8af25e857..c916e85a7 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -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"; diff --git a/app/views/static/terms_of_service.html.erb b/app/views/static/terms_of_service.html.erb index 675c9df42..97912e798 100644 --- a/app/views/static/terms_of_service.html.erb +++ b/app/views/static/terms_of_service.html.erb @@ -1,6 +1,7 @@ -
By accessing the "<%= Danbooru.config.app_name %>" website ("Site") you agree to the following terms of service. If you do not agree to these terms, then please do not access the Site.
You cannot upload a post or comment during the first week of signing up.
-After the initial period, you can post up to one comment an hour and a variable number of posts based on how many of your previous uploads were approved or deleted.
-In addition, you may not use the Site to upload any of the following:
-You cannot upload a post or comment during the first week of signing up.
+After the initial period, you can post up to one comment an hour and a variable number of posts based on how many of your previous uploads were approved or deleted.
+In addition, you may not use the Site to upload any of the following:
+If you believe a post infringes upon your copyright, please send an email to the <%= mail_to Danbooru.config.contact_email, "webmaster", :encode => "hex" %> with the following pieces of information:
@@ -42,19 +43,19 @@The Site will not disclose the IP address, email address, password, or DMails of any user except to the staff.
The Site is allowed to make public everything else, including but not limited to: uploaded posts, favorited posts, comments, forum posts, wiki edits, and note edits.
-By clicking on the "I Agree" link, you have read all the terms and have agreed to them.
-<%= link_to("I Agree", params[:url] || "/", :onclick => "Cookie.put('tos', '1')") %> | <%= link_to("Cancel", "/") %>
-<%= link_to("I Agree", params[:url] || "/", :id => "tos-agree-link") %> | <%= link_to("Cancel", "http://www.google.com") %>
+