aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-10-13 09:06:13 -0400
committerBobby <[email protected]>2024-10-13 09:06:13 -0400
commitb2a7486de2ea7f33b70ab88bc304b98e26c548ea (patch)
tree6a894cf48f1d913f0bdda2448028803001373267 /templates
parent835fb19f8d6a1ba582294683bcad159dc9bcd23d (diff)
downloadyugen-b2a7486de2ea7f33b70ab88bc304b98e26c548ea.tar.xz
yugen-b2a7486de2ea7f33b70ab88bc304b98e26c548ea.zip
removed discord activity
Diffstat (limited to 'templates')
-rw-r--r--templates/watch/watch.html24
1 files changed, 0 insertions, 24 deletions
diff --git a/templates/watch/watch.html b/templates/watch/watch.html
index 93f2ff0..58765ae 100644
--- a/templates/watch/watch.html
+++ b/templates/watch/watch.html
@@ -1466,28 +1466,4 @@
fetch(nextEpisodeUrl.href);
{% endif %}
</script>
-<script>
- function clearDiscordStatus() {
- const url = '{% url "watch:clear_discord_status" %}';
- const data = new FormData();
- data.append('csrfmiddlewaretoken', '{{ csrf_token }}');
-
- if (navigator.sendBeacon) {
- // Use sendBeacon for page unload or tab close
- navigator.sendBeacon(url, data);
- } else {
- // Fallback for fetch if sendBeacon is not available
- fetch(url, {
- method: 'POST',
- body: data,
- });
- }
- }
-
- // Trigger on page unload and navigation events
- window.addEventListener('beforeunload', clearDiscordStatus);
- window.addEventListener('popstate', clearDiscordStatus);
- window.addEventListener('unload', clearDiscordStatus);
-
-</script>
{% endblock scripts %}