Sha256: 16a0efd177c8560f2425fd50812c0264a18749cacfedf1f1905dcc37f5877276
Contents?: true
Size: 942 Bytes
Versions: 12
Compression:
Stored size: 942 Bytes
Contents
// Push the error page body upwards the size of the console. document.addEventListener('DOMContentLoaded', function() { var consoleElement = document.getElementById('console'); var resizerElement = consoleElement.getElementsByClassName('resizer')[0]; var bodyElement = document.body; function setBodyElementBottomMargin(pixels) { bodyElement.style.marginBottom = pixels + 'px'; } var currentConsoleElementHeight = consoleElement.offsetHeight; setBodyElementBottomMargin(currentConsoleElementHeight); resizerElement.addEventListener('mousedown', function(event) { function recordConsoleElementHeight(event) { resizerElement.removeEventListener('mouseup', recordConsoleElementHeight); var currentConsoleElementHeight = consoleElement.offsetHeight; setBodyElementBottomMargin(currentConsoleElementHeight); } resizerElement.addEventListener('mouseup', recordConsoleElementHeight); }); });
Version data entries
12 entries across 12 versions & 3 rubygems