mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Motd/version fixes, some logging improvements, manual update
This commit is contained in:
parent
c53c181a5b
commit
e0f7027b26
5 changed files with 22 additions and 98 deletions
|
@ -360,6 +360,12 @@ változtatni akarsz, akkor illik tudni
|
|||
<li>Nincs kiválasztva a megoldani kívánt tárgy a menüben.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>7. Mi ez a ... ?</b>
|
||||
</br>
|
||||
<img height=40% src="img/imgq.jpg" alt="img"/>
|
||||
|
||||
</li>
|
||||
</p>
|
||||
<li>
|
||||
Egyéb:<br><a target="_blank"
|
||||
|
@ -370,14 +376,6 @@ változtatni akarsz, akkor illik tudni
|
|||
mindég használhatod a txt-t, amiben az addig lementett kérdések vannak. (CTRL + F) A kritikus hibák
|
||||
consolra ki vannak írva, amit f12 megnyitásával tudsz előhozni (chrome/firefox (dev console))
|
||||
</ul>
|
||||
<center>
|
||||
<h3>Adat egyszerűsítés</h3>
|
||||
</center>
|
||||
<hr> Másold be ide az egész txt-d, és ez kiszedi belőle az ugyanolyan kérdéseket, illetve ha
|
||||
hibás részeket talál, akkor kikommenteli. Érdemes megnézni, hogy történt-e ilyen, keress rá a
|
||||
kész szövegben a "#"-karakterre. Ezzel azért óvatosan, ez kipusztithatja a szobanövényed.
|
||||
<textarea id="converter"></textarea>
|
||||
<button onclick="simplify()">Egyszerűsítés</button>
|
||||
<hr> Jogosultságok:
|
||||
</br>GM_openInTab: help megnyitása új lapon, GM_xmlhttpRequest: online adatbázishoz.
|
||||
GM_getResourceText: a txt beolvasáshoz. Mást nem bír beolvasni, csak amit megadsz a @resouces
|
||||
|
@ -411,85 +409,6 @@ consolra ki vannak írva, amit f12 megnyitásával tudsz előhozni (chrome/firef
|
|||
}
|
||||
document.getElementById("tex").value = "// @resource data file:///" + a;
|
||||
}
|
||||
|
||||
function simplify() {
|
||||
var splitData = document.getElementById("converter").value.split("\n");
|
||||
var result = [];
|
||||
var jumped = 0;
|
||||
var doubles = 0;
|
||||
for (var i = 0; i < splitData.length; i += jumped) {
|
||||
splitData[i] = splitData[i].trim();
|
||||
jumped = 0;
|
||||
var currQuestion = {
|
||||
q: splitData[i],
|
||||
a: splitData[i + 1],
|
||||
i: splitData[i + 2]
|
||||
};
|
||||
|
||||
if (currQuestion.q != undefined && currQuestion.q[0] == "?" && currQuestion.a != undefined &&
|
||||
currQuestion.a[0] == "!") {
|
||||
jumped += 2;
|
||||
}
|
||||
if (currQuestion.i != undefined && currQuestion.i[0] == ">" && jumped == 2) {
|
||||
jumped++;
|
||||
} else {
|
||||
delete currQuestion.i;
|
||||
}
|
||||
if (jumped > 1) {
|
||||
for (var j = 0; j < result.length; j++) {
|
||||
if (result[j].q) {
|
||||
if (result[j].q == currQuestion.q && result[j].a == currQuestion.a) {
|
||||
if (result[j].i && currQuestion.i) {
|
||||
if (result[j].i == currQuestion.i) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (j >= result.length) {
|
||||
result.push(currQuestion);
|
||||
} else {
|
||||
doubles++;
|
||||
}
|
||||
}
|
||||
if (currQuestion.q[0] == "+") {
|
||||
result.push({
|
||||
n: currQuestion.q
|
||||
});
|
||||
jumped++;
|
||||
} else if (jumped < 1) {
|
||||
var comment = currQuestion.q;
|
||||
if (comment[0] != "#") {
|
||||
comment = "#" + comment;
|
||||
}
|
||||
result.push({
|
||||
c: comment
|
||||
});
|
||||
jumped++;
|
||||
}
|
||||
}
|
||||
var textResult = "";
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
if (result[i].q != undefined && result[i].a != undefined) {
|
||||
textResult += result[i].q + "\n";
|
||||
textResult += result[i].a + "\n";
|
||||
}
|
||||
if (result[i].i != undefined) {
|
||||
textResult += result[i].i + "\n";
|
||||
}
|
||||
if (result[i].c != undefined) {
|
||||
textResult += result[i].c + "\n";
|
||||
}
|
||||
if (result[i].n != undefined) {
|
||||
textResult += result[i].n + "\n";
|
||||
}
|
||||
}
|
||||
alert(doubles + " duplikáció eltávolítva, és hibás kérdések kikommentelve.");
|
||||
document.getElementById("converter").value = textResult;
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue