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==
|
||||
// @name Moodle/Elearning/KMOOC test help
|
||||
// @version 2.0.1.3
|
||||
// @version 2.0.1.4
|
||||
// @description Online Moodle/Elearning/KMOOC test help
|
||||
// @author MrFry
|
||||
// @match https://elearning.uni-obuda.hu/main/*
|
||||
|
@ -93,6 +93,7 @@
|
|||
close: 'Bezárás',
|
||||
help: 'Help',
|
||||
websiteBugreport: 'Weboldal / Bug report',
|
||||
contribute: 'Contribute',
|
||||
donate: 'Donate',
|
||||
passiveTooltip: 'Ha erre kattintasz akkor a script átálítja a neptunban a hallgatói státuszod passzívra',
|
||||
retry: 'Újrapróbálás',
|
||||
|
@ -1471,7 +1472,7 @@
|
|||
var menuButtonDiv = document.createElement('div')
|
||||
menuButtonDiv.setAttribute('id', 'menuButtonDiv')
|
||||
SetStyle(menuButtonDiv, {
|
||||
// width: buttonWidth + 'px',
|
||||
width: '600px',
|
||||
// height: buttonHeight + 'px',
|
||||
top: (window.innerHeight - 120) + 'px',
|
||||
left: '10px',
|
||||
|
@ -1511,11 +1512,24 @@
|
|||
|
||||
// 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')
|
||||
SetStyle(siteLink, buttonStyle)
|
||||
|
||||
siteLink.addEventListener('click', function () {
|
||||
location.href = serverAdress + 'menuClick' // eslint-disable-line
|
||||
openInTab(serverAdress + 'menuClick', {
|
||||
active: true
|
||||
})
|
||||
})
|
||||
|
||||
// donate link ----------------------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue