Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ab-mediaquery

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ab-mediaquery - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

41

AB-mediaQuery.js
!(function(name, definition) {
if (typeof module != 'undefined') {
module.exports = definition();
} else if (typeof define == 'function' && typeof define.amd == 'object') {
define(definition);
} else {
this[name] = definition();
}
if (typeof module !== 'undefined') module.exports = definition();
else if (typeof define === 'function' && typeof define.amd === 'object') define(definition);
else this[name] = definition();
}('abMediaQuery', function() {
'use strict';
// For IE 9 and 10 (https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent)
if (typeof window.CustomEvent !== 'function') {
function CustomEvent( event, params ){
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;
}
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
}
'use strict'; // voluntarily after window.CustomEvent polyfill
function extend(){

@@ -35,15 +43,3 @@ for (var i=1; i<arguments.length; i++) {

// For IE 9 and 10
if (typeof window.CustomEvent !== "function") {
function CustomEvent(event, params ){
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;
}
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
}
var MediaQuery = function(opt) {

@@ -127,3 +123,2 @@ if (!(this instanceof MediaQuery)) return new MediaQuery(opt);

//if (typeof matched === 'object') return matched.name;
return newMediaQueries;

@@ -134,3 +129,3 @@ },

var metaMD = document.getElementById('AB-mediaQuery'),
fontMD = window.getComputedStyle(metaMD, null).getPropertyValue("font-family"),
fontMD = window.getComputedStyle(metaMD, null).getPropertyValue('font-family'),
extractedStyles = decodeURI(fontMD.trim().slice(1, -1));

@@ -148,3 +143,3 @@

var that = this,
event = new CustomEvent('changed.ab-mediaquery'),
event = new Event('changed.ab-mediaquery'),
newSize, resizeTimer;

@@ -151,0 +146,0 @@

{
"name": "ab-mediaquery",
"version": "1.3.1",
"version": "1.3.2",
"description": "AB-mediaQuery is the JavaScript side of Media Queries. It proposes you some very useful methods for your scripts",

@@ -5,0 +5,0 @@ "main": "AB-mediaQuery.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc