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