Video Instructies
Je browser ondersteunt geen video element.
Script
(async()=>{ const getVakNaam=()=>{ const titleEl=document.querySelector('[id$="-titleText-inner"], [id*="-titleText"]'); return titleEl?.textContent?.trim()||'Onbekend vak'; }; const calc=(m)=>((m-70)/3+10); const find=(o)=>{ if(!o||typeof o!=='object')return false; for(const k in o){ if(/studentmark/i.test(k)){ const v=o[k],n=typeof v==='number'?v:parseFloat(v); if(!isNaN(n)&&n>=40&&n<=100){ const vakNaam=getVakNaam(); const punt=calc(n); console.log(`${vakNaam}: ${punt}/20`); return true; } } if(typeof o[k]==='object'&&find(o[k]))return true; } return false; }; const origF=window.fetch,origO=XMLHttpRequest.prototype.open,origS=XMLHttpRequest.prototype.send; window.fetch=function(...a){ if(typeof a[0]==='string'&&a[0].includes('CourseResultExtSet')){ return origF.apply(this,a).then(r=>{ r.clone().json().then(d=>{ setTimeout(()=>find(d),100); }).catch(()=>{}); return r; }); } return origF.apply(this,a); }; XMLHttpRequest.prototype.open=function(...a){this._url=a[1];return origO.apply(this,a);}; XMLHttpRequest.prototype.send=function(...a){ if(this._url?.includes('CourseResultExtSet')){ this.addEventListener('load',function(){ try{ setTimeout(()=>find(JSON.parse(this.responseText)),100); }catch(e){} }); } return origS.apply(this,a); }; })();
Kopieer Nu