move init function up
This commit is contained in:
parent
5dffa7bb5c
commit
bf629f95c5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user