7 lines
No EOL
343 B
TypeScript
7 lines
No EOL
343 B
TypeScript
let images:HTMLCollectionOf<HTMLImageElement> = <HTMLCollectionOf<HTMLImageElement>> document.getElementsByTagName("img");
|
|
for(let i = 0; i < images.length; i++){
|
|
let element:HTMLImageElement = images[i];
|
|
if(!(element.getAttribute("data-noPreview") === "true")) {
|
|
element.onclick = () => createDialogImage(element.src);
|
|
}
|
|
} |