stricter pdf check

This commit is contained in:
mrfry 2023-05-07 13:18:54 +02:00
parent cb3c7800d3
commit c315ad598a

View file

@ -46,7 +46,7 @@
// : Script header {{{ // : Script header {{{
// ==UserScript== // ==UserScript==
// @name Moodle/Elearning/KMOOC test help // @name Moodle/Elearning/KMOOC test help
// @version 2.1.5.3 // @version 2.1.5.4
// @description Online Moodle/Elearning/KMOOC test help // @description Online Moodle/Elearning/KMOOC test help
// @author MrFry // @author MrFry
// @match https://elearning.uni-obuda.hu/* // @match https://elearning.uni-obuda.hu/*
@ -198,6 +198,8 @@
? 'https://elearning.uni-obuda.hu/' ? 'https://elearning.uni-obuda.hu/'
: location.href : location.href
if (currUrl.includes('.pdf')) return
// : Localisation {{{ // : Localisation {{{
const huTexts = { const huTexts = {
@ -1581,9 +1583,7 @@
default: { default: {
match: (url) => { match: (url) => {
return ( return (
(!url.includes('/quiz/') && (!url.includes('/quiz/') && !url.includes('review.php')) ||
!url.includes('review.php') &&
!url.includes('.pdf')) ||
forceDefaultPage forceDefaultPage
) )
}, },
@ -1654,9 +1654,7 @@
Exception(e, 'script error at addEventListener:') Exception(e, 'script error at addEventListener:')
} }
if (!currUrl.includes('.pdf')) {
ShowMenu() ShowMenu()
}
if (!serverToUse) { if (!serverToUse) {
addNewHost() addNewHost()