/* Cached Variables *******************************************************************************/
var context = sessionStorage.getItem('context');
var rowThumbnails = document.querySelector('.row-thumbnails');

/* Initialization *********************************************************************************/
rowThumbnails.addEventListener("click", moeRedirect, false);

function moeRedirect(event) {
  
  var target = event.target;
  
  var notImage = target.className !== 'thumbnail-image';
  if(notImage) return;
  
  var pageId = target.getAttribute('data-page-id');
  
  window.location.href = context + '/page/' + pageId;
  
}

var thumbnails = window.document.querySelectorAll('.thumbnail');
var tallestThumbnailSize = 0;

thumbnails.forEach(function(value, key, listObj, argument) {
	var offsetHeight = listObj[key].offsetHeight;
	if(offsetHeight > tallestThumbnailSize) tallestThumbnailSize = offsetHeight;
});

thumbnails.forEach(function(value, key, listObj, argument) {
	listObj[key].setAttribute('style','min-height:' + tallestThumbnailSize + 'px');
});


//After thumbnail processing, remove the page-loading blocker
document.querySelector('body').classList.remove('content-loading');


@@ -733,70 +733,56 @@
 0;%0A%0A
-thumbnails.forEach(function(value, key, listObj, argument
+for (var i = 0; i %3C thumbnails.length; i++
 ) %7B%0A
-%09
+  
 var 
@@ -796,27 +796,28 @@
 eight = 
-listObj%5Bkey
+thumbnails%5Bi
 %5D.offset
@@ -824,17 +824,18 @@
 Height;%0A
-%09
+  
 if(offse
@@ -908,85 +908,71 @@
 t;%0A%7D
-)
 ;%0A%0A
-thumbnails.forEach(function(value, key, listObj, argument) %7B%0A%09listObj%5Bkey
+for (var i = 0; i %3C thumbnails.length; i++) %7B%0A  thumbnails%5Bi
 %5D.se
@@ -1037,19 +1037,17 @@
 'px');%0A%7D
-);%0A
+;
 %0A%0A//Afte
@@ -1169,10 +1169,8 @@
 ading');
-%0A%0A

Change nodelist.foreach to a normal for loop