mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Version inc, fixing minor eslint issues
This commit is contained in:
parent
fc5304667b
commit
7bd9d73714
1 changed files with 6 additions and 6 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.1.2
|
// @version 2.1.1.3
|
||||||
// @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/*
|
||||||
|
@ -1022,12 +1022,12 @@
|
||||||
|
|
||||||
function getBase64Image(img) {
|
function getBase64Image(img) {
|
||||||
img.crossOrigin = 'Anonymous'
|
img.crossOrigin = 'Anonymous'
|
||||||
let canvas = document.createElement('canvas')
|
const canvas = document.createElement('canvas')
|
||||||
canvas.width = img.width
|
canvas.width = img.width
|
||||||
canvas.height = img.height
|
canvas.height = img.height
|
||||||
let ctx = canvas.getContext('2d')
|
const ctx = canvas.getContext('2d')
|
||||||
ctx.drawImage(img, 0, 0)
|
ctx.drawImage(img, 0, 0)
|
||||||
let dataURL = canvas.toDataURL('image/png')
|
const dataURL = canvas.toDataURL('image/png')
|
||||||
img.crossOrigin = undefined
|
img.crossOrigin = undefined
|
||||||
return dataURL.replace(/^data:image\/(png|jpg);base64,/, '')
|
return dataURL.replace(/^data:image\/(png|jpg);base64,/, '')
|
||||||
}
|
}
|
||||||
|
@ -1098,7 +1098,7 @@
|
||||||
|
|
||||||
const getHostHandler = {
|
const getHostHandler = {
|
||||||
apply: function() {
|
apply: function() {
|
||||||
let result = apply(...arguments)
|
const result = apply(...arguments)
|
||||||
return result === shadowRootNewHost ? shadowRootHost : result
|
return result === shadowRootNewHost ? shadowRootHost : result
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1757,7 +1757,7 @@
|
||||||
|
|
||||||
Array.from(messageNode.childNodes).forEach(node => {
|
Array.from(messageNode.childNodes).forEach(node => {
|
||||||
if (node.tagName === 'A') {
|
if (node.tagName === 'A') {
|
||||||
let linkNode = document.createElement('span')
|
const linkNode = document.createElement('span')
|
||||||
SetStyle(linkNode, {
|
SetStyle(linkNode, {
|
||||||
color: 'lightblue',
|
color: 'lightblue',
|
||||||
textDecoration: 'underline',
|
textDecoration: 'underline',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue