mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Added contribute button
This commit is contained in:
parent
a25e64189e
commit
0baf5df7d4
1 changed files with 17 additions and 3 deletions
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Moodle/Elearning/KMOOC test help
|
// @name Moodle/Elearning/KMOOC test help
|
||||||
// @version 2.0.1.3
|
// @version 2.0.1.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/main/*
|
// @match https://elearning.uni-obuda.hu/main/*
|
||||||
|
@ -93,6 +93,7 @@
|
||||||
close: 'Bezárás',
|
close: 'Bezárás',
|
||||||
help: 'Help',
|
help: 'Help',
|
||||||
websiteBugreport: 'Weboldal / Bug report',
|
websiteBugreport: 'Weboldal / Bug report',
|
||||||
|
contribute: 'Contribute',
|
||||||
donate: 'Donate',
|
donate: 'Donate',
|
||||||
passiveTooltip: 'Ha erre kattintasz akkor a script átálítja a neptunban a hallgatói státuszod passzívra',
|
passiveTooltip: 'Ha erre kattintasz akkor a script átálítja a neptunban a hallgatói státuszod passzívra',
|
||||||
retry: 'Újrapróbálás',
|
retry: 'Újrapróbálás',
|
||||||
|
@ -1471,7 +1472,7 @@
|
||||||
var menuButtonDiv = document.createElement('div')
|
var menuButtonDiv = document.createElement('div')
|
||||||
menuButtonDiv.setAttribute('id', 'menuButtonDiv')
|
menuButtonDiv.setAttribute('id', 'menuButtonDiv')
|
||||||
SetStyle(menuButtonDiv, {
|
SetStyle(menuButtonDiv, {
|
||||||
// width: buttonWidth + 'px',
|
width: '600px',
|
||||||
// height: buttonHeight + 'px',
|
// height: buttonHeight + 'px',
|
||||||
top: (window.innerHeight - 120) + 'px',
|
top: (window.innerHeight - 120) + 'px',
|
||||||
left: '10px',
|
left: '10px',
|
||||||
|
@ -1511,11 +1512,24 @@
|
||||||
|
|
||||||
// site link ----------------------------------------------------------------------------------------------------------------
|
// site link ----------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
let contributeLink = CreateNodeWithText(buttonCell, texts.contribute, 'button')
|
||||||
|
SetStyle(contributeLink, buttonStyle)
|
||||||
|
|
||||||
|
contributeLink.addEventListener('click', function () {
|
||||||
|
openInTab(serverAdress + 'contribute?scriptMenu', {
|
||||||
|
active: true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// site link ----------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
let siteLink = CreateNodeWithText(buttonCell, texts.websiteBugreport, 'button')
|
let siteLink = CreateNodeWithText(buttonCell, texts.websiteBugreport, 'button')
|
||||||
SetStyle(siteLink, buttonStyle)
|
SetStyle(siteLink, buttonStyle)
|
||||||
|
|
||||||
siteLink.addEventListener('click', function () {
|
siteLink.addEventListener('click', function () {
|
||||||
location.href = serverAdress + 'menuClick' // eslint-disable-line
|
openInTab(serverAdress + 'menuClick', {
|
||||||
|
active: true
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// donate link ----------------------------------------------------------------------------------------------------------------
|
// donate link ----------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue