Commit Graph

9666 Commits

Author SHA1 Message Date
evazion
0b52b1622f posts: bring back uploader names. 2020-07-13 19:25:29 -05:00
evazion
45bbb71eba posts: hide ids of restricted posts. 2020-07-13 19:25:29 -05:00
evazion
b5e647dc51 posts: add file type to post info. 2020-07-13 19:25:29 -05:00
evazion
5687c67fc3 posts: autotag video instead of webm/mp4.
Automatically add the `video` tag instead of the `webm` or `mp4` tags.
2020-07-13 19:25:29 -05:00
evazion
1e2e99a941 post tooltips: fix tooltips not appearing on /comments page. 2020-07-13 19:10:15 -05:00
evazion
cf4469f902 users: add dropdown actions to username tooltips. 2020-07-13 17:09:03 -05:00
evazion
88bbd1e3f0 users: add username tooltips. 2020-07-13 17:09:03 -05:00
evazion
d7f489b68e users: get rid of the .with-style class.
Replace with `body[data-current-user-style-usernames="true"]` instead.
2020-07-13 17:08:53 -05:00
evazion
b1ccc44c91 users: allow searching for banned users. 2020-07-13 13:48:39 -05:00
evazion
9885ae61fb user name changes: add search options. 2020-07-13 13:48:39 -05:00
evazion
5909dcfad6 Update ruby gems and yarn packages. 2020-07-13 13:48:39 -05:00
evazion
42f0112c38 seo: increase sitemap coverage.
Rework sitemaps to provide more coverage of the site. We want every
important page on the site - including every post, tag, and wiki page -
to be indexed by Google. We do this by generating sitemaps and sitemap
indexes that contain links to every important page on the site.
2020-07-10 00:18:30 -05:00
evazion
d88a2a674f seo: allow /sitemap.xml in robots.txt 2020-07-08 16:16:46 -05:00
evazion
fc331f2079 seo: add json-ld structured data for videos.
Makes video posts eligible for rich results in Google, which means they
can include a thumbnail.

Ref: https://developers.google.com/search/docs/data-types/video
2020-07-08 15:16:58 -05:00
evazion
df32e0da72 seo: remove obsolete itemprop microdata attributes.
Remove obsolete itemprop attributes. These were originally added in
2dd4b4c, but they haven't been working since e334c34 removed the
itemscope and itemtype attributes. They never worked right because they
weren't nested properly, and they were never really useful because
Google doesn't use the ImageObject schema for anything.

* https://developers.google.com/search/docs/guides/intro-structured-data
* https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata
* https://schema.org/docs/gs.html
* https://schema.org/ImageObject
2020-07-08 14:59:35 -05:00
evazion
3762a66b92 seo: fix Google rich results not detecting site logo.
Bug: for some reason, Google's rich results tool doesn't detect our logo
when the @id property is present.

https://search.google.com/test/rich-results
2020-07-08 12:38:03 -05:00
evazion
2219a96d2e pool.js: remove leftover recent pools code.
Removed in 1e3c97e4.
2020-07-08 11:33:10 -05:00
evazion
7bfea5cd19 js: drop stupidtable plugin.
This was only used on the saved search index. It let you click on column
headers to sort the table by that column. This doesn't make sense now
that saved searches are paginated.
2020-07-08 11:31:45 -05:00
evazion
e6e2813f73 Update ruby gems and yarn packages. 2020-07-08 11:25:48 -05:00
evazion
bfc31acbed artists: fix accidental gentag category changes.
Bug: if you created an artist with the name of an existing general tag,
then the gentag would be changed to an artist tag, no matter how big the
gentag was.

Now we only allow creating artist entries for non-artist tags if the tag
is empty.

