diff --git a/RevisionSlider.hooks.php b/RevisionSlider.hooks.php index 6b1c2314..25263bb1 100755 --- a/RevisionSlider.hooks.php +++ b/RevisionSlider.hooks.php @@ -38,6 +38,7 @@ class RevisionSliderHooks { $out = RequestContext::getMain()->getOutput(); $out->addModules( 'ext.RevisionSlider.init' ); + $out->addModuleStyles( 'ext.RevisionSlider.noscript' ); $out->addJsConfigVars( 'extRevisionSliderOldRev', $oldRev->getId() ); $out->addJsConfigVars( 'extRevisionSliderNewRev', $newRev->getId() ); $out->addJsConfigVars( 'extRevisionSliderTimeOffset', intval( $timeOffset ) ); @@ -55,15 +56,6 @@ class RevisionSliderHooks { 'style' => 'text-align: center', ], ( new Message( 'revisionslider-loading-placeholder' ) )->parse() - ) . - Html::rawElement( - 'noscript', - [], - Html::element( - 'p', - [ 'style' => 'text-align: center' ], - ( new Message( 'revisionslider-loading-noscript' ) )->parse() - ) ) ) ); diff --git a/extension.json b/extension.json index e6d19a9d..2e75e9d1 100755 --- a/extension.json +++ b/extension.json @@ -43,6 +43,9 @@ ], "position": "top" }, + "ext.RevisionSlider.noscript": { + "styles": "modules/ext.RevisionSlider.noscript.css" + }, "ext.RevisionSlider.fetchRevisions": { "scripts": [ "modules/ext.RevisionSlider.fetchRevisions.js" diff --git a/i18n/en.json b/i18n/en.json index 577e5b31..bd73b1e4 100755 --- a/i18n/en.json +++ b/i18n/en.json @@ -15,7 +15,6 @@ "revisionslider-loading-placeholder": "The revision slider is loading.", "revisionslider-loading-failed": "The revision slider failed to load.", "revisionslider-loading-out-of-range": "The revision slider failed to load as the requested revisions are not in the top 500 versions of the page.", - "revisionslider-loading-noscript": "As you have JavaScript disabled the revision slider will not be able to load.", "revisionslider-arrow-tooltip-newer": "See newer revisions", "revisionslider-arrow-tooltip-older": "See older revisions" } \ No newline at end of file diff --git a/i18n/qqq.json b/i18n/qqq.json index f4664125..5eca52c7 100755 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -16,7 +16,6 @@ "revisionslider-loading-placeholder": "Message shown while the RevisionSlider is still loading on a diff page. Once loaded the message is removed.", "revisionslider-loading-failed": "Message shown if the RevisionSlider fails to initially load.", "revisionslider-loading-out-of-range": "Message shown if the RevisionSlider fails to initially load due to revisions being requested that are not in the most recent 500 revisions.", - "revisionslider-loading-noscript": "Message shown while the RevisionSlider is trying to load but when JavaScript is disabled and thus it will not be successful.", "revisionslider-arrow-tooltip-newer": "Text shown after hovering the button scrolling to newer revisions.", "revisionslider-arrow-tooltip-older": "Text shown after hovering the button scrolling to older revisions." } diff --git a/modules/ext.RevisionSlider.noscript.css b/modules/ext.RevisionSlider.noscript.css new file mode 100644 index 00000000..54bdb76c --- /dev/null +++ b/modules/ext.RevisionSlider.noscript.css @@ -0,0 +1,3 @@ +.client-nojs #mw-revision-slider-container { + display: none; +}