Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/83195


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/95/83195/1

diff --git a/includes/Resources.php b/includes/Resources.php
index 7261e89..2e617a5 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -365,7 +365,6 @@
                ),
                'scripts' => array(
                        'javascripts/externals/micro.tap.js',
-                       'javascripts/modules/mf-inline-style-scrubber.js',
                        'javascripts/common/history-alpha.js',
                        'javascripts/modules/mf-tables.js',
                        'javascripts/modules/mf-translator.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: newchange
Gerrit-Change-Id: I5a01f307c81b1c20bfe73dacded27b55130f0f3c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

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

Reply via email to