From 46b320c1dd33c0800df6400733347ebd8fd7c23e Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 21 Nov 2023 09:16:38 +0000 Subject: [PATCH] Update content of files --- .../instantview.telegram.org/js/jquery-ex.js | 25 ++++-- .../instantview.telegram.org/templates.html | 2 +- data/web/promote.telegram.org.html | 8 +- data/web/promote.telegram.org/auth.html | 8 +- data/web/promote.telegram.org/basics.html | 8 +- data/web/promote.telegram.org/css/promote.css | 26 +++++- .../promote.telegram.org/getting-started.html | 8 +- data/web/promote.telegram.org/guidelines.html | 8 +- data/web/promote.telegram.org/js/jquery-ex.js | 25 ++++-- data/web/promote.telegram.org/js/promote.js | 82 +++++++++++++++++-- data/web/promote.telegram.org/tos.html | 8 +- 11 files changed, 167 insertions(+), 41 deletions(-) diff --git a/data/web/instantview.telegram.org/js/jquery-ex.js b/data/web/instantview.telegram.org/js/jquery-ex.js index b818299df1..e55a26a628 100644 --- a/data/web/instantview.telegram.org/js/jquery-ex.js +++ b/data/web/instantview.telegram.org/js/jquery-ex.js @@ -101,22 +101,34 @@ return this.toggleClass('ohide', state); }; $.fn.slideShow = function(callback) { - return this.prepareSlideY(callback).removeClass('shide'); + if (this.hasClass('shide')) { + return this.prepareSlideY(callback).removeClass('shide'); + } + return this; }; $.fn.slideHide = function(callback) { if (callback == 'remove') { callback = function(){ $(this).remove(); }; } - return this.prepareSlideY(callback).addClass('shide'); + if (!this.hasClass('shide')) { + return this.prepareSlideY(callback).addClass('shide'); + } + return this; }; $.fn.slideXShow = function(callback) { - return this.prepareSlideX(callback).removeClass('sxhide'); + if (this.hasClass('sxhide')) { + return this.prepareSlideX(callback).removeClass('sxhide'); + } + return this; }; $.fn.slideXHide = function(callback) { if (callback == 'remove') { callback = function(){ $(this).remove(); }; } - return this.prepareSlideX(callback).addClass('sxhide'); + if (!this.hasClass('sxhide')) { + return this.prepareSlideX(callback).addClass('sxhide'); + } + return this; }; $.fn.isSlideHidden = function() { return this.hasClass('shide'); @@ -125,7 +137,10 @@ if (state === true || state === false) { state = !state; } - return this.prepareSlideY(callback).toggleClass('shide', state); + if (!this.hasClass('shide') !== !state) { + return this.prepareSlideY(callback).toggleClass('shide', state); + } + return this; }; $.fn.highlight = function(delay) { var $this = this; diff --git a/data/web/instantview.telegram.org/templates.html b/data/web/instantview.telegram.org/templates.html index 5dcd64e71e..3756e5463d 100644 --- a/data/web/instantview.telegram.org/templates.html +++ b/data/web/instantview.telegram.org/templates.html @@ -1107,7 +1107,7 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +