Skip to content

Instantly share code, notes, and snippets.

View sonnguyensnap's full-sized avatar

sonnguyen sonnguyensnap

View GitHub Profile
@MinhOmega
MinhOmega / magic_random.org.js
Last active August 9, 2024 02:03
Code to 'handle the results as desired' in random.org. Please change the values inside the array 'e' to get your desired results. Please note that this should not be used for fraudulent or commercial purposes. I will not bear any legal responsibility in connection with this
(function(){var e=[11,22,33,44,55,69],n=0,t=document.getElementById('homepage-generator').getElementsByTagName('IFRAME')[0],i=t.contentDocument||t.contentWindow.document,o=i.getElementsByTagName('input'),r=i.getElementsByTagName('span'),u,a,l,d;for(var g=0;g<o.length;g++){"button"===o[g].type&&o[g].id.endsWith('-button')&&(u=o[g]);o[g].id.endsWith('-min')&&(a=o[g]);o[g].id.endsWith('-max')&&(l=o[g])}for(g=0;g<r.length;g++)r[g].id.endsWith('-result')&&(d=r[g]);u&&d&&a&&l?(u.removeAttribute('onclick'),u.onclick=function(){var t=n++;if(!(t>=e.length)){d.innerHTML='<img src="/util/cp/images/ajax-loader.gif" alt="Loading..." />';setTimeout(function(){var n=new Date,o=n.getUTCFullYear()+'-'+('0'+(n.getUTCMonth()+1)).slice(-2)+'-'+('0'+n.getUTCDate()).slice(-2)+' '+('0'+n.getUTCHours()).slice(-2)+':'+('0'+n.getUTCMinutes()).slice(-2)+':'+('0'+n.getUTCSeconds()).slice(-2)+' UTC',u=a.value,i=l.value;d.innerHTML='<center><span style="font-size:100%;font-weight:bold;">'+e[t]+'<br></span><span style="font-size:70%;">Min: