Remove webfonts enabling checkbox and associated preference
Bug: 48535 Change-Id: If735a733717596fae03042c5e277bd538bd8501f
This commit is contained in:
@@ -24,20 +24,7 @@
|
||||
ulsPreferences = mw.uls.preferences();
|
||||
mw.webfonts.preferences = {
|
||||
registry: {
|
||||
'fonts': {},
|
||||
'webfonts-enabled': true
|
||||
},
|
||||
|
||||
isEnabled: function () {
|
||||
return this.registry['webfonts-enabled'];
|
||||
},
|
||||
|
||||
enable: function () {
|
||||
this.registry['webfonts-enabled'] = true;
|
||||
},
|
||||
|
||||
disable: function () {
|
||||
this.registry['webfonts-enabled'] = false;
|
||||
fonts: {}
|
||||
},
|
||||
|
||||
setFont: function ( language, font ) {
|
||||
@@ -94,8 +81,6 @@
|
||||
};
|
||||
|
||||
$( document ).ready( function () {
|
||||
var webfontsEnabled;
|
||||
|
||||
// MediaWiki specific overrides for jquery.webfonts
|
||||
$.extend( $.fn.webfonts.defaults, {
|
||||
repository: mediawikiFontRepository,
|
||||
@@ -103,18 +88,7 @@
|
||||
} );
|
||||
|
||||
mw.webfonts.preferences.load();
|
||||
|
||||
webfontsEnabled = mw.webfonts.preferences.isEnabled();
|
||||
|
||||
// If the user didn't set anything, the preference will be undefined.
|
||||
// The default for now is to enable webfonts if the user didn't select anything.
|
||||
if ( webfontsEnabled === undefined ) {
|
||||
webfontsEnabled = true;
|
||||
}
|
||||
|
||||
if ( webfontsEnabled ) {
|
||||
mw.webfonts.setup();
|
||||
}
|
||||
mw.webfonts.setup();
|
||||
} );
|
||||
|
||||
}( jQuery, mediaWiki, document ) );
|
||||
|
||||
Reference in New Issue
Block a user