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

smartphoto

Package Overview
Dependencies
Maintainers
2
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartphoto - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

6

lib/core/index.js

@@ -358,2 +358,5 @@ 'use strict';

return new Promise(function (resolve) {
if (util.isOldIE()) {
resolve();
}
var appearEffect = _this6.data.appearEffect;

@@ -457,2 +460,5 @@ var classNames = _this6.data.classNames;

return new Promise(function (resolve) {
if (util.isOldIE()) {
resolve();
}
var classNames = _this8.data.classNames;

@@ -459,0 +465,0 @@ var photo = _this8._getElementByClass(classNames.smartPhoto);

65

lib/lib/util.js
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
module.exports.isSmartPhone = function () {
var isSmartPhone = exports.isSmartPhone = function isSmartPhone() {
var agent = navigator.userAgent;

@@ -33,5 +37,5 @@ if (agent.indexOf('iPhone') > 0 || agent.indexOf('iPad') > 0 || agent.indexOf('ipod') > 0 || agent.indexOf('Android') > 0) {

module.exports.extend = deepExtend;
var extend = exports.extend = deepExtend;
module.exports.triggerEvent = function (el, eventName, options) {
var triggerEvent = exports.triggerEvent = function triggerEvent(el, eventName, options) {
var event = void 0;

@@ -47,3 +51,3 @@ if (window.CustomEvent) {

module.exports.parseQuery = function (query) {
var parseQuery = exports.parseQuery = function parseQuery(query) {
var s = query.split('&'),

@@ -67,3 +71,3 @@ data = {},

module.exports.getViewPos = function (element) {
var getViewPos = exports.getViewPos = function getViewPos(element) {
return {

@@ -75,3 +79,3 @@ left: element.getBoundingClientRect().left,

module.exports.removeElement = function (element) {
var removeElement = exports.removeElement = function removeElement(element) {
if (element && element.parentNode) {

@@ -82,3 +86,3 @@ element.parentNode.removeChild(element);

module.exports.append = function (element, string) {
var append = exports.append = function append(element, string) {
var div = document.createElement('div');

@@ -91,3 +95,3 @@ div.innerHTML = string;

module.exports.addClass = function (element, className) {
var addClass = exports.addClass = function addClass(element, className) {
if (element.classList) {

@@ -100,3 +104,3 @@ element.classList.add(className);

module.exports.removeClass = function (element, className) {
var removeClass = exports.removeClass = function removeClass(element, className) {
if (element.classList) {

@@ -107,2 +111,45 @@ element.classList.remove(className);

}
};
var getBrowser = exports.getBrowser = function getBrowser() {
var ua = window.navigator.userAgent.toLowerCase();
var ver = window.navigator.appVersion.toLowerCase();
var name = 'unknown';
if (ua.indexOf('msie') != -1) {
if (ver.indexOf('msie 6.') != -1) {
name = 'ie6';
} else if (ver.indexOf('msie 7.') != -1) {
name = 'ie7';
} else if (ver.indexOf('msie 8.') != -1) {
name = 'ie8';
} else if (ver.indexOf('msie 9.') != -1) {
name = 'ie9';
} else if (ver.indexOf('msie 10.') != -1) {
name = 'ie10';
} else {
name = 'ie';
}
} else if (ua.indexOf('trident/7') != -1) {
name = 'ie11';
} else if (ua.indexOf('chrome') != -1) {
name = 'chrome';
} else if (ua.indexOf('safari') != -1) {
name = 'safari';
} else if (ua.indexOf('opera') != -1) {
name = 'opera';
} else if (ua.indexOf('firefox') != -1) {
name = 'firefox';
}
return name;
};
var isOldIE = exports.isOldIE = function isOldIE() {
var browser = getBrowser();
if (browser.indexOf('ie') !== -1) {
if (parseInt(browser.replace(/[^0-9]/g, '')) <= 10) {
return true;
}
}
return false;
};

2

package.json
{
"name": "smartphoto",
"version": "1.2.2",
"version": "1.2.3",
"description": "smartphoto",

@@ -5,0 +5,0 @@ "homepage": "http://developer.a-blogcms.jp",

@@ -313,2 +313,5 @@ import ATemplate from 'a-template';

return new Promise((resolve) => {
if (util.isOldIE()) {
resolve();
}
const appearEffect = this.data.appearEffect;

@@ -403,2 +406,5 @@ const classNames = this.data.classNames;

return new Promise((resolve) => {
if (util.isOldIE()) {
resolve();
}
const classNames = this.data.classNames;

@@ -405,0 +411,0 @@ const photo = this._getElementByClass(classNames.smartPhoto);

@@ -1,2 +0,2 @@

module.exports.isSmartPhone = () => {
export const isSmartPhone = () => {
const agent = navigator.userAgent

@@ -33,5 +33,5 @@ if (agent.indexOf('iPhone') > 0 || agent.indexOf('iPad') > 0

module.exports.extend = deepExtend;
export const extend = deepExtend;
module.exports.triggerEvent = (el, eventName, options) => {
export const triggerEvent = (el, eventName, options) => {
let event;

@@ -47,3 +47,3 @@ if (window.CustomEvent) {

module.exports.parseQuery = (query) => {
export const parseQuery = (query) => {
var s = query.split('&'),

@@ -65,3 +65,3 @@ data = {},

module.exports.getViewPos = (element) => {
export const getViewPos = (element) => {
return {

@@ -73,3 +73,3 @@ left: element.getBoundingClientRect().left,

module.exports.removeElement = (element) => {
export const removeElement = (element) => {
if(element && element.parentNode) {

@@ -80,3 +80,3 @@ element.parentNode.removeChild(element);

module.exports.append = (element, string) => {
export const append = (element, string) => {
const div = document.createElement('div');

@@ -89,3 +89,3 @@ div.innerHTML = string;

module.exports.addClass = (element,className) => {
export const addClass = (element,className) => {
if (element.classList) {

@@ -98,3 +98,3 @@ element.classList.add(className);

module.exports.removeClass = (element,className) => {
export const removeClass = (element,className) => {
if (element.classList) {

@@ -106,1 +106,44 @@ element.classList.remove(className);

}
export const getBrowser = () => {
const ua = window.navigator.userAgent.toLowerCase();
const ver = window.navigator.appVersion.toLowerCase();
let name = 'unknown';
if (ua.indexOf('msie') != -1) {
if (ver.indexOf('msie 6.') != -1) {
name = 'ie6';
} else if (ver.indexOf('msie 7.') != -1) {
name = 'ie7';
} else if (ver.indexOf('msie 8.') != -1) {
name = 'ie8';
} else if (ver.indexOf('msie 9.') != -1) {
name = 'ie9';
} else if (ver.indexOf('msie 10.') != -1) {
name = 'ie10';
} else {
name = 'ie';
}
} else if (ua.indexOf('trident/7') != -1) {
name = 'ie11';
} else if (ua.indexOf('chrome') != -1) {
name = 'chrome';
} else if (ua.indexOf('safari') != -1) {
name = 'safari';
} else if (ua.indexOf('opera') != -1) {
name = 'opera';
} else if (ua.indexOf('firefox') != -1) {
name = 'firefox';
}
return name;
}
export const isOldIE = () => {
const browser = getBrowser();
if (browser.indexOf('ie') !== -1) {
if (parseInt(browser.replace(/[^0-9]/g, '')) <= 10 ) {
return true;
}
}
return false;
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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