pruned history for public release
This commit is contained in:
17
main.js
Executable file
17
main.js
Executable file
@ -0,0 +1,17 @@
|
||||
var previousIndex = undefined;
|
||||
|
||||
function onClickScreenshot(index) {
|
||||
if (previousIndex !== undefined) {
|
||||
document.getElementById(`ss${previousIndex}`).className = 'screenshot';
|
||||
}
|
||||
|
||||
if (previousIndex !== index) {
|
||||
var element = document.getElementById(`ss${index}`);
|
||||
element.className = 'screenshot screenshot--large';
|
||||
element.scrollIntoView();
|
||||
|
||||
previousIndex = index;
|
||||
} else {
|
||||
previousIndex = undefined;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user