diff --git a/app/assets/javascripts/common.js b/app/assets/javascripts/common.js index 3b808e410..a978d9431 100644 --- a/app/assets/javascripts/common.js +++ b/app/assets/javascripts/common.js @@ -46,7 +46,7 @@ $(document).ready(function() { 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; + location.href = domain + "/static/terms_of_service?url=" + location.href; } $("#tos-agree-link").click(function() { diff --git a/app/views/static/bookmarklet.html.erb b/app/views/static/bookmarklet.html.erb new file mode 100644 index 000000000..ce3ef64e5 --- /dev/null +++ b/app/views/static/bookmarklet.html.erb @@ -0,0 +1,9 @@ +
+
+

Bookmarklet

+ +

<%= link_to "Post to Danbooru", "javascript:location.href='http://#{Danbooru.config.hostname}/uploads/new?url='+encodeURIComponent(location.href)+'&ref='+encodeURIComponent(document.referrer)" %>

+ +

Bookmark this link. Next time you are directly viewing an image (that is, the JPG/PNG/GIF file is in the URL bar) you can open this bookmarklet and you will be taken to the upload page. Depending on the site you are uploading from you may also see some options for fetching metadata.

+
+
diff --git a/app/views/static/site_map.html.erb b/app/views/static/site_map.html.erb index d997ae910..9f99610d9 100644 --- a/app/views/static/site_map.html.erb +++ b/app/views/static/site_map.html.erb @@ -11,7 +11,7 @@