diff --git a/extension.json b/extension.json index 610c3c1d..f9b849c7 100644 --- a/extension.json +++ b/extension.json @@ -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", diff --git a/includes/Hooks.php b/includes/Hooks.php index 3e1bc4f0..1617155f 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -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 diff --git a/resources/js/ext.uls.webfonts.mobile.js b/resources/js/ext.uls.webfonts.mobile.js deleted file mode 100644 index aeb3e838..00000000 --- a/resources/js/ext.uls.webfonts.mobile.js +++ /dev/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(); - } ); - -}() );