Commit graph

1014 commits

Author SHA1 Message Date
Ben Rog-Wilhelm
bf116115e2 Fix: Reporting comments is broken. 2022-09-27 18:43:20 -05:00
Julian Rota
0e5bf61d73 Add reasons to report screens 2022-09-26 03:07:48 -05:00
Michael House
0bfbf17e45 Implemented collapse bar colorization on the server side 2022-09-23 22:11:55 -05:00
TLSM
72b46a6888 Implement client-side collapsed comment memory.
Fixes #290. h/t Suspicious Turtle for initial implementation.
2022-09-09 19:47:26 -05:00
TLSM
3e8904757a Remove coins from popovers, disable coin routes.
The last places coins were visible to non-admins were in user popovers
and, potentially, via direct access of /@<username>/coins. These have
been removed.

Additionally, there are a number of routes which, despite being removed
from the UI, were still operative and usable. These are disabled
pending possible(?) future uses of coins.
2022-09-05 23:44:18 -05:00
TLSM
dbaf0a1bfd Remove unused polls code to reduce query volume.
Due to use of Submission.{choices, options, bet_options} in realbody,
generating submission_listings resulted in extremely high volume of
SELECT queries.

In local testing with 6 posts, one of which had a poll with 2 options,
the removal of these calls reduced quantity of queries on the homepage
from 84 to 22.

