Remove ULSMobileWebfontsEnabled
To my knowledge never used since it was added in in 2013 with
commit fd885d9881.
Bug: T332837
Change-Id: Ia9ecb3e4dd47b8ce4dfaaa489a1ec5a71c378492
This commit is contained in:
committed by
jenkins-bot
parent
0c3080135f
commit
7d20f15b17
@@ -21,7 +21,6 @@
|
||||
},
|
||||
"Hooks": {
|
||||
"BeforePageDisplay": "main",
|
||||
"EnterMobileMode": "main",
|
||||
"GetBetaFeaturePreferences": "main",
|
||||
"GetPreferences": "main",
|
||||
"MakeGlobalVariablesScript": "main",
|
||||
@@ -99,10 +98,6 @@
|
||||
"description": "Enable the webfonts feature for all users by default. Can be controlled by the user. @since 2014.02",
|
||||
"value": true
|
||||
},
|
||||
"ULSMobileWebfontsEnabled": {
|
||||
"description": "Set whether webfont support is loaded within the mobile interface (via the MobileFrontend extension).",
|
||||
"value": false
|
||||
},
|
||||
"ULSPosition": {
|
||||
"description": "The location and the form of the language selection trigger. The possible values are: (a) \"personal\"- as a link near the username or the log in link in the personal toolbar (default). (b) \"interlanguage\": as an icon near the header of the list of interlanguage links in the sidebar.",
|
||||
"value": "personal"
|
||||
@@ -377,15 +372,6 @@
|
||||
"jquery.client"
|
||||
]
|
||||
},
|
||||
"ext.uls.webfonts.mobile": {
|
||||
"scripts": "js/ext.uls.webfonts.mobile.js",
|
||||
"targets": [
|
||||
"mobile"
|
||||
],
|
||||
"dependencies": [
|
||||
"ext.uls.webfonts.repository"
|
||||
]
|
||||
},
|
||||
"ext.uls.webfonts.repository": {
|
||||
"scripts": [
|
||||
"../lib/jquery.webfonts/src/jquery.webfonts.js",
|
||||
|
||||
@@ -35,7 +35,6 @@ use MediaWiki\Preferences\Hook\GetPreferencesHook;
|
||||
use MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook;
|
||||
use MediaWiki\Skins\Hook\SkinAfterPortletHook;
|
||||
use MediaWiki\User\UserOptionsLookup;
|
||||
use MobileContext;
|
||||
use OutputPage;
|
||||
use RequestContext;
|
||||
use Skin;
|
||||
@@ -527,21 +526,6 @@ class Hooks implements
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add basic webfonts support to the mobile interface (via MobileFrontend extension)
|
||||
* Hook: EnterMobileMode
|
||||
* @param MobileContext $context
|
||||
*/
|
||||
public function onEnterMobileMode( MobileContext $context ) {
|
||||
// Currently only supported in mobile Beta mode
|
||||
if ( $this->config->get( 'ULSEnable' ) &&
|
||||
$this->config->get( 'ULSMobileWebfontsEnabled' ) &&
|
||||
$context->isBetaGroupMember()
|
||||
) {
|
||||
$context->getOutput()->addModules( 'ext.uls.webfonts.mobile' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OutputPage $out
|
||||
* @return string|null
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*!
|
||||
* MobileFrontend compatible ULS-Webfonts integration
|
||||
*
|
||||
* Copyright (C) 2013 Alolita Sharma, Amir Aharoni, Arun Ganesh, Brandon Harris,
|
||||
* Niklas Laxström, Pau Giner, Ryan Kaldari, Santhosh Thottingal, Siebrand Mazeland
|
||||
* and other contributors. See CREDITS for a list.
|
||||
*
|
||||
* UniversalLanguageSelector is dual licensed GPLv2 or later and MIT. You don't
|
||||
* have to do anything special to choose one license or the other and you don't
|
||||
* have to notify anyone which license you are using. You are free to use
|
||||
* UniversalLanguageSelector in commercial projects as long as the copyright
|
||||
* header is left intact. See files GPL-LICENSE and MIT-LICENSE for details.
|
||||
*
|
||||
* @file
|
||||
* @ingroup Extensions
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
( function () {
|
||||
'use strict';
|
||||
|
||||
var mediawikiFontRepository;
|
||||
|
||||
mw.webfonts = mw.webfonts || {};
|
||||
|
||||
mediawikiFontRepository = $.webfonts.repository;
|
||||
mediawikiFontRepository.base = mw.config.get( 'wgExtensionAssetsPath' ) +
|
||||
'/UniversalLanguageSelector/data/fontrepo/fonts/';
|
||||
|
||||
$( function () {
|
||||
// MediaWiki specific overrides for jquery.webfonts
|
||||
$.extend( $.fn.webfonts.defaults, {
|
||||
repository: mediawikiFontRepository,
|
||||
fontStack: $( document.body ).css( 'font-family' ).split( /, /g ),
|
||||
fontSelector: function ( repository, language ) {
|
||||
var font = repository.defaultFont( language );
|
||||
|
||||
if ( font === 'system' ) {
|
||||
// Avoid setting 'system' as a font in css
|
||||
font = null;
|
||||
}
|
||||
|
||||
return font;
|
||||
}
|
||||
} );
|
||||
|
||||
$( document.body ).webfonts();
|
||||
} );
|
||||
|
||||
}() );
|
||||
Reference in New Issue
Block a user