-
-
Save Windows81/04b883f923dfc08c088dd319149c512d to your computer and use it in GitHub Desktop.
Run in browser console to estimate how long you've been working on a project on ROBLOX (based on save-states)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ID=4794911592 | |
var MIN_THRESH=1; | |
var MAX_THRESH=5; | |
var a=[]; | |
(async()=>{ | |
var page=1 | |
for(let c=1;c<=page;c++){ | |
var r=await (await fetch(`https://www.roblox.com/places/version-history-items?assetID=${ID}&page=${c}`)).text(); | |
a.push(r.match(/\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{2}:\d{2} [AP]M/g).map(v=>Date.parse(v))); | |
page=r.match(/of (\d+)/)[1] | |
} | |
a=a.flat() | |
var t=[MIN_THRESH,MAX_THRESH].map(d=>a.map((v,i,t)=>t[i-1]-t[i]).splice(1).map(v=>Math.min(v/1e3,3600*d)).reduce((s,v)=>s+v)).map(v=>`${~~(v/3600)}:${(''+~~(v/60%60)).padStart(2,0)}:${(''+v%60).padStart(2,0)}`) | |
console.log(`Place ${ID} took between ${t[0]} and ${t[1]} to develop.`) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment