Added some devel docs

This commit is contained in:
MrFry 2020-03-23 10:24:28 +01:00
parent 163fc18901
commit 93c5d887f5
2 changed files with 83 additions and 0 deletions

41
devel/readme.md Normal file
View file

@ -0,0 +1,41 @@
# Setup
A `stable.user.js`-ben a következő sorokat módosítsd a helyi szerver használatához:
## 0
Tampermonkey-ban tiltsd le az eddig használt scriptet, hogy ne akadjanak össze
## 1
```javascript
const serverAdress = 'https://qmining.frylabs.net/'
// const serverAdress = 'http://localhost:8080/'
const apiAdress = 'https://api.frylabs.net/'
// const apiAdress = 'http://localhost:8080/'
```
Itt a `localhost`-os címeket uncommenteld, a frylabs-osakat pedig commenteld ki!
## 2
Nyisd meg a tampermonkey bővítményt, majd hozz létre egy új scriptet
A megnyíló ablakban tölrölj mindent a szerkesztőben, és a `devel/testWrapper.js` fájl tartalmát
másold be úgy ahogy van.
## 3
A bemásolt tartalomban keresd meg a következő részt:
```
// @require file:///{ELÉRÉSI ÚT IDE}
```
Ide írd be a `stable.user.js` elérési útvonalát. Ezt legkönyebben úgy teheted meg, hogy fájl
böngészőből behúzod az URL bárba a `stable.user.js`-t magát. Ekkor felugorhat a tampermonkey hogy
telepíteni akarja, de azt zárd be és egy üres ablakban ott kellene lennie az URL bárban a teljes
elérési útnak. Ezt úgy hogy a `file:///` legyen az eleje másold be a a `@require` tag-hez
## 4
Ha minden jól ment, akkor a moddle oldalán már a helyi változatnak kellene futnia, és minden
`stable.user.js` módosítás azonnal életbe lép a böngészőben való frissítés után.

42
devel/testWrapper.js Normal file
View file

@ -0,0 +1,42 @@
/* ----------------------------------------------------------------------------
Online Moodle/Elearning/KMOOC test help
https://greasyfork.org/en/scripts/38999-moodle-elearning-kmooc-test-help
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
------------------------------------------------------------------------- */
// ==UserScript==
// @name Moodle/Elearning/KMOOC test help
// @version DEVEL
// @description Online Moodle/Elearning/KMOOC test help
// @author Yout
// @match https://elearning.uni-obuda.hu/main/*
// @match https://elearning.uni-obuda.hu/kmooc/*
// @match file:///*
// @grant GM_getResourceText
// @grant GM_info
// @grant GM_getValue
// @grant GM_deleteValue
// @grant GM_setValue
// @grant GM_xmlhttpRequest
// @grant GM_openInTab
// @require file:///{ELÉRÉSI ÚT IDE}
// @namespace https://greasyfork.org/users/153067
// ==/UserScript==
(function() {
console.log('done')
})();