| @@ -41,6 +41,12 @@ function removeRandomTitle() { | |||
| RandomSpan.style.display = "inline-block"; | |||
| } | |||
| function removeRandomImage() { | |||
| var elts = document.getElementsByClassName("img-fluid"); | |||
| var RandomImg = elts[Math.floor(Math.random() * elts.length)]; | |||
| RandomImg.remove(); | |||
| } | |||
| // code adapted from w3collective | |||
| function readingTime(text) { | |||
| const wpm = 200; | |||
| @@ -8,8 +8,8 @@ | |||
| <div class="action"> | |||
| <button onClick="refresh(this)" type="button" value="Refresh" title="new iteration">↻</button> | |||
| <button onclick="" title="add one">+</button> | |||
| <button onclick="" title="remove">-</button> | |||
| <!--<button onclick="" title="add one">+</button>--> | |||
| <button onclick="removeRandomImage()" title="remove">-</button> | |||
| </div> | |||
| <a href="{{ url_for('main.index') }}" class="h1 text-left contrast" style="color: var(--color-lightyellow) !important;"> ⇽ </a> | |||