Commit Graph

122 Commits

Author SHA1 Message Date
evazion
61619b719e Add rel="noreferrer" to external links.
Tells browsers not to send the Referer header when following external
links. Among other things, this bypasses Pixiv's anti-hotlinking
protection when opening direct image sources from Pixiv.
2019-10-06 01:32:14 -05:00
evazion
d64236813a js: replace <meta> tags with <body> data attributes.
Refactor things to store information about the current user as data
attributes on the <body> tag rather than as <meta> tags. These <meta>
tags are now deprecated and will be eventually removed.

* Store all of the current user's API attributes as data attributes on
  the <body> tag.

* Add `CurrentUser.data` for getting data from the <body> tag, and
  use it instead of `Utility.meta`.

* Add `CurrentUser.update` for updating the current user's settings.

* Fix a bug with the user named "Anonymous" not being able to edit notes.
2019-10-02 15:59:22 -05:00
evazion
960e5d4ae0 views: factor out sidebar layout template.
* Factor out common sidebar layout template.
* Convert wiki pages and posts to use this template.
* Add data-layout attribute to <body> element indicating the current layout.
2019-09-28 17:50:10 -05:00
evazion
8f6fd95e2d posts: change "»" links next to sources in sidebar.
* On the posts show page, make the "»" link next to the source visible
  to all users, not just builders.
