-
Notifications
You must be signed in to change notification settings - Fork 0
/
inject.js
20 lines (17 loc) · 862 Bytes
/
inject.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
EdubarUtils.isAdmin = ()=>{return true};
EdubarUtils.isWebpageAdmin = ()=>{return true};
window.addEventListener("load",()=>{
ETestUtils.getSuperprideleniaTestu = function(testid, doneFunc) {
var superpridelenia = ETestUtils.getCached('superpridelenia_'+testid);
if (!superpridelenia) {
$.post('/elearning/?cmd=ETestCreator&akcia=getSuperprideleniaTestu',{testids:testid}, function(pdata) {
var data = pdata['superpridelenia'];
superpridelenia = data?.[testid] ?? [];
ETestUtils.setCached('superpridelenia_'+testid, data);
doneFunc(superpridelenia, pdata);
},'json');
} else {
doneFunc(superpridelenia[testid] ? superpridelenia[testid] : [], superpridelenia);
}
}
})