Given that it was previously decided to remove the polls feature after
a regression while adding comment filtering, the remaining dead code
paths for polls were also removed.
2022-09-05 23:44:18 -05:00
Julian Rota
cf9819ca5b Hide the reply section after submitting a response 2022-09-05 12:03:16 -05:00
TLSM
0b332e31bf Fix timestamp tooltips not appearing.
Another JS load order bug, previously fixed upstream. bs_trigger() in
header.js must be run after DOM content is loaded to properly set the
events for tooltips to appear on hover. This commit uses standard
document ready event boilerplate to ensure this happens, regardless
of script load order.
2022-08-27 06:15:38 -05:00
Ben Rog-Wilhelm
280e7275a6 Rejigger theme pretty heavily. I apologize for this change not being neatly split apart in any way. 2022-08-22 22:02:39 -05:00
Julian Rota
f2d657811f Fix the other report button for posts on the comments page 2022-08-19 03:18:35 -05:00
TLSM
4cfd1d5a5b
Fix 2FA modal not displaying in UI (#178). (#180)
Fixes issue #178. Root cause was attempting to document.getElementById
of both modal and toggle input before both were loaded into the DOM.
In the upstream, Cloudflare's Rocket Loader is used, which papers over
many cases of inattention to loading order.
2022-08-16 22:38:19 -05:00
painejohn
defe23ea16
Update comment reply css + clear preview as well (#158)
This basically extends the CSS changes from
https://github.com/themotte/rDrama/pull/150 to also cover comment
_replies_ and then updates the JS from
https://github.com/themotte/rDrama/pull/153 to also reset the comment
reply preview div back to default after posting the comment reply.
2022-08-10 06:04:54 -05:00
painejohn
cbcc2aac6f
139: Disabled multimedia embedding
This change disables multimedia embedding:

- In comments and comments replies.
- In new submissions.
- In comment & submission preview

And it's all toggle-able via an envvar, except for the JS bits,
but I linked those to the github issue, so should be easy to find
in the future.

The way it works is:

- removes markdown image/video syntax,
  eg. `![](https://example.org/someimage.jpg)` into ``
- changes link text into anchors, eg.
  `https://example.org/someimage.jpg` into
  `[https://example.org/someimage.jpg](https://example.org/someimage.jpg)`
- removes html img/video/audio tags, eg.
  `<img href="https://example.org/someimage.jpg" />` into ``
- when embedding gifs via the giphy modal in "new submission", it will
  insert only an anchor to the gif
- when attaching an image, it will upload the image, then add only an
  anchor to the post/comment body

I tested this manually, but not sure if I got all the test cases. What I
checked was:

- create comment w/ image/video/audio media using markdown -> success
- create comment reply w/ image/video/audio media using markdown ->
  success
- create comment w/ link to img/imgur/youtube/audio -> success
- create comment w/ attachment -> success
- create comment reply w/ attachment -> success
- create comment w/ img/video tag -> success
- create comment reply w/ image/video tag -> success
- create post submission w/ image/video/media using markdown -> success
- create post submission w/ link to img/imgur/youtube/audio -> success
- create post submission w/ attachment -> success
- create post submission w/ giphy gif -> success

Also, updated the formatting page.

Co-authored-by: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
2022-08-07 01:30:47 -05:00
painejohn
8463a9ebbe
135 - Posting a comment clears out comment textarea & preview 2022-08-07 01:17:46 -05:00
Ben Rog-Wilhelm
800ae8d2dc Split SITE_NAME into computer-readable SITE_ID and human-readable SITE_TITLE. 2022-07-31 18:53:18 -05:00
JulianRota
f495981a5e
Merge pull request #122 from zorbathut/pr_fixvote
Fix voting.
2022-07-26 23:19:33 -04:00
Ben Rog-Wilhelm
0082434458 Fix voting. 2022-07-23 04:41:47 -05:00
Julian Rota
81610b803a Support settings for integers and allow setting filter settings in UI 2022-07-09 06:33:41 -05:00
Julian Rota
bd5fd8fb21 Switch over comment reporting to use the new system 2022-07-09 06:33:41 -05:00
Julian Rota
a0488f2b23 UI to allow update of comment filter status 2022-07-09 06:33:41 -05:00
Michael House
db185a9ef2
Fixed reply-twice bug on submission page. 2022-06-29 00:25:11 -05:00
Michael House
715d402a11 Merge branch 'frost' into fix_profile_image_performance 2022-06-08 07:18:37 -05:00
Julian Rota
1e0aa4ee22 Merge branch 'frost' into new-user-filtering 2022-06-06 14:56:28 -04:00
Michael House
e63a021c61 Added mentions to the markdown preview 2022-06-06 06:09:42 -05:00
Michael House
03aa2ca48e Added spoiler extension to the marked.js markdown preview 2022-06-05 15:56:11 -05:00
Michael House
bce168c295 Added purify for html sanitization 2022-06-05 10:58:17 -05:00
Michael House
bce836bf81 First stab at resolving html entities not being rendered 2022-06-05 10:37:09 -05:00
Michael House
f3f2aa3935 Made a lot of small changes in the frontend 2022-06-04 07:48:26 -05:00
Michael House
0d489d9dd7 Fixed issue with empty-comment-section message staying after reply is submitted 2022-06-03 07:07:27 -05:00
Michael House
058e50add7 Added new default text and default link thumbnails, color fixes for some buttons 2022-06-03 06:36:03 -05:00
Julian Rota
60084e5eef Update JS to clean up reporting UI after addressing 2022-05-23 22:59:40 -04:00
Julian Rota
0002f66f36 Merge branch 'frost' into new-user-filtering 2022-05-22 17:01:45 -04:00
Michael House
f3a479f991 Removed emoji feature from templates and deleted emoji images 2022-05-18 20:53:28 -05:00
faul_sname
309bf44f12 [#80] Fix XSS vulnerability
On unmodified themotte, try creating a submission with

```html
<img src="/doesnotexist.png" onerror="alert(1)" />
```

and observe that your browser opens an alert window.
2022-05-17 19:00:23 -05:00
faul_sname
61fe88d876 [#80] Fix replacement of link with itself 2022-05-17 19:00:23 -05:00
faul_sname
e1a1277268 [#80] Split marked.js into vendor part and custom part 2022-05-17 19:00:23 -05:00
Julian Rota
6d68993a8d Merge branch 'frost' into new-user-filtering 2022-05-16 23:55:50 -04:00
Julian Rota
f231726b3a Initial filtering of posts/submissions 2022-05-16 23:33:12 -04:00
Michael House
19903cccb5
Adding usernotes. 2022-05-16 11:53:24 -05:00
iro84657
b7da8b575a Add trailing LF to text files 2022-05-10 21:05:51 -04:00
Ben Rog-Wilhelm
1ee9c1bfa7
Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
evangambit
4e533e5c37 Remove old backgrounds and replace with a (legal) placeholder
I'm not deleting the code entirely since we may want to use it in the future
2022-05-08 21:43:46 -07:00
Aevann1
fa32d895f6 dfg 2022-05-02 01:55:55 +02:00
Aevann1
709a7fc4b5 sfd 2022-05-01 23:44:38 +02:00
float-trip
5beb5a2411
fix comment previews for pat emojis (#233) 2022-05-01 20:23:02 +02:00
Aevann1
240b451962 fsd 2022-05-01 02:53:24 +02:00
Aevann1
d6936395b7 fsd 2022-04-29 16:28:13 +02:00
Aevann1
a3832f4c5b fds 2022-04-28 02:04:01 +02:00
Aevann1
c37d5b7ef1 fds 2022-04-28 01:09:39 +02:00
Aevann1
35697540af fsd 2022-04-26 15:40:37 +02:00