fix single.js
This commit is contained in:
parent
7de35a098f
commit
f9bf7ccb46
1 changed files with 7 additions and 3 deletions
|
@ -1,9 +1,9 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
let mainfig = document.getElementById('mainfig');
|
let mainfig;
|
||||||
let mainimg = document.getElementById('mainimg');
|
let mainimg;
|
||||||
let mainlink = document.getElementById('mainlink');
|
let mainlink;
|
||||||
|
|
||||||
function openCW(caption, focusLink) {
|
function openCW(caption, focusLink) {
|
||||||
mainfig.removeChild(caption);
|
mainfig.removeChild(caption);
|
||||||
|
@ -48,6 +48,10 @@ function activateButton(button) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup() {
|
function setup() {
|
||||||
|
mainfig = document.getElementById('mainfig');
|
||||||
|
mainimg = document.getElementById('mainimg');
|
||||||
|
mainlink = document.getElementById('mainlink');
|
||||||
|
|
||||||
for (let button of document.querySelectorAll('#alts input')) {
|
for (let button of document.querySelectorAll('#alts input')) {
|
||||||
button.onchange = e => { if (button.checked) activateButton(button); };
|
button.onchange = e => { if (button.checked) activateButton(button); };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue