/* Copyright 2016 Ville Rantanen This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . See other included library licenses further down the file. */ /* ------------ Qalbum functions start here ------------- */ var maxThumb=10; var uagent = navigator.userAgent.toLowerCase(); var marklist=[] var currentimage=-1; var currentlist=-1; var originals=false; var fullscreen=false; var zoom=false; var preloader; var slideshowtimer; var slideshowinterval; var configupdatetimer; var sorttype=""; function setup() { // Setup run at the load of page. if (notsupported()) { return; } document.onkeydown=keypressed; slideshowinterval=request('auto'); if (slideshowinterval!=0) { slidenextrestart(); } fullscreen=request('full')==1; originals=request('orig')==1; request('sort'); var req=request('p'); if (req==-1) { req=request('q'); } if (req!=-1) { showimage(req); } else { thumblist(0,-1); subfolderbiglist(); } return; } function showimage(i) { // Main function to show a single image if (i>imagelist.length-1 || i<0) { return; } thumblist(i,i); var dirStr=$('#imagecontainer').data('ID')'; if (slideshowinterval!=0) { linkToBig = ''; } if (isHTML(imagelist[i].name)) { $('#imagecontainer').html('
'+linkToBig+ '