Remove webfonts enabling checkbox and associated preference

Bug: 48535
Change-Id: If735a733717596fae03042c5e277bd538bd8501f
This commit is contained in:
Amir E. Aharoni
2013-05-22 22:46:25 +03:00
parent 3066c79174
commit 2ef2376bfe
3 changed files with 4 additions and 103 deletions

View File

@@ -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 ) );