Commit Graph

7265 Commits

Author SHA1 Message Date
evazion
3f7b1e0b13 html: fix invalid </meta>, </link>, </input> closing tags. 2018-08-17 18:41:48 -05:00
Albert Yi
e2cc40084a Merge pull request #3818 from evazion/fix-utility-js
Cleanup utility.js
2018-08-17 14:59:13 -07:00
evazion
f85b34cd9f shortcuts.js: simplify scroll up/down hotkeys. 2018-08-17 16:25:47 -05:00
evazion
e9d6a0fda6 utility.js: remove dead Utility.without function. 2018-08-17 16:25:47 -05:00
evazion
21895ef0aa utility.js: simplify $.fn.selectEnd().
Remove createTextRange fallback; setSelectionRange is supported by all modern browsers.

https://caniuse.com/#feat=input-selection
2018-08-17 16:25:47 -05:00
evazion
dfffabd662 utility.js: replace Utility.scroll_to with Element.scrollIntoView.
https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
https://caniuse.com/#feat=scrollintoview
2018-08-17 16:25:47 -05:00
evazion
ad056e69d5 utility.js: simplify even/odd table row striping. 2018-08-17 16:25:36 -05:00
evazion
eef8b9c323 posts/show: fix flash message when faving/unfaving posts.
Bug: if you faved a post, then opened another page in a separate tab,
then the "You have favorited this post" flash message would appear in
the separate tab.

