move init function up

This commit is contained in:
Brian Buller 2021-01-21 10:55:54 -06:00
parent 5dffa7bb5c
commit bf629f95c5
1 changed files with 18 additions and 17 deletions

View File

@ -10,6 +10,24 @@
(function() {
'use strict';
var init = function() {
console.log("Starting Slideshow");
lb.style.textAlign = 'center';
lb.style.height = '100%';
lb.style.width = '100%';
lb.style.position = 'fixed';
lb.style.top = '0px';
lb.style.left = '0px';
lb.style.zIndex = '99999';
lb.style.backgroundColor = 'rgba(0, 0, 0, 0.85)';
document.body.prepend(lb);
lbimg.style.objectFit = 'cover';
lb.append(lbimg);
running = true;
showImage(0);
}
var addSlideshowButton = function() {
if(document.getElementById('slideshow_button') == null) {
var slideshowLi = document.createElement('li');
@ -43,23 +61,6 @@
if(tab.classList.contains('is-active')) { addSlideshowButton(); }
tab.addEventListener('click', addSlideshowButton);
var init = function() {
console.log("Starting Slideshow");
lb.style.textAlign = 'center';
lb.style.height = '100%';
lb.style.width = '100%';
lb.style.position = 'fixed';
lb.style.top = '0px';
lb.style.left = '0px';
lb.style.zIndex = '99999';
lb.style.backgroundColor = 'rgba(0, 0, 0, 0.85)';
document.body.prepend(lb);
lbimg.style.objectFit = 'cover';
lb.append(lbimg);
running = true;
showImage(0);
}
function updateImages() {
var testimages = document.querySelectorAll('img');
var testcount = testimages.length;