From c315ad598afb2b33a607109268194c623b6f4c0d Mon Sep 17 00:00:00 2001 From: mrfry Date: Sun, 7 May 2023 13:18:54 +0200 Subject: [PATCH] stricter pdf check --- stable.user.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/stable.user.js b/stable.user.js index c74c28e..2b838f0 100755 --- a/stable.user.js +++ b/stable.user.js @@ -46,7 +46,7 @@ // : Script header {{{ // ==UserScript== // @name Moodle/Elearning/KMOOC test help -// @version 2.1.5.3 +// @version 2.1.5.4 // @description Online Moodle/Elearning/KMOOC test help // @author MrFry // @match https://elearning.uni-obuda.hu/* @@ -198,6 +198,8 @@ ? 'https://elearning.uni-obuda.hu/' : location.href + if (currUrl.includes('.pdf')) return + // : Localisation {{{ const huTexts = { @@ -1581,9 +1583,7 @@ default: { match: (url) => { return ( - (!url.includes('/quiz/') && - !url.includes('review.php') && - !url.includes('.pdf')) || + (!url.includes('/quiz/') && !url.includes('review.php')) || forceDefaultPage ) }, @@ -1654,9 +1654,7 @@ Exception(e, 'script error at addEventListener:') } - if (!currUrl.includes('.pdf')) { - ShowMenu() - } + ShowMenu() if (!serverToUse) { addNewHost()