Replaced mobileBrowser() with a better test
This commit is contained in:
parent
206f3ba28d
commit
b27ccbe349
@ -6,7 +6,7 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
/* Event Name */
|
/* Event Name */
|
||||||
var eventName = (mobileBrowser()) ? 'touchend' : 'click';
|
var eventName = ('ontouchend' in document.documentElement) ? 'touchend' : 'click';
|
||||||
|
|
||||||
/* Multiselect */
|
/* Multiselect */
|
||||||
$('#content') .on('mousedown', function(e) { if (e.which===1) multiselect.show(e) });
|
$('#content') .on('mousedown', function(e) { if (e.which===1) multiselect.show(e) });
|
||||||
@ -125,7 +125,7 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if (mobileBrowser()) {
|
if ('ontouchend' in document.documentElement) {
|
||||||
|
|
||||||
$(document)
|
$(document)
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ multiselect.position = {
|
|||||||
|
|
||||||
multiselect.show = function(e) {
|
multiselect.show = function(e) {
|
||||||
|
|
||||||
if (mobileBrowser()) return false;
|
|
||||||
if (lychee.publicMode) return false;
|
if (lychee.publicMode) return false;
|
||||||
if (visible.search()) return false;
|
if (visible.search()) return false;
|
||||||
if (visible.infobox()) return false;
|
if (visible.infobox()) return false;
|
||||||
@ -40,7 +39,6 @@ multiselect.selectAll = function() {
|
|||||||
newWidth,
|
newWidth,
|
||||||
newHeight;
|
newHeight;
|
||||||
|
|
||||||
if (mobileBrowser()) return false;
|
|
||||||
if (lychee.publicMode) return false;
|
if (lychee.publicMode) return false;
|
||||||
if (visible.search()) return false;
|
if (visible.search()) return false;
|
||||||
if (visible.infobox()) return false;
|
if (visible.infobox()) return false;
|
||||||
|
@ -61,7 +61,7 @@ photo.preloadNext = function(photoID) {
|
|||||||
|
|
||||||
// Never preload on mobile devices with bare RAM and
|
// Never preload on mobile devices with bare RAM and
|
||||||
// mostly mobile internet
|
// mostly mobile internet
|
||||||
if (mobileBrowser()) return false;
|
// {{ code }}
|
||||||
|
|
||||||
if (album.json &&
|
if (album.json &&
|
||||||
album.json.content &&
|
album.json.content &&
|
||||||
|
@ -12,8 +12,8 @@ var header = $('header'),
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
/* Event Name */
|
/* Event Name */
|
||||||
if (mobileBrowser()) event_name = 'touchend';
|
if ('ontouchend' in document.documentElement) event_name = 'touchend';
|
||||||
else event_name = 'click';
|
else event_name = 'click';
|
||||||
|
|
||||||
/* Window */
|
/* Window */
|
||||||
$(window).keydown(key);
|
$(window).keydown(key);
|
||||||
|
Loading…
Reference in New Issue
Block a user