mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Made the script start loading before the site is loaded
This commit is contained in:
parent
d21b981514
commit
1f111c745d
1 changed files with 7 additions and 1 deletions
|
@ -31,6 +31,7 @@
|
|||
// @match https://qmining.frylabs.net/*
|
||||
// @match http://qmining.frylabs.net/*
|
||||
// @noframes
|
||||
// @run-at document-start
|
||||
// @grant GM_getResourceText
|
||||
// @grant GM_info
|
||||
// @grant GM_getValue
|
||||
|
@ -762,8 +763,13 @@
|
|||
console.time('main')
|
||||
timerStarted = true
|
||||
|
||||
if(document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', Init)
|
||||
}
|
||||
else {
|
||||
Init()
|
||||
}
|
||||
}
|
||||
|
||||
function AfterLoad () {
|
||||
const url = location.href // eslint-disable-line
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue