diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index a01e7fd405..1b2b1954ef 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -924,6 +924,31 @@ function parse_document(container) $(this).addClass('responsive-hide'); } }); + + /** + * Replace responsive text + */ + container.find('[data-responsive-text]').each(function() { + var $this = $(this), + fullText = $this.text(), + responsiveText = $this.attr('data-responsive-text'), + responsive = false; + + function check() { + if ($(window).width() > 700) { + if (!responsive) return; + $this.text(fullText); + responsive = false; + return; + } + if (responsive) return; + $this.text(responsiveText); + responsive = true; + } + + check(); + $(window).resize(check); + }); } /**