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

Change subject: Apply webfonts to the IME selector too
......................................................................


Apply webfonts to the IME selector too

It get added to DOM after DOM is ready, and does not inherit styles
(by design)

Change-Id: I45a982b5c1c2a39718f38e77a33b79f89e460474
---
M resources/js/ext.uls.ime.js
M resources/js/ext.uls.webfonts.js
2 files changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/resources/js/ext.uls.ime.js b/resources/js/ext.uls.ime.js
index e5e6a0f..e22c59a 100644
--- a/resources/js/ext.uls.ime.js
+++ b/resources/js/ext.uls.ime.js
@@ -150,6 +150,8 @@
                        e.stopPropagation();
                } );
 
+               // apply fonts to this
+               imeselector.$menu.webfonts();
                return $( '<div>' )
                        .addClass( 'uls-ime-menu-settings-item' )
                        .append( $disableInputToolsLink, $moreSettingsLink );
diff --git a/resources/js/ext.uls.webfonts.js b/resources/js/ext.uls.webfonts.js
index 804f0fa..0c524a7 100644
--- a/resources/js/ext.uls.webfonts.js
+++ b/resources/js/ext.uls.webfonts.js
@@ -52,7 +52,7 @@
 
        mw.webfonts.setup = function () {
                // Initialize webfonts
-               $( 'body' ).webfonts( {
+               $.fn.webfonts.defaults = $.extend( $.fn.webfonts.defaults, {
                        fontSelector: function ( repository, language ) {
                                var font;
 
@@ -78,6 +78,7 @@
                                return $.fn.webfonts.defaults.exclude;
                        }() )
                } );
+               $( 'body' ).webfonts();
        };
 
        $( document ).ready( function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45a982b5c1c2a39718f38e77a33b79f89e460474
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to