Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeleft swiperight', function (event, data) {
if (data.type === 'swiperight') {
callback();
}
});
});
};
}
if (typeof ($.fn.swipeUp) !== 'function') {
$.fn.swipeUp = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeup', callback);
});
};
}
if (typeof ($.fn.swipeDown) !== 'function') {
$.fn.swipeDown = function (callback) {
if (this.length === 0) {
return;
}
if (typeof ($.fn.swipeDown) !== 'function') {
$.fn.swipeDown = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipedown', callback);
});
};
}
if (typeof ($.fn.tap) !== 'function') {
$.fn.tap = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('tap', callback);
});
};
}
$('.btn-back').on('click', function () {
window.history.back();
});
return customElem;
define(function (require) {
var $ = require('zepto');
$('.middle,.bottom').hide();
$('.comment .text').click(function () {
$('.middle,.bottom').show();
});
$('.cancel').click(function () {
$('.middle,.bottom').hide();
});
$.fn.nextAll = function (selector) {
var nextEls = [];
var el = this[0];
if (!el) {
return $([]);
};
while (el.nextElementSibling) {
var next = el.nextElementSibling;
if (selector) {
if ($(next).is(selector)) {
nextEls.push(next);
}
} else {
nextEls.push(next);
}
el = next;
}
if (typeof ($.fn.swipeDown) !== 'function') {
$.fn.swipeDown = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipedown', callback);
});
};
}
if (typeof ($.fn.tap) !== 'function') {
$.fn.tap = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('tap', callback);
});
};
}
$('.btn-back').on('click', function () {
window.history.back();
});
return customElem;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeleft swiperight', function (event, data) {
if (data.type === 'swiperight') {
callback();
}
});
});
};
}
if (typeof ($.fn.swipeUp) !== 'function') {
$.fn.swipeUp = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeup', callback);
});
};
}
if (typeof ($.fn.swipeDown) !== 'function') {
$.fn.swipeDown = function (callback) {
if (this.length === 0) {
return;
}
scriptstr += '$("#' + tag + '").append($("#' + tag + '_temp").children().not("script"));';
scriptstr += '<\/script>';
}
$(obj).addClass('loaded');
});
}
if (scriptstr) {
document.write(scriptstr);
}
};
if (typeof ($.fn.swipeLeft) !== 'function') {
$.fn.swipeLeft = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeleft', callback);
});
};
}
if (typeof ($.fn.swipeRight) !== 'function') {
$.fn.swipeRight = function (callback) {
if (this.length === 0) {
return;
}
if (typeof ($.fn.swipeLeft) !== 'function') {
$.fn.swipeLeft = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeleft', callback);
});
};
}
if (typeof ($.fn.swipeRight) !== 'function') {
$.fn.swipeRight = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeleft swiperight', function (event, data) {
if (data.type === 'swiperight') {
callback();
}
});
});
};
}
if (typeof ($.fn.swipeLeft) !== 'function') {
$.fn.swipeLeft = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeleft', callback);
});
};
}
if (typeof ($.fn.swipeRight) !== 'function') {
$.fn.swipeRight = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeleft swiperight', function (event, data) {
if (data.type === 'swiperight') {
callback();
}
});
});
};
}
};
if (typeof ($.fn.swipeLeft) !== 'function') {
$.fn.swipeLeft = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeleft', callback);
});
};
}
if (typeof ($.fn.swipeRight) !== 'function') {
$.fn.swipeRight = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeleft swiperight', function (event, data) {
if (data.type === 'swiperight') {
callback();
}
});
});
};
}
}
if (typeof ($.fn.swipeUp) !== 'function') {
$.fn.swipeUp = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipeup', callback);
});
};
}
if (typeof ($.fn.swipeDown) !== 'function') {
$.fn.swipeDown = function (callback) {
if (this.length === 0) {
return;
}
$.each(this, function (i, elm) {
var gesture = new Gesture(elm);
gesture.on('swipedown', callback);
});
};
}
if (typeof ($.fn.tap) !== 'function') {
$.fn.tap = function (callback) {
if (this.length === 0) {
return;