jenkins-bot has submitted this change and it was merged.

Change subject: Alpha: Remove inline style scrubbing
......................................................................


Alpha: Remove inline style scrubbing

RFC to allow stylesheets in templates
is gaining traction:
https://www.mediawiki.org/wiki/Requests_for_comment/Allow_styling_in_templates

Change-Id: I5a01f307c81b1c20bfe73dacded27b55130f0f3c
---
M includes/Resources.php
D javascripts/modules/mf-inline-style-scrubber.js
2 files changed, 0 insertions(+), 23 deletions(-)

Approvals:
  JGonera: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Resources.php b/includes/Resources.php
index 7588ecb..5a6fe91 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -358,7 +358,6 @@
                ),
                'scripts' => array(
                        'javascripts/externals/micro.tap.js',
-                       'javascripts/modules/mf-inline-style-scrubber.js',
                        'javascripts/externals/epoch.js',
                        'javascripts/common/history-alpha.js',
                        'javascripts/modules/mf-tables.js',
diff --git a/javascripts/modules/mf-inline-style-scrubber.js 
b/javascripts/modules/mf-inline-style-scrubber.js
deleted file mode 100644
index f70b4c5..0000000
--- a/javascripts/modules/mf-inline-style-scrubber.js
+++ /dev/null
@@ -1,22 +0,0 @@
-( function( M, $ ) {
-
-       // removes all inline styles from html output
-       // see https://www.mediawiki.org/wiki/Deprecating_inline_styles
-       $( function() {
-               var isSpecialPage = mw.config.get( 'wgNamespaceNumber' ) === 
mw.config.get( 'wgNamespaceIds' ).special;
-               function scrub( $container ) {
-                       if ( !isSpecialPage ) {
-                               $container.find( '[style]' ).removeAttr( 
'style' );
-                       }
-               }
-
-               M.
-                       on( 'section-rendered', scrub ).
-                       on( 'page-loaded', function() {
-                               scrub( $( '#content_0' ) );
-                       } );
-               scrub( $( '#content' ) );
-
-       } );
-
-} ( mw.mobileFrontend, jQuery ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/83195
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5a01f307c81b1c20bfe73dacded27b55130f0f3c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to