* Make "»" link to the raw unnormalized source, instead of a `source:` search.
* Remove the special case for displaying old pixiv sources as `pixiv/moniker`.
2019-09-22 02:58:09 -05:00
evazion
bf51d68f15 users: add dark mode account setting (fix #4158). 2019-09-19 13:20:06 -05:00
evazion
896f144eb6 views: refactor quick search forms. 2019-09-10 21:10:09 -05:00
evazion
ffccc503f7 views: removed unused helpers. 2019-09-10 15:21:48 -05:00
evazion
1743f3797f views: factor out search_form_for helper.
Refactor search forms to use `search_form_for` so that we can set common
options on all search forms, such as autocomplete="off" (#4162).
2019-09-10 14:31:19 -05:00
evazion
4fb24c812f Fix #4155: Fix profile/settings metadata discrepancy. 2019-09-05 00:14:11 -05:00
evazion
bb7c993f4a app controller: clean up helpers.
* Move `show_moderation_notice?` out.
* Don't need to declare `helper :pagination` manually.
2019-08-24 22:55:36 -05:00
evazion
f151285038 views: standardize page titles. 2019-08-24 22:55:35 -05:00
evazion
bb82011bb2 helpers: drop fast_link_to. 2019-08-22 23:33:58 -05:00
evazion
82fbb19e0f users: drop unused code. 2019-08-18 11:24:42 -05:00
evazion
18a216c67a Fix #4130: Remove tag alias corrections. 2019-08-10 22:46:49 -05:00
evazion
7478c7a913 Fix #4034: Several keyboard shortcuts are missing an ID. 2019-01-03 17:19:16 -06:00
evazion
9de5857032 Fix #4015: Exception: undefined method `level_class' for nil:NilClass. 2018-12-12 17:57:29 -06:00
evazion
e25e8d564a artist versions: refactor diffs. 2018-12-07 12:45:51 -06:00
Albert Yi
e360058aca refactor 2018-11-02 13:40:01 -07:00
Albert Yi
28414800f8 artist urls in reltags should open in new window by default 2018-10-26 11:52:06 -07:00
evazion
77a576d5ed related tags: strip http:// from artist urls. 2018-10-25 23:38:24 -05:00
evazion
a5438aaf37 Fix dtext preview button to use event delegation.
Fixes the dtext preview button and dtext expandable to work with
dynamically loaded dtext forms.
2018-09-26 20:01:49 -05:00
evazion
6c457c86ac nav menu: fix 'Forum' link not getting '.current' class.
Fixes the '.current' class not being set on the 'Forum' link when
viewing the /forum_topics page. As a result, the link wasn't bolded and
didn't have the background set.
2018-09-04 18:15:21 -05:00
evazion
47e26419d3 nav menu: add html ids to secondary nav menu links (#3844). 2018-08-27 20:57:59 -05:00
evazion
4e1d76da81 html: add controller & action attributes to <body> tag (#3844). 2018-08-26 16:02:06 -05:00
evazion
b98bc26397 nav menu: add html ids to main menu nav links (#3844). 2018-08-26 13:12:41 -05:00
evazion
3dafca9aec Fix #3842: Mods can demote other mods or admins. 2018-08-25 13:52:50 -05:00
evazion
a22bf20230 post tooltips: add header bar with more post info.
Add a header bar containing the following information:

* Uploader + top tagger + upload date
* Score, favorite count, comment count
* Rating
* Source (Pixiv, Twitter, etc)
* Image dimensions

Also list series pools with tags.
2018-05-07 13:18:22 -05:00
evazion
e772de40a7 posts: add /posts/{id}.html?variant=tooltip template. 2018-04-25 22:12:26 -05:00
evazion
17aabaca29 modqueue: move quality warning tags into config file. 2018-04-17 17:15:06 -05:00
evazion
a058a77c07 ApplicationHelper#search_field: accept html attributes on <input> field.
Rewrite `search_field` to allow setting `data-*` attributes on the <input> field.
2018-02-18 18:34:18 -06:00
evazion
88f4a56890 Fix #3497: Invalid DText denial of service attack. 2018-01-14 16:14:18 -06:00
r888888888
e70c2a3085 remove references to tag subscriptions 2017-11-17 13:45:17 -08:00
r888888888
51867a8c64 truncate urls on display on post replacements page #3322 2017-10-09 17:00:31 -07:00
evazion
7cb7c2fbab Remove ruby DText implementation (#3206). 2017-07-19 16:48:42 -05:00
evazion
4fd1c6ec21 /post_replacements: fix broken source links (missing href). 2017-06-26 10:26:58 -05:00
evazion
8b4e598a12 post replacements: add /post_replacements view. 2017-06-22 17:03:05 -05:00
r888888888
d9ea925f4e add support for searching for dup-related flags 2017-06-12 15:25:07 -07:00
evazion
9b613157ae Add data attributes for CurrentUser's privileges to <body> tag (fix #3073). 2017-05-21 12:31:28 -05:00
evazion
666381a582 time_ago_in_words_tagged: handle times set in the future. 2017-05-05 11:33:10 -05:00
evazion
198b6db507 /bans: replace Expires column with Duration. 2017-04-19 17:56:25 -05:00
evazion
18a2b2a221 dtext_field: use the field name as the label, not "Body".
For flags and appeals, the reason field should be labeled Reason, not Body.
2017-04-13 15:17:55 -05:00
evazion
17d4feaf15 dmail_notice.html.erb: use absolute urls in dtext links. 2017-02-18 03:11:35 -06:00
evazion
bdf3366bcf Link IP addresses to IP searches. 2017-01-12 09:15:14 +00:00
evazion
469f48a118 Fix @mention autocomplete for comments & forum posts.
Fix comment autocomplete (broken in 1257639). Also fix forum post
autocomplete (didn't work when editing forum posts).
2017-01-02 12:53:30 -06:00
Type-kun
c9c9380093 Add CSS class for banned users(fixes #2691) 2016-09-28 19:15:45 +05:00
Type-kun
93fca3ce2b Amend wiki listing and general timezone formats (fixes #2649) 2016-09-01 22:37:09 +05:00
Type-kun
92b5e5e00d Display supervoter pref in API and CSS (#2641) 2016-08-27 16:11:48 +05:00
r888888888
c3b78b1752 add user searches 2016-08-23 18:20:21 -07:00
r888888888
41ee2de3d6 enable ragel parser for artist commentaries 2016-06-20 14:13:20 -07:00
r888888888
8cf893757e disable ragel parser 2016-06-20 11:35:06 -07:00