diff --git a/stable.user.js b/stable.user.js index f7c348d..08fe24c 100755 --- a/stable.user.js +++ b/stable.user.js @@ -21,7 +21,7 @@ // ==UserScript== // @name Moodle/Elearning/KMOOC test help -// @version 2.0.1.1 +// @version 2.0.1.2 // @description Online Moodle/Elearning/KMOOC test help // @author MrFry // @match https://elearning.uni-obuda.hu/main/* @@ -1716,7 +1716,11 @@ setVal('lastInfoCheckTime', now) } - const lastInfo = JSON.parse(getVal('lastInfo')) + let lastInfo = { result: 'noLastInfo' } + try { + lastInfo = JSON.parse(getVal('lastInfo')) + } catch (e) { + } if (lastInfo.result !== 'success' || now > lastCheck + (infoExpireTime * 1000)) { return new Promise((resolve, reject) => { const url = apiAdress +