Commit bb8122c4 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

Issue #3089472 by zrpnr, nod_, bnjmnm: Remove matchmedia in Drupal 9

parent 400575a1
......@@ -15,7 +15,6 @@
"drupalTranslations": true,
"jQuery": true,
"_": true,
"matchMedia": true,
"Backbone": true,
"Modernizr": true,
"Popper": true,
......
(function(){if(window.matchMedia&&window.matchMedia("all").addListener){return false}var e=window.matchMedia,i=e("only all").matches,n=false,t=0,a=[],r=function(i){clearTimeout(t);t=setTimeout(function(){for(var i=0,n=a.length;i<n;i++){var t=a[i].mql,r=a[i].listeners||[],o=e(t.media).matches;if(o!==t.matches){t.matches=o;for(var s=0,l=r.length;s<l;s++){r[s].call(window,t)}}}},30)};window.matchMedia=function(t){var o=e(t),s=[],l=0;o.addListener=function(e){if(!i){return}if(!n){n=true;window.addEventListener("resize",r,true)}if(l===0){l=a.push({mql:o,listeners:s})}s.push(e)};o.removeListener=function(e){for(var i=0,n=s.length;i<n;i++){if(s[i]===e){s.splice(i,1)}}};return o}})();
window.matchMedia||(window.matchMedia=function(){"use strict";var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),i=document.getElementsByTagName("script")[0],n=null;t.type="text/css";t.id="matchmediajs-test";i.parentNode.insertBefore(t,i);n="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle;e={matchMedium:function(e){var i="@media "+e+"{ #matchmediajs-test { width: 1px; } }";if(t.styleSheet){t.styleSheet.cssText=i}else{t.textContent=i}return n.width==="1px"}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}());
......@@ -320,7 +320,6 @@ drupal.vertical-tabs:
- core/drupal
- core/drupalSettings
- core/drupal.form
- core/matchmedia
jquery:
remote: https://github.com/jquery/jquery
......@@ -860,26 +859,6 @@ jquery.ui.widget:
dependencies:
- core/jquery.ui
matchmedia:
remote: https://github.com/paulirish/matchMedia.js
version: &matchmedia_version 0.2.0
license: &matchmedia_license
name: MIT
url: https://github.com/paulirish/matchMedia.js/blob/0.2.0/LICENSE.txt
gpl-compatible: true
js:
assets/vendor/matchMedia/matchMedia.min.js: { minified: true }
deprecated: &matchmedia_deprecated The "%library_id%" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3086653
matchmedia.addListener:
version: *matchmedia_version
license: *matchmedia_license
js:
assets/vendor/matchMedia/matchMedia.addListener.min.js: { minified: true }
dependencies:
- core/matchmedia
deprecated: *matchmedia_deprecated
modernizr:
# Block the page from being loaded until Modernizr is initialized.
header: true
......@@ -913,8 +892,6 @@ picturefill:
gpl-compatible: true
js:
assets/vendor/picturefill/picturefill.min.js: { weight: -10, minified: true }
dependencies:
- core/matchmedia
popperjs:
version: "1.15.0"
......
......@@ -14,8 +14,6 @@ drupal.ckeditor:
- core/drupal.displace
- core/ckeditor
- editor/drupal.editor
# Ensure to run after core/matchmedia.
- core/matchmedia
drupal.ckeditor.plugins.drupalimagecaption:
version: VERSION
......
......@@ -25,8 +25,6 @@ toolbar:
- core/drupal.ajax
- core/drupal.announce
- core/backbone
- core/matchmedia
- core/matchmedia.addListener
- core/jquery.once
- core/drupal.displace
- toolbar/toolbar.menu
......
......@@ -190,8 +190,6 @@ public static function getSkippedDeprecations() {
'The "core/jquery.ui.controlgroup" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3067969',
// @todo Remove in https://www.drupal.org/project/drupal/issues/3082655
'Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. See https://www.drupal.org/node/2352949, which includes recommendations on which theme to use.',
'The "core/matchmedia" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3086653',
'The "core/matchmedia.addListener" asset library is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. See https://www.drupal.org/node/3086653',
// The following deprecation is listed for Twig 2 compatibility when unit
// testing using \Symfony\Component\ErrorHandler\DebugClassLoader.
'The "Twig\Environment::getTemplateClass()" method is considered internal. It may change without further notice. You should not extend it from "Drupal\Core\Template\TwigEnvironment".',
......
......@@ -98,7 +98,6 @@ drupal.nav-tabs:
js:
js/nav-tabs.js: {}
dependencies:
- core/matchmedia
- core/jquery
- core/drupal
- core/jquery.once
......@@ -110,8 +109,6 @@ drupal.responsive-detail:
js:
js/responsive-details.js: {}
dependencies:
- core/matchmedia
- core/matchmedia.addListener
- core/jquery
- core/jquery.once
- core/collapse
......
......@@ -76,7 +76,6 @@ drupal.nav-tabs:
js:
js/nav-tabs.js: {}
dependencies:
- core/matchmedia
- core/jquery
- core/drupal
- core/jquery.once
......@@ -88,8 +87,6 @@ drupal.responsive-detail:
js:
js/responsive-details.js: {}
dependencies:
- core/matchmedia
- core/matchmedia.addListener
- core/jquery
- core/jquery.once
- core/collapse
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment