Aevann1
74a5ea88ac
expand post searching to include bodies (instead of titles only)
2022-06-13 19:33:20 +02:00
Aevann1
53a8818f80
fix snappy gambling
2022-06-13 19:30:04 +02:00
Aevann1
f8c60e61f9
expand modaction notifications to ban, unban, and grass awards
...
(but only if used by JL3, since they can print awards willy nilly)
2022-06-13 19:22:30 +02:00
Aevann1
daab141798
increase award-coulmns from 6 to 7
2022-06-13 19:13:16 +02:00
Aevann1
8a5d2ad9f8
tinker with image heights a little
2022-06-13 19:00:50 +02:00
Aevann1
fdbc2d2f2c
make user banners expand in the same page (like hole banners)
2022-06-13 18:57:44 +02:00
Aevann1
dd09eff539
fix oversight in ba883a5340
2022-06-13 18:50:30 +02:00
Aevann1
248e743ddb
change fb0a590007
to make it include ALL images on the site
2022-06-13 18:47:56 +02:00
Aevann1
d09634bf20
make log show 0 actions when u filter by a kind that doesn't exist
...
(instead of showing all actions)
2022-06-13 18:41:46 +02:00
Aevann1
5a0dccbd50
fix missing comma in fb0a590007
2022-06-13 18:36:45 +02:00
Aevann1
fb0a590007
limit max-height of expanded images to 100% of monitor height
2022-06-13 18:33:09 +02:00
Aevann1
6d1f7646ba
elaborate in lottershe message
2022-06-13 18:30:27 +02:00
Aevann1
c8e0d8b1c3
catch email exception
2022-06-13 18:28:37 +02:00
Aevann1
ba883a5340
give chadmins notifications for unbans and unremovals
2022-06-13 16:40:16 +02:00
Aevann1
cf827bdf38
unhide some mod actions from non-jannies
2022-06-13 15:37:46 +02:00
Snakes
3ebba0465a
Close more shadowbanned user info leaks.
...
1. Missed the notif for unfollowing a non-fish'd user in fb52003404
.
2. "Get Them Help" button showed username.
3. Gift coins/mbux showed username and allowed a message.
4. Global block list showed username.
5. User profile appeared to logged-out and non-jannies.
2022-06-12 23:03:36 -04:00
Snakes
fb52003404
Hide block & follow notifs from shadowed.
2022-06-12 22:11:55 -04:00
Aevann1
0fe3936cbb
make CTRL+Enter work on input fields too
2022-06-12 20:11:06 +02:00
Snakes
acde2c856b
Enable JL2 viewing shadowbanned comments.
2022-06-12 05:48:27 -04:00
Snakes
7915eb8390
Fix giant patting hand UI bug.
...
Despite being very fun, this fixes the recently discovered bug where
placing '#' or '!' within the 'pat:' suffix of a patted emoji causes
the enclosing <span> to not be given the proper CSS `display` or
`position`, leading to the hand being sized relative to the comment
bounding box rather than the emoji box.
This should be backward compatible. The only posts it wont fix are
existing ones with the giant hands. Main example being:
https://rdrama.net/h/slackernews/post/76302/
2022-06-12 02:22:38 -04:00
Snakes
f76b94b58d
Content: keywords updates.
2022-06-11 22:08:48 -04:00
Aevann1
85b4158d5b
"1 lottery tickets" -> "1 lottery ticket"
2022-06-11 16:52:20 +02:00
Aevann1
30f71855f4
fix 5e9297b78f
2022-06-11 16:50:26 +02:00
Aevann1
5e9297b78f
rename "Lottershe" to "Lottery" on other sites
2022-06-11 16:44:13 +02:00
Aevann1
adefc09ae9
rename "dramacoins" to "coins", so that it works on other sites
2022-06-11 16:40:53 +02:00
Aevann1
cf83a996bd
let losers know how much coins the winner won
2022-06-11 16:40:14 +02:00
Aevann1
b94fabddb4
rDrama -> SITE_NAME
2022-06-11 16:39:00 +02:00
Aevann1
165e394dea
decreased award threshold from 4GB to 3GB
2022-06-11 15:56:21 +02:00
Aevann1
1212804fbf
exclude pings from link counter
2022-06-11 15:19:39 +02:00
Aevann1
f80424b103
Merge branch 'frost' of https://github.com/Aevann1/Drama into frost
2022-06-11 15:07:51 +02:00
Aevann1
c59708c416
fixed uneven award modal on mobile
2022-06-11 15:07:47 +02:00
Snakes
4b1faca58e
Swap create/browse holes in sidebar.
2022-06-11 08:49:17 -04:00
Aevann1
3ec049e222
testing commit #2
2022-06-11 14:33:17 +02:00
Aevann1
6314b0f788
testing commit #1
2022-06-11 14:31:43 +02:00
Aevann1
831344b723
small image embed improvements
2022-06-11 14:21:59 +02:00
Aevann1
12a9307ab3
don't restrict file extensions on the frontend side (leave it to the backend)
2022-06-11 13:38:45 +02:00
Aevann1
a082105ab8
remove weird trailing tabs
2022-06-11 11:56:16 +02:00
Aevann1
c0da5ed7d9
make twitter links have "nofollow noopener norefeerrer"
2022-06-11 11:53:53 +02:00
Aevann1
3b50c92afb
make padding for notification tabs smaller on small devices
2022-06-11 11:37:30 +02:00
Aevann1
79df456d13
fix gigantic lottery messages on mobile
2022-06-11 11:33:40 +02:00
Aevann1
358ce08544
don't collapse gambling comments when viewing a comment
2022-06-11 11:30:46 +02:00
Aevann1
1f42d228c1
remove 'apnic' from word list
2022-06-11 11:27:55 +02:00
Snakes
28002844e4
offsitementions: Fix notif logic.
2022-06-10 22:04:17 -04:00
Snakes
bebc0f11ef
Revert "delete useless file"
...
This reverts commit 5634330c66
.
The empty __init__.py is _NOT_ useless. It makes Python treat `files`
as a module properly, and it breaks cli.py and the cronjobs if it is
deleted. Yes, we need the empty file.
2022-06-10 21:50:09 -04:00
Aevann1
07e98ab2f0
Revert "yandex verification"
...
This reverts commit dfbc645ffe
.
2022-06-11 01:08:34 +02:00
Aevann1
dfbc645ffe
yandex verification
2022-06-11 01:05:59 +02:00
Aevann1
f548c2077d
show names of all files when pasting instead of just the first file
2022-06-11 00:37:55 +02:00
Aevann1
964318fe5d
fix push notifications
2022-06-11 00:14:03 +02:00
Aevann1
bceb87d58c
disable the JS for shit/fireflies/fireworks/strippercake
...
awards on devices with less than 4 GB RAM
2022-06-10 23:58:17 +02:00
Aevann1
f7cce1469c
Revert "use redis for site settings instead of a json file"
...
This reverts commit a7b67db555
.
2022-06-10 23:52:32 +02:00
Aevann1
d5ca8bf7cb
Revert "move site settings into redis 2"
...
This reverts commit 7848b12fdd
.
2022-06-10 23:52:17 +02:00
Aevann1
5634330c66
delete useless file
2022-06-10 23:50:49 +02:00
Aevann1
545f276940
add created_utc column to badges for ordering them on userpages
2022-06-10 23:40:43 +02:00
Aevann1
7848b12fdd
move site settings into redis 2
2022-06-10 23:39:33 +02:00
Aevann1
a7b67db555
use redis for site settings instead of a json file
2022-06-10 23:22:09 +02:00
Aevann1
9fb33d064a
disallow #21262c from being used as a name color or a flair color
2022-06-10 22:52:20 +02:00
Aevann1
87ba1ba50e
fix benefactor exploit (thx sneks my beloved)
2022-06-10 22:40:04 +02:00
Aevann1
79bc71f132
change sidebar artwork megathread link for idio
2022-06-10 22:35:19 +02:00
Aevann1
d84a4c7ce9
convert monthly marseybux into a cron task
2022-06-10 22:23:01 +02:00
Aevann1
760aa397c8
refactor monthly marseybux logic a little bit
2022-06-10 22:13:20 +02:00
Aevann1
b4b4ab1e9a
when granting monthly awards, add 5 days to the date
...
so when I grant awards on 29/5 for example,
it says in the notification "for the month of July" instead of "for the month of May"
extremely minor but I have autism
2022-06-10 22:09:59 +02:00
Aevann1
654ddc4157
re-refactor normalize_url
2022-06-10 22:02:15 +02:00
Aevann1
2af325de97
make "previous" and "next" buttons bolder
2022-06-10 21:49:07 +02:00
Aevann1
cda275c194
replace \n with \n\n in previews (to match the backend behavior)
2022-06-10 21:45:48 +02:00
Aevann1
b2b86abfd0
trim selection on quoting
2022-06-10 21:43:39 +02:00
Aevann1
995e6e9edb
add thumbnail for posts linking to same site
2022-06-10 21:21:25 +02:00
Aevann1
36a1797276
escape / in imgur_regex
2022-06-10 21:04:25 +02:00
Aevann1
f2d49f981d
host the image used in 4chan.css ourselves
2022-06-10 21:00:06 +02:00
Aevann1
9781443f89
Increase margins for "block hole" and show "follow hole" to loggedout-cels
2022-06-10 20:17:58 +02:00
Aevann1
4910681c6f
make the default HOLE_COST 0 (for testing purposes)
2022-06-10 20:14:24 +02:00
Aevann1
733ac0e319
make the js for gif insertion a little better
2022-06-10 20:13:01 +02:00
Aevann1
5d6343159b
reduce column count from 8 to 6
2022-06-10 20:09:13 +02:00
Aevann1
10ffa90167
make the javascript use 1 linefeed instead of 2
...
we don't need it to do 2 linefeeds anymore
because the backend handles that before sanitizng
2022-06-10 20:05:54 +02:00
Aevann1
f9a0cff350
make the page always jump to the comment you wanna view
2022-06-10 20:01:12 +02:00
Snakes
642f5e7a1c
Holes: remove JL3 on /create_hole
2022-06-10 12:59:25 -04:00
Aevann1
558726228e
fix floating awards being too large
2022-06-10 17:47:17 +02:00
Aevann1
e53a286d49
notify mods of the deletion of their holes
2022-06-10 17:41:33 +02:00
Aevann1
6a18c31ced
exclude localhost from reddit notifs
2022-06-10 17:30:30 +02:00
Aevann1
774e079942
extend reddit notifs to ALL SITES
2022-06-10 17:25:03 +02:00
Snakes
78d784533c
Fix syntax & imports in offsitementions.py
2022-06-10 11:13:32 -04:00
Aevann1
05d6a24535
Tell ppl who won the lottery in loss messages
2022-06-10 16:53:29 +02:00
Aevann1
e483accffb
fixed this https://files.catbox.moe/qdcbvd.png
2022-06-10 16:47:34 +02:00
Aevann1
abae90fbfd
fixed bug with snappy gambling
2022-06-10 16:44:30 +02:00
Aevann1
5db4bd1023
made CARP_ID to be 0 on new sites
2022-06-10 16:44:05 +02:00
Aevann1
6800d33019
replace streamable links with full-size version
2022-06-10 16:35:09 +02:00
Aevann1
1adf12cf71
add forgotten </i>
2022-06-10 16:10:04 +02:00
Aevann1
22f3749df3
Merge branch 'frost' of https://github.com/Aevann1/Drama into frost
2022-06-10 16:04:52 +02:00
Aevann1
dcf5207e83
all 'app' tld (for discussions.app)
2022-06-10 16:04:49 +02:00
Snakes
2f1761330c
Lottery: remove manager, make cronjob friendly.
2022-06-10 09:50:03 -04:00
Aevann1
3e365484fd
refactor lottery a little bit + expand it to all of marsey's empire
2022-06-10 15:30:25 +02:00
Aevann1
38686e8e1e
remove useless fontawesome css rules
2022-06-10 15:28:50 +02:00
Aevann1
a6f80d8104
Changed the icon for "unfollow hole"
2022-06-10 15:24:10 +02:00
Aevann1
f09e6bf67c
add icon for "block hole"
2022-06-10 15:21:03 +02:00
Aevann1
039a27100d
add small margin to the icon of "Follow hole"
2022-06-10 15:13:25 +02:00
Aevann1
76174edb89
Fixed bug with unfound template
...
(oversight when I renamed /create_sub to /create_hole)
2022-06-10 14:50:11 +02:00
Aevann1
2db414f12d
Merge branch 'frost' of https://github.com/Aevann1/Drama into frost
2022-06-10 14:48:14 +02:00
Aevann1
2b82f95a98
Make hole cost constant instead of variable
2022-06-10 14:48:11 +02:00
Snakes
4db48a6ec9
Separate modaction notifs from inbox.
2022-06-10 08:28:46 -04:00
Snakes
8709ca816d
Add Y'all Seein' Eye award v2 for offsitementions.
...
Reusing the assets and design for the ill-fated YSE in a0f441a67d
.
This time, the award provides access to our offsite mentions (reddit
notifs).
2022-06-10 07:12:19 -04:00
Snakes
bea6d82b61
Lottery: fix granted value, zero royalty.
...
grant_lottery_tickets_to_user incorrectly deposited the full ticket
value into manager account, not just the net value.
Additionally, royalty rate has been set to zero because Chapose won
the first lottery and grifting 8% that could instead go into the
prize pool seems unwarranted given that.
2022-06-10 06:15:37 -04:00
Snakes
b0554ce303
Add follower count to /holes table.
2022-06-10 06:06:56 -04:00
Snakes
5f7b38b477
Refactor stat timers, award timers.
...
Prior to this comment, the every-1d cron.py command was broken due
to lack of proper stats import. However, while refactoring this, it
was convenient to move other recurring tasks that had been stuffed in
odd places--not least `stats(...)`--into the new cron system. This
entailed a number of refactorings of other things.
1. Move stats(...) from static.py to helpers/stats.py.
2. Move hole inactivity purge task from stats(...) to routes/subs.py.
3. Move bot award timer checks from stats(...) to helpers/awards.py.
4. Unify award timer logic formerly in routes/front.py into the new
helpers/awards.py.
2022-06-10 05:47:41 -04:00
Aevann1
934b631730
rename /create_sub to /create_hole
2022-06-10 00:29:45 +02:00
Aevann1
3a9f3c329f
fix hole deletion
2022-06-10 00:13:33 +02:00
Aevann1
10f3d4035d
delete inactive holes
2022-06-10 00:07:17 +02:00
Snakes
dc7f13304e
Add following holes for notifications.
2022-06-09 16:24:24 -04:00
Aevann1
39e0e6d017
make cron also calculate stats (based and cronpilled)
2022-06-09 20:09:49 +02:00
Aevann1
c100ed415c
increase edit_post ratelimit so it doesnt fuck with drafts
2022-06-09 20:09:18 +02:00
Aevann1
63c16a867a
make the ratelimit for editing much lower to cut
...
down on mass overwriting
2022-06-09 18:10:25 +02:00
Aevann1
cea253a52c
don't notify me anymore of carp posts
2022-06-09 15:29:13 +02:00
Aevann1
900edaa92e
made it so you can click "CTRL+Enter" anywhere in
...
/submit in order to make a post
2022-06-09 13:12:25 +02:00
Snakes
b94e71450f
Add un-holing to hole report command.
2022-06-09 02:42:52 -04:00
Snakes
5a5a0f6bd1
Swap badge 139 asset to rescale.
2022-06-08 01:29:12 -04:00
Snakes
63f45f81fd
Make shop flavor text site-specific.
2022-06-07 23:25:39 -04:00
Snakes
ed240735fb
Improve slur replacer performance, part deux.
...
h/t @official-techsupport again for finding another optimization.
We are now cumulatively at about 70% speedup over original.
It remains one of the hottest paths of the codebase in relative
terms, but its absolute performance demands have decreased enough
to buy us potentially substantial time on it.
2022-06-07 21:56:14 -04:00
Snakes
da82ea81d8
Improve slur replacer performance.
...
h/t @official-techsupport for digging into the regex performance and
coming up with one that greatly reduces backtracking. We see an
approximately 2x speedup under typical loads, which proves to be a
major overall savings in performance. Previously, censor_slurs was,
second to ORM DB accesses, by far the most time-consuming function
in the codebase under typical loads. It's still not ideal, but it is
much better.
Future options to improve this critical path further would be:
1) Precompute a slur-replaced HTML, rather than recomputing
each pageload. Storage is cheap.
2) Tokenize the HTML and replace plaintext words using O(1)
exact-match lookups to a dict.
2022-06-07 21:16:58 -04:00
Snakes
e85d76947a
Lottery: fix negative ticket quantity exploit.
2022-06-07 17:50:31 -04:00
Snakes
995375decc
Refactor reddit mentions, move to cron.
...
The reddit mentions system contained much duplicated code and was
grafted onto the post thumbnail pipeline to achieve semi-regular
invocation. Instead, we now run it through the new cron system,
and the duplicate code has been refactored out.
2022-06-07 10:42:24 -04:00
Snakes
152315f73e
cron: Move charts from static to helper.
2022-06-07 08:31:24 -04:00
Snakes
ace0a62f69
cron: Add lottery as scheduled task.
2022-06-07 07:36:55 -04:00
Aevann1
690d4d72ed
Merge branch 'frost' of https://github.com/Aevann1/Drama into frost
2022-06-07 13:34:59 +02:00
Snakes
e217335b3a
Make pat anims unaffected by anim setting.
2022-06-07 07:29:07 -04:00
Aevann1
d431ae1ecd
re-prioitize effortposts (with a lot of links) in the frontpage
2022-06-07 13:26:39 +02:00
Snakes
b187b72746
Remove backdrop blur on modals.
...
By direct command of Benevolent rDrama Caliph for Life, his
exaltedness Aevann. Was causing performance issues on a large
number of users' systems.
2022-06-07 07:23:46 -04:00
Snakes
acb3a0b338
Enable flask command, add cron target.
...
Adding an empty __init__.py, the imports-only cli.py, and setting
FLASK_APP in the environment are enough to get the `flask` command
to work. This will enable future changes, including database
migrations.
The proximate reason for the fix is to add a `flask cron` command
to run scheduled tasks within the application from cron. Specifically,
the lottery should be run from cron.
2022-06-07 06:57:26 -04:00
Aevann1
aaeb09fd91
add me to WPD discord too
2022-06-07 12:55:50 +02:00
Aevann1
ecc121bf93
fix gigantic wholesome award size on mobile
2022-06-07 12:52:48 +02:00
Aevann1
4a98c2a639
don't whitelist fagmins
2022-06-07 12:34:46 +02:00
Aevann1
1bce1c273f
no more 500 error
2022-06-07 12:32:48 +02:00
Aevann1
4a1e6cc726
a 500 error is much better than an XSS, bro
2022-06-07 12:03:51 +02:00
Snakes
cb5f9d05c6
templates: Fix improper plurals, create helpers.
...
Previously, the three instances of 'Report[s]' and one instance of
'Coin[s]' in the UI templates were always pluralized, even when they
referred to a singular instance. This has been corrected by creating
a `plural` helper macro.
Additionally, this was used as impetus to create `utils/helpers.html`
to eventually move more recurring template logic into macros.
2022-06-07 05:26:22 -04:00
Aevann1
f966262b97
Merge branch 'frost' of https://github.com/Aevann1/Drama into frost
2022-06-07 11:18:12 +02:00
Aevann1
d761fc27cd
Revert "Make CARP_ID's flair uneditable by others."
...
This reverts commit c2266985b7
.
2022-06-07 11:18:09 +02:00
Snakes
70b96162a7
Fix banned domain info leak in modlog.
2022-06-06 22:18:56 -04:00
Snakes
dece3fd460
Add user title coin cost parameter.
2022-06-06 19:02:23 -04:00
Aevann1
4aeb438c6b
extend removal notifs from only me to all Lvl3 jannies
2022-06-06 07:50:38 +02:00
Aevann1
282f8d885c
Merge branch 'frost' of https://github.com/Aevann1/Drama into frost
2022-06-06 07:42:21 +02:00
Aevann1
b2ec368a7e
give me a better discord role
2022-06-06 07:42:19 +02:00
Snakes
7556fe8988
Add lottershe badge logic, badge helper.
2022-06-06 00:07:38 -04:00
Aevann1
43dbcadc6b
add me into jannycord
2022-06-05 17:05:43 +02:00
Snakes
0e0a8d391b
Amend 20b136909: string comparison bug.
...
Fixes logic which failed because user_id was a string which I
improperly treated as an integer for comparisons.
2022-06-04 23:58:03 -04:00
Snakes
c2266985b7
Make CARP_ID's flair uneditable by others.
...
This is a kludge solution that sticks special case logic in places
it shouldn't be. However, community management demands necessitate it
quickly. Of the three ways to change a flair (customtitle), this
prevents using flairlocks and admin flair editing on the user with
CARP_ID. Only the user himself may change his flair through settings.
2022-06-04 23:34:44 -04:00
Snakes
5fb358a32a
Add more TLDs to sanitize.
2022-06-03 17:01:32 -04:00
Snakes
998a8f462e
Add links to orphan endpoints.
2022-06-03 06:29:35 -04:00
Snakes
b306d113ad
Lottery: Fix treasure adding coins to manager.
...
It was observed in prod that the lottery prize as tracked by the DB
had diverged from the amount held in the Lottershe manager account.
This appears to be the result of grant_lottery_tickets_to_user
adding the # of _tickets_ rather than the value of those tickets to
the manager.
2022-06-03 02:24:32 -04:00
Snakes
843ff51ace
Make post rate limit site-specific.
2022-06-02 22:10:59 -04:00
Snakes
379ae664a3
Make PIN_LIMIT a per-site constant.
2022-06-02 19:45:33 -04:00
Snakes
6b9a133204
Kitchen sink commit, misc. content updates.
...
- Increment cache version on popover badges.
- Add comments+submission_listing.js to assetcache to support ^.
- Append new words to wordle list.
- Cache bust assorted assets for recent PRs.
2022-06-02 19:32:13 -04:00
outruncolors
dfd521b652
Add quantity field to purchasing tickets / Make Chapose the beneficiary ( #302 )
...
* Add quantity field to purchasing tickets
* Remove height requirement for div (manlets seething)
2022-06-02 19:19:49 -04:00
float-trip
58c4b62163
Some fixes ( #300 )
...
* Narrow emoji_regex
* Fix mirrored pat emojis
* Fix ban icon on posts/comments
2022-06-02 19:18:10 -04:00