screengrab/lib/screengrab/page.html.erb in fastlane-2.63.0.beta.20171025010003 vs screengrab/lib/screengrab/page.html.erb in fastlane-2.63.0.beta.20171026010003
- old
+ new
@@ -121,16 +121,16 @@
}
for (index = 0; index < screenshotLink.length; ++index) {
screenshotLink[index].addEventListener('click', function(e) {
e.preventDefault();
-
+
var img = e.target;
if (e.target.tagName == 'A') {
img = e.target.children[0];
}
-
+
// beautify
var tmpImg = new Image();
tmpImg.src = img.src;
imageDisplay.style.height = 'auto';
imageDisplay.style.width = 'auto';
@@ -143,24 +143,24 @@
}
imageDisplay.src = img.src;
imageDisplay.alt = img.alt;
imageDisplay.dataset.counter = img.dataset.counter;
-
+
imageInfo.innerHTML = '<h3>'+img.alt+'</h3>';
imageInfo.innerHTML += img.src.split("/").pop();
imageInfo.innerHTML += '<br />'+tmpImg.height+'×'+tmpImg.width+'px';
-
+
overlay.style.display = "block";
});
}
-
+
imageDisplay.addEventListener('click', function(e) {
e.stopPropagation(); // !
-
+
overlay.style.display = "none";
-
+
img_counter = parseInt(e.target.dataset.counter) + 1;
try {
link = document.body.querySelector('img[data-counter="'+img_counter+'"]').parentNode;
} catch (e) {
try {
@@ -173,10 +173,10 @@
});
overlay.addEventListener('click', function(e) {
overlay.style.display = "none";
})
-
+
function keyPressed(e) {
e = e || window.event;
var charCode = e.keyCode || e.which;
switch(charCode) {
case 27: // Esc