Ref: https://danbooru.donmai.us/forum_topics/17095
2020-07-07 12:47:18 -05:00
evazion
1cef3bf805 tests: fix artstation download tests.
ArtStation is apparently returning images with smaller filesizes for
/4k/ images now. It doesn't look like we can get the old images, so just
update the tests.
2020-07-06 17:23:53 -05:00
evazion
7dfc783f2c Fix #4537: Forum quoting broken in topics where user has a reply. 2020-07-06 16:02:19 -05:00
evazion
40a114c99c posts: restrict banned paid rewards for non-approvers. 2020-07-06 13:52:57 -05:00
evazion
0c7d48d890 posts: autoban uploads tagged paid_reward. 2020-07-06 13:52:46 -05:00
evazion
722bb6deae Merge pull request #4486 from danbooru/feat-privacy-policy
Add new privacy policy
2020-07-06 02:56:30 -05:00
evazion
e18c258be5 Rewrite Terms of Service (fix #4415). 2020-07-06 02:55:57 -05:00
evazion
b5fc8fff6e Add privacy policy (#4415). 2020-07-06 02:53:01 -05:00
evazion
f0a573e1e5 /comments.atom: fix restricted posts being leaked.
Fix thumbnail URLs of loli/shota/banned posts being leaked in
/comments.atom. Restricted posts are now entirely hidden in
/comments.atom.

Example: https://danbooru.donmai.us/comments.atom?search[post_id]=2.
2020-07-06 02:51:30 -05:00
evazion
d9b7879a4c html: add <meta name="theme-color"> tag.
Make the address bar blue on mobile.

* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color
* https://developers.google.com/web/fundamentals/design-and-ux/browser-customization#meta_theme_color_for_chrome_and_opera
2020-07-05 11:26:26 -05:00
evazion
89c1c927ee html: add <meta charset="utf-8"> tag.
ref: https://webhint.io/docs/user-guide/hints/hint-meta-charset-utf-8/
2020-07-04 22:31:18 -05:00
evazion
9a03582513 Add OpenSearch suggestion support.
Add autocomplete support when searching Danbooru from the Chrome address
bar. If you type "danb<tab>" in the address bar then search for a tag,
then autocomplete results from Danbooru will appear as search
suggestions in Chrome.

Note that the "Autocomplete searches and URLs" Chrome setting must be
enabled for this to work.

Ref:

* http://dev.chromium.org/tab-to-search
* https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Supporting_search_suggestions_in_search_plugins
* https://github.com/dewitt/opensearch/blob/master/mediawiki/Specifications/OpenSearch/Extensions/Suggestions/1.1/Draft%201.wiki
2020-07-04 17:52:53 -05:00
evazion
aa1a21aece Add OpenSearch support (/opensearch.xml).
Add https://danbooru.donmai.us/opensearch.xml. This file tells browsers
how to perform searches on Danbooru.

In Chrome, this lets you type "danb<tab>" in the address bar to perform
a search on Danbooru.

In Firefox, you have to click the "..." icon next to the address bar,
then choose "Add Search Engine". After that, you can search Danbooru
from the address bar.

Ref:

* http://dev.chromium.org/tab-to-search
* https://developer.mozilla.org/en-US/docs/Web/OpenSearch
* https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md
* https://en.wikipedia.org/wiki/OpenSearch
2020-07-04 17:52:49 -05:00
evazion
b6b0218e1d seo: update JSON-LD site metadata.
* Add the Danbooru logo and social media links to the Organization data.
  This is to make Danbooru eligible for Google's knowledge panel ([1], [2]).
* Only include this metadata on the frontpage as per Google's recommendations ([3]).

[1]: https://support.google.com/knowledgepanel/answer/9163198
[2], https://developers.google.com/search/docs/data-types/logo
[3]: https://developers.google.com/search/docs/data-types/sitelinks-searchbox
2020-07-03 18:18:35 -05:00
evazion
a0ee4c67a8 Add lang="en" to <html> tag. 2020-07-03 15:59:45 -05:00
evazion
99e88b3dae seo: add rel=nofollow to various internal search links.
Add rel=nofollow to various internal search links to prevent Google from
attempting to crawl things like `<tag> status:deleted` or `approver:<name>`
searches.
2020-07-03 15:58:59 -05:00
evazion
629a634b22 seo: don't block css in robots.txt.
/packs was blocked by robots.txt, which prevented Googlebot from
fetching CSS when indexing pages, which made Google penalize pages for
being mobile unfriendly because it couldn't load the CSS and it thought
the layout was broken.
2020-07-03 15:58:59 -05:00
evazion
f97c62c71d search: fix search timeout error page not appearing.
Bug: when a search timed out we got the generic failbooru page instead
of the search timeout error page.

Cause: when rendering the <link rel="next"> / <link rel="prev"> tags in
the header, we may need to evaluate the search to determine the next or
previous page, but if the searches times out then this fails, which
caused Rails to throw a ActionView::Template::Error because an exception
was thrown while rendering the template.

Likewise, rendering the attributes for the <body> tag could fail with an
ActionView::Template::Error because the call to `current_item.present?`
forced evaluation of the search.
2020-07-03 13:08:49 -05:00
evazion
e822d5f16e tests: fix invalid artist url test. 2020-07-03 12:06:12 -05:00
evazion
57dcd9ee1a Remove unused gems and yarn packages. 2020-06-30 23:44:03 -05:00
evazion
1760d1fc73 js: upgrade jquery to 3.5.1.
Changelog:

* https://blog.jquery.com/2020/05/04/jquery-3-5-1-released-fixing-a-regression/
* https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/
2020-06-30 23:42:37 -05:00
evazion
efe5111a9e js: bundle jQuery with Webpack.
Include jQuery in our Webpack bundle instead of loading it from CDNJS.
This means we no longer load any Javascript libraries from third party
sites.
2020-06-30 23:41:47 -05:00
evazion
94490eb57f Fix #4492: Switch from qtip2 to tippy.js. 2020-06-30 22:40:40 -05:00
evazion
5f05a41fbc Fix #4468: Tag edit mode on posts view applies taglist to wrong post. 2020-06-30 15:20:59 -05:00
evazion
1a8729e0d9 Fix #4462: "You have already favorited this post" on upload.
Make adding the fav:self metatag ignore all errors, including when the
post was already favorited before editing the post.
2020-06-30 14:29:25 -05:00
evazion
048bc7faf5 Revert "simple form: enable HTML5 maxlength validations."
This incorrectly added maxlength=4 to parent id fields.

This reverts commit 5e23861bea.
2020-06-30 13:03:51 -05:00
evazion
fde6e39213 Update ruby gems and yarn packages. 2020-06-29 17:46:28 -05:00
evazion
3d90414e06 Merge pull request #4487 from BrokenEagle/fix-invalid-url
Fix invalid artist URLs being allowed
2020-06-29 17:46:13 -05:00
evazion
f5c9a78797 danbooru::http: fix SSLError exceptions not being caught.
Bug: The frontpage failed due to a SSL error. We couldn't fetch the
popular tag list from Reportbooru because Reportbooru's SSL certificate
had expired and HTTP.rb raised an SSLError exception that we didn't
catch.

Fix: Convert the SSLError to a 5xx HTTP error to prevent SSL exceptions
from leaking through HTTP.rb.
2020-06-29 14:49:59 -05:00
evazion
b85b4b190a pagination: remove switch_to_sequential option. 2020-06-28 02:59:32 -05:00
evazion
ad02b26f3d pagination: fix exception on empty pages in seq. pagination.
Fix exception when the page is empty during sequential pagination.
Caused because the paginator can't figure out the next or previous page
when the current page is empty.

* https://danbooru.donmai.us/posts?page=b0
* https://danbooru.donmai.us/posts?page=a10000000
2020-06-28 02:57:48 -05:00