From ad378d57290254dea1b658c4ba6aefacea14c714 Mon Sep 17 00:00:00 2001 From: YourFriendlyNeighborhoodDealer <qminer@2girls1dj.com> Date: Mon, 28 Jan 2019 09:57:31 +0100 Subject: [PATCH] New version notifications refactoreed --- main.js | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index a654af3..3f71c9d 100644 --- a/main.js +++ b/main.js @@ -664,12 +664,24 @@ function Init(cwith) { } function VersionActions() { + FreshStart(); + Version15(); + Version16(); + Version161(); +} + +//: Version action functions {{{ + +function FreshStart() { var firstRun = GM_getValue("firstRun"); // if the current run is the frst if (firstRun == undefined || firstRun == true) // if its undefined, or true { GM_setValue("firstRun", false); // setting it to false ShowHelp(); // showing help } +} + +function Version15 () { var version15 = GM_getValue("version15"); // if the current run is the frst if (version15 == undefined || version15 == true) // if its undefined, or true { @@ -682,7 +694,9 @@ function VersionActions() { document.close(); throw "something, so this stuff stops"; } +} +function Version16 () { var version16 = GM_getValue("version16"); // if the current run is the frst if (version16 == undefined || version16 == true) // if its undefined, or true { @@ -693,9 +707,25 @@ function VersionActions() { } GM_setValue("version16", false); // setting it to false } - } +function Version161 () { + var version161 = GM_getValue("version161"); // if the current run is the frst + if (version161 == undefined || version161 == true) // if its undefined, or true + { + GM_setValue("useNetDB", "0"); + GM_setValue("version161", false); // setting it to false + GM_setValue("firstRun", true); + document.write( + '<h1>Moodle teszt userscript:<h1><h3>1.6.1.0 verzió: Új domain név: qmining.tk. Ha frissíted az oldalt, akkor tampremonkey rá fog kérdezni, hpgy engedélyezed-e a kérdések külését erre az új domain-re. A rendes működés érdekében kattints a "Allow always"-gombra</h3>' + ); + document.close(); + throw "something, so this stuff stops"; + } +} + +//: }}} + function ReadFile(cwith) { var resource = ""; try {