number of revisions: <inputtype="range"name="numrevs"min="1"max="100"value="10"/>
<buttonid="generate">generate script</button>
</div>
@ -39,7 +57,9 @@
<divclass="body"></div>
</div>
<divid="revisions"></div>
<scriptsrc="difftime.js"></script>
<script>
const dateFormat = new Intl.RelativeTimeFormat('en', { style: 'long' });
let r = {
action: "compare",
format: "json",
@ -57,6 +77,7 @@
let api_url = "https://en.wikipedia.org/w/api.php"
// let url = "https://en.wikipedia.org/w/api.php?action=compare&format=json&fromtitle=Han%20Kang&fromrev=376586279&totitle=Han%20Kang&torelative=next&formatversion=2&origin=*";
let generate = document.querySelector("button#generate");