forked from rDrama/rDrama
1
0
Fork 0
rDrama/files/assets/js
Aevann ab554c163c Add a button for enabling push notifications (#158)
Safari requires some user interaction to subscribe to push notifications ([see this](https://developer.apple.com/documentation/usernotifications/sending_web_push_notifications_in_web_apps_safari_and_other_browsers)), so this PR adds a button to the navigation menu that requests notification permissions and does the subscription stuff. It also hides the "Mobile App" button from PWA

Side effect of this PR is that push permissions aren't gonna be requested automatically on other platforms anymore like they used to. Also it's probably a good idea to add this button somewhere else too because it's not very accessible on desktop
![image](/attachments/f2f78028-9e5f-484f-aa98-59eb60e3ccd5)

Co-authored-by: borntolurk <borntolurk@rdrama.net>
Reviewed-on: rDrama/rDrama#158
Co-authored-by: borntolurk <borntolurk@noreply.fsdfsd.net>
Co-committed-by: borntolurk <borntolurk@noreply.fsdfsd.net>
2023-06-29 21:09:27 +03:00
..
admin rename flags to reports 2023-06-23 19:49:26 +03:00
casino its "coins" not "coin" 2023-06-08 04:32:58 +03:00
vendor replace spaces with tabs 2023-05-06 00:47:09 +03:00
award_modal.js rename "agendaposter" to "chud" 2023-06-23 14:07:47 +03:00
bottom.js Add a button for enabling push notifications (#158) 2023-06-29 21:09:27 +03:00
bugs.js reduced the number of bugs and fireflies on mobile 2023-06-26 14:40:36 +03:00
chat.js replace icon and headericon with carp 2023-06-28 17:31:41 +03:00
comment_info.js stop using inline style/script elements 2022-12-29 16:20:27 +02:00
comments+post_listing.js fix hecking buggerino 2023-06-28 00:13:07 +03:00
comments.js rename flags to reports 2023-06-23 19:49:26 +03:00
comments_v.js generate markdown preview when clicking "edit" on comments 2023-06-07 23:04:00 +03:00
core.js Add a button for enabling push notifications (#158) 2023-06-29 21:09:27 +03:00
cursormarsey.js add tabs 2023-05-13 06:08:37 +03:00
delete_post_modal.js rename flags to reports 2023-06-23 19:49:26 +03:00
edit_post.js generate markdown preview when clicking edit (to make page jump to the top instead of bottom) 2023-05-14 19:33:59 +03:00
emoji_modal.js do this https://rdrama.net/h/countryclub/post/79285/-/4412138#context 2023-06-23 14:57:29 +03:00
fart.js get rid of useless tabs and spaces 2023-01-01 13:36:20 +02:00
fireflies.js reduced the number of bugs and fireflies on mobile 2023-06-26 14:40:36 +03:00
fireworks.js add padding + slightly increase interval between fireworks 2023-06-28 00:22:37 +03:00
flairchanged.js stop using inline style/script elements 2022-12-29 16:20:27 +02:00
followers.js rename postToast -> postToastSwitch and postToastCallback -> postToast for clarity 2022-11-03 21:08:22 +02:00
following.js rename postToast -> postToastSwitch and postToastCallback -> postToast for clarity 2022-11-03 21:08:22 +02:00
formatting.js center "what you type" in /formatting vertically 2023-04-25 13:19:00 +02:00
fp.js cache-bust all 2023-04-25 18:24:12 +02:00
gif_modal.js Revert "use () => instead of function() for consistency" 2023-03-10 05:21:02 +02:00
group_members_owner.js uncapitalize 2 words 2023-02-26 10:59:26 +02:00
hats.js cache-bust all 2023-04-25 18:24:12 +02:00
login_2fa.js stop using inline style/script elements 2022-12-29 16:20:27 +02:00
lottery.js cache-bust all 2023-04-25 18:24:12 +02:00
markdown.js make approved_embed_hosts tighter + fix this https://rdrama.net/h/anime/post/162771/this-is-unironically-a-great-idea/4030880#context 2023-04-29 22:50:47 +02:00
mobile_navigation_bar.js Revert "use () => instead of function() for consistency" 2023-03-10 05:21:02 +02:00
mobile_prompt.js accomodate 8488e98780 2023-06-07 04:19:16 +03:00
more_comments.js revert the new comments system 2023-03-25 20:25:38 +02:00
namechanged.js add namelock award 2023-05-13 07:53:14 +03:00
new_comments.js add a const 2023-02-18 22:55:39 +02:00
post.js rename submissions to posts 2023-06-08 02:26:32 +03:00
post_listing.js rename submissions to posts 2023-06-08 02:26:32 +03:00
profile_song.js do something like this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/4105303#context 2023-05-13 06:46:11 +03:00
register_service_worker.js Add a button for enabling push notifications (#158) 2023-06-29 21:09:27 +03:00
remove_mod.js same as last commit 2022-12-30 14:52:59 +02:00
report_post_modal.js dont put reporting event listener assignment inside a function 2023-05-01 21:30:28 +03:00
ricardo.js convert "var" to "let" and "const" 2022-12-04 17:40:32 +02:00
search.js more intuitive search parameters 2023-06-24 17:36:57 +03:00
service_worker.js get rid of useless tabs and spaces 2023-01-01 13:36:20 +02:00
settings_blocks.js fix error msgs in /settings/blocks 2023-06-24 20:36:27 +03:00
settings_profile.js cache-bust all 2023-04-25 18:24:12 +02:00
settings_security.js restore blocks to its own page in the settings 2023-05-05 05:16:19 +03:00
signup.js Revert "use () => instead of function() for consistency" 2023-03-10 05:21:02 +02:00
spider-with-bugs.js reduced the number of bugs and fireflies on mobile 2023-06-26 14:40:36 +03:00
spider.js add spider award 2022-09-20 19:52:52 +02:00
submit.js Revert commit that made kaamrev lose his hard work 2023-06-27 20:05:27 +03:00
submit_emojis.js same as last commit 2023-03-18 16:59:11 +02:00
submit_hats.js fix bug with pasting in /submit + dedup 2023-03-04 21:54:06 +02:00
top.js the worst fucking code you'll ever see 2022-12-30 14:14:18 +02:00
userpage.js fix this https://stupidpol.site/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3419331#context 2023-01-27 15:06:37 +02:00
userpage_v.js make the logic for disabling buttons consistent 2023-03-09 21:41:08 +02:00
view_more.js Revert "use () => instead of function() for consistency" 2023-03-10 05:21:02 +02:00