Fixes regression in bcaee199.
2018-08-15 20:14:51 -05:00
evazion
ec0646c234 posts/show: don't scroll page when opening edit dialog.
Don't scroll up the page when opening the tag edit dialog via shift+e.
Fixes regression in #3812.
2018-08-15 18:56:52 -05:00
Albert Yi
86f05ef9e3 remove unused paginator.js ref 2018-08-15 16:11:26 -07:00
Albert Yi
0314dc9751 more consistent behavior of CurrentUser.root_url 2018-08-15 16:08:10 -07:00
Albert Yi
f88234e21d export additional js libs 2018-08-15 15:58:36 -07:00
Albert Yi
41a7923ade Merge pull request #3808 from evazion/fix-3807
Tag scripts: drop [if ...] and [reset] syntax (fix #3807, #3773)
2018-08-13 18:21:58 -07:00
Albert Yi
a7450303e0 Merge branch 'master' into fix-3807 2018-08-13 18:21:53 -07:00
Albert Yi
77d0c46b35 Merge pull request #3812 from evazion/feat-declarative-shortcuts
Add declarative keyboard shortcuts
2018-08-13 18:08:31 -07:00
Albert Yi
f0d3202eac Merge pull request #3814 from evazion/fix-3813
Fix #3813: Favorite limit can be bypassed.
2018-08-13 18:07:41 -07:00
evazion
bcaee199f5 favorites: unify create.js.erb & destory.js.erb code paths. 2018-08-12 15:51:18 -05:00
evazion
fb91bbc6c5 Fix #3813: Favorite limit can be bypassed. 2018-08-12 14:22:08 -05:00
evazion
202527008f user.rb: drop unused add_favorite!, delete_favorite! methods.
These methods were incorrect anyway, didn't upvote/downvote the post.
2018-08-12 12:35:15 -05:00
evazion
bbaadda1e3 Convert keyboard shortcuts to use data-shortcut. 2018-08-12 12:09:58 -05:00
evazion
d369d38419 shortcuts.js: Add declarative data-shortcut keyboard shortcuts. 2018-08-11 16:38:21 -05:00
Albert Yi
819f6ebbba Merge pull request #3809 from evazion/fix-comments-js
Refactor comments.js
2018-08-09 16:49:08 -07:00
evazion
755397e6c9 comments.js: remove dead code.
Remove dead and hide_threshold_comments and initialize_expand_links
methods. initialize_expand_links is dead because `.comment-section`
doesn't exist.
2018-08-09 14:45:26 -05:00
evazion
130570aa33 comments.js: fix thresholded comments.
* Restore behavior of thresholded comments being greyed out (lost in 6fa0ae2cf).

* Set the `below-threshold` class for thresholded comments in the html instead of in javascript.

* Remove `include_below_threshold` param; it was always true when clicking "Show all comments".
2018-08-09 14:45:26 -05:00
evazion
031cb6b8cf comments.js: use event delegation to bind click handlers.
Use event delegation to bind click handlers so that they don't have to
be rebound when comments are dynamically loaded with "Show all comments".
2018-08-09 14:45:24 -05:00
evazion
8e8a39af43 comments.js: fix forms flickering on page load.
Mark the edit form, new comment form, and unvote links as hidden in
html, instead of showing them by default then hiding them later in
Javascript. This eliminates flickering on page load.
2018-08-09 14:44:20 -05:00
evazion
c615b53a7e Fix broken "Link to alias" / "Link to implication" forum links.
/tag_implications was changed to filter out inactive implications by
default when the `status` param wasn't given.

This broke "Link to implication":/tag_implications?search[id]=NNN links
inside pending implication requests in forum posts. These links now
return an empty search instead of the pending implication.

Hiding inactive aliases/implications by default also changed the API behavior.
2018-08-09 12:49:40 -05:00
evazion
abe8b9c071 Fix "Show all comments" link.
The second argument to `trigger` is supposed to be an array.

ref: https://danbooru.donmai.us/forum_topics/9127?page=250#forum_post_149379
2018-08-08 23:44:35 -05:00
evazion
107d19c6b3 Tag scripts: drop [if ...] and [reset] syntax (fix #3807, #3773)
Fixes #3807. Drops the TagScript module entirely and replaces it with
a simple call to Post.tag.

Simultaneously fixes #3773 as a consequence of removing TagScript.run.
Post.update already updates data-tags by itself, so there was no need
for TagScript.run to update data-tags as well.
2018-08-08 16:01:42 -05:00
Albert Yi
b56681a609 refactor solution for #3804 2018-08-07 13:31:45 -07:00
Albert Yi
d053e135ab fix leaked ip addresses in upload status (#3804) 2018-08-07 13:18:31 -07:00
Albert Yi
80e0ae6a3c hide detailed exception info in upload status (#3804) 2018-08-07 13:05:06 -07:00
Albert Yi
20e67814cb add cron job for tag relationship retirement 2018-08-06 11:44:57 -07:00
Albert Yi
62027e8771 remove unused js var 2018-08-06 10:43:26 -07:00
Albert Yi
34e713ac69 Merge pull request #3801 from evazion/feat-eslint
Add ESLint support
2018-08-06 10:40:59 -07:00
Albert Yi
fd8568c726 Merge branch 'master' into feat-eslint 2018-08-06 10:27:32 -07:00
Albert Yi
773bbabac7 Merge pull request #3800 from anonbl/patch-1
Add Twitter widget (maintenance page)
2018-08-06 10:18:52 -07:00
Albert Yi
3672eedd36 expose additional js modules (#3795) 2018-08-06 10:13:11 -07:00
evazion
f72b32b27b Fix eslint warnings. 2018-08-05 18:30:25 -05:00
evazion
752557e813 Add eslint support.
Run with `yarn run lint` or `bin/webpack`.
2018-08-05 18:30:25 -05:00
Moebius-Strip
1a79443fe8 Ugoira play/pause button hide fix
Arrow functions don't allow the use of "this" (ends up returning the window object) so the buttons are failing to hide themselves.
2018-08-05 14:20:36 -04:00
r888888888
d813f41aad fix video page for ugoiras 2018-08-04 22:06:48 -07:00
r888888888
88c2fa69f3 fix js for ugoira player 2018-08-04 21:59:58 -07:00
r888888888
f09c5868e3 export utility js 2018-08-04 17:16:54 -07:00
r888888888
e0bd3277af remove es6 references in ugoira js 2018-08-04 17:15:14 -07:00
r888888888
660cd6ce62 export blacklist, comment, dtext, postmodemenu, and note javascripts (#3795) 2018-08-04 17:13:26 -07:00
anonbl
bf6e3f6cae Added Twitter widget
Added a Twitter widget instead of a link
2018-08-05 02:38:59 +03:00
r888888888
9c5df3206d cleanup comments 2018-08-04 16:33:18 -07:00
r888888888
73753f9541 Merge branch 'twitter-pixiv-source-fixes' 2018-08-04 16:32:32 -07:00
r888888888
334d8b7c6f Add alt_source field on uploads to deal with twitter galleries 2018-08-04 16:32:15 -07:00