summaryrefslogtreecommitdiffstats
path: root/assets/js/subscribe_widget.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/subscribe_widget.js')
-rw-r--r--assets/js/subscribe_widget.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/assets/js/subscribe_widget.js b/assets/js/subscribe_widget.js
index 25c5f2a6..f875d505 100644
--- a/assets/js/subscribe_widget.js
+++ b/assets/js/subscribe_widget.js
@@ -7,8 +7,8 @@ if (subscribe_button.getAttribute('data-type') === 'subscribe') {
subscribe_button.onclick = unsubscribe;
}
-function subscribe(timeouts = 0) {
- if (timeouts > 10) {
+function subscribe(timeouts) {
+ if (timeouts >= 10) {
console.log('Failed to subscribe.');
return;
}
@@ -37,12 +37,12 @@ function subscribe(timeouts = 0) {
xhr.ontimeout = function () {
console.log('Subscribing timed out.');
- subscribe(timeouts + 1);
+ subscribe(timeouts++);
}
}
-function unsubscribe(timeouts = 0) {
- if (timeouts > 10) {
+function unsubscribe(timeouts) {
+ if (timeouts >= 10) {
console.log('Failed to subscribe');
return;
}
@@ -71,6 +71,6 @@ function unsubscribe(timeouts = 0) {
xhr.ontimeout = function () {
console.log('Unsubscribing timed out.');
- unsubscribe(timeouts + 1);
+ unsubscribe(timeouts++);
}
}
='logsubject'>Update Spanish translationHosted Weblate Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: gallegonovato <fran-carro@hotmail.es> 2024-10-06Update Dutch translationHosted Weblate Update Dutch translation Update Dutch translation Co-authored-by: Dick Groskamp <dikgro@yahoo.co.uk> Co-authored-by: Hosted Weblate <hosted@weblate.org> 2024-10-06Update Interlingua translationHosted Weblate Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Software In Interlingua <softinterlingua@gmail.com> 2024-10-06Update Arabic translationHosted Weblate Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Rex_sa <rex.sa@pm.me> 2024-10-06Update Italian translationHosted Weblate Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Random <random-r@users.noreply.hosted.weblate.org> 2024-10-06Update Polish translationHosted Weblate Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Matthaiks <kitynska@gmail.com> 2024-10-06Update Croatian translationHosted Weblate Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Milo Ivir <mail@milotype.de> 2024-10-06Update Icelandic translationHosted Weblate Co-authored-by: Sveinn í Felli <sv1@fellsnet.is> 2024-10-06Update Portuguese translationHosted Weblate Co-authored-by: Henrique Oliveira <ho.henrique@proton.me> Co-authored-by: Hosted Weblate <hosted@weblate.org> 2024-10-06Update Czech translationHosted Weblate Co-authored-by: Fjuro <fjuro@alius.cz> Co-authored-by: Hosted Weblate <hosted@weblate.org> 2024-10-06Update Japanese translationHosted Weblate Update Japanese translation Co-authored-by: Himmel <Himmel@users.noreply.hosted.weblate.org> Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: maboroshin <maboroshin@users.noreply.hosted.weblate.org> 2024-10-06Update Ukrainian translationHosted Weblate Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com> 2024-10-06Update Russian translationHosted Weblate Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: lotigara <lotigara@yandex.ru> 2024-10-06Update Greek translationHosted Weblate Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: hompre <46e989cc@opayq.com> 2024-10-06Update German translationHosted Weblate Update German translation Co-authored-by: Ettore Atalan <atalanttore@googlemail.com> Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Lenny Angst <lenny@familie-angst.ch> 2024-10-06Update Portuguese (Brazil) translationHosted Weblate Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Jose Delvani <jsdelvani@users.noreply.hosted.weblate.org> 2024-10-06Update Turkish translationHosted Weblate Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Oğuz Ersen <oguz@ersen.moe> 2024-09-28Remove myself from CODEOWNERS on the config file (#4942)TheFrenchGhosty 2024-09-20Update latest version WEB_CREATOR + fix comment web embed (#4930)Émilien (perso) * Update to latest version WEB_CREATOR * fix comment about using web embed as a fallback 2024-09-20use WEB_CREATOR when po_token with WEB_EMBED as a fallback (#4928)Émilien (perso) * use WEB_CREATOR when po_token with WEB_EMBEDDED_PLAYER as a fallback * remove unrelated comment Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com> --------- Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com> 2024-09-17Revert "use web screen embed for fixing potoken functionality (#4923)"Emilien Devos This reverts commit de918b9234b99f91a0a364fc675533147581eb2e. The code doesn't work as expected. Reverting 2024-09-16use web screen embed for fixing potoken functionality (#4923)Émilien (perso) * use web screen embed for fixing potoken functionality * use web screen embed only for getting streamingData + disable tv screen on po_token 2024-08-26Release v2.20240825.2v2.20240825.2Samantaz Fox 2024-08-26CI: Fix docker container tagsSamantaz Fox 2024-08-25Release v2.20240825.1v2.20240825.1Samantaz Fox 2024-08-25Allow manual trigger of release-container build (#4877)syeopite 2024-08-25Release v2.20240825Samantaz Fox 2024-08-24Fix lint errors introduced in #4146 and #4295 (#4876)syeopite * Ameba: Fix Naming/VariableNames Introduced in #4295 * Ameba: Fix Naming/PredicateName Introduced in #4146 2024-08-22Storyboard: Revert cue timing "fix"Samantaz Fox 2024-08-21CSS: Remove extra space in default.cssSamantaz Fox 2024-08-21Ameba: Fix Lint/ShadowingOuterLocalVarsyeopite 2024-08-21Ameba: Fix Lint/RedundantStringCoercionsyeopite 2024-08-21Ameba: Fix Naming/PredicateNamesyeopite 2024-08-21Ameba: Fix Style/WhileTruesyeopite 2024-08-19Proxify formatStreams URLs tooColin Leroy-Mira 2024-08-17Search: Change smart search inhibitor to a backslashSamantaz Fox 2024-08-17Misc: Clean some code in UrlSanitizerSamantaz Fox 2024-08-17Search: Add URL search inhibition logicSamantaz Fox 2024-08-17Search: Add support for youtu.be and youtube.com URLsSamantaz Fox