mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
stricter pdf check
This commit is contained in:
parent
cb3c7800d3
commit
c315ad598a
1 changed files with 5 additions and 7 deletions
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue