Remove infinite iframe creation

Bad idea after all, this can cause bandwidth
abuse to GitHub.
This commit is contained in:
Raymond Hill 2020-07-17 21:16:38 -04:00
parent bc60e6c4a2
commit cf31d83acf
No known key found for this signature in database
GPG key ID: 25E1490B761470C2
2 changed files with 0 additions and 39 deletions

View file

@ -1,39 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Infinite iframe creation</title>
</head>
<body>
<h1>Infinite iframe creation</h1>
<div style="display:flex;flex-wrap:wrap;">
<div class="iframeContainer"></div>
<div class="iframeContainer"></div>
<div class="iframeContainer"></div>
<div class="iframeContainer"></div>
</div>
<script>
let containers = document.querySelectorAll('.iframeContainer');
let iContainer = 0;
function randomStr(size) {
const part = Math.random().toString().slice(2);
return part.repeat((size + part.length - 1) / part.length);
}
function createFrame() {
iContainer += 1;
const i = iContainer % containers.length;
const container = containers[i];
if ( container.firstElementChild !== null ) {
container.firstElementChild.remove();
}
const iframe = document.createElement('iframe');
iframe.src = 'plagiomnium_affine_laminazellen.jpeg?_=' + randomStr(8000);
container.appendChild(iframe);
setTimeout(( ) => {
createFrame();
}, 333);
}
createFrame();
</script>
<div><a href="https://commons.wikimedia.org/wiki/File:Plagiomnium_affine_laminazellen.jpeg">Image from commons.wikimedia.org</a></div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 KiB