From 74cf63465d81e770ba917e320bae5aba4be4e5d1 Mon Sep 17 00:00:00 2001 From: relt-1 Date: Sun, 24 Sep 2023 09:58:47 +0200 Subject: [PATCH] Fix compatibility with PS3 and fix visual bugs --- dst/QScript/Introduction.html | 28 ++++++++++++++++++++++++---- dst/QScript/Lua/Classes.html | 28 ++++++++++++++++++++++++---- dst/QScript/Lua/Exports.html | 28 ++++++++++++++++++++++++---- dst/QScript/Lua/Imports.html | 28 ++++++++++++++++++++++++---- dst/QScript/Lua/Intro.html | 28 ++++++++++++++++++++++++---- dst/QScript/Lua/Objects.html | 28 ++++++++++++++++++++++++---- dst/QScript/Tutorial/Chapter1.html | 28 ++++++++++++++++++++++++---- dst/index.html | 28 ++++++++++++++++++++++++---- template.html | 28 ++++++++++++++++++++++++---- 9 files changed, 216 insertions(+), 36 deletions(-) diff --git a/dst/QScript/Introduction.html b/dst/QScript/Introduction.html index 8f75032..f241ab4 100644 --- a/dst/QScript/Introduction.html +++ b/dst/QScript/Introduction.html @@ -6,8 +6,23 @@ function toggleTree(element) { - element.parentElement.querySelector(".nested").classList.toggle("active"); - element.classList.toggle("active"); + const nested = element.parentElement.querySelector(".nested"); + if(nested.className.indexOf("active",0) != -1) + { + nested.className = "nested"; + } + else + { + nested.className = "nested active"; + } + if(element.className.indexOf("active",0) != -1) + { + element.className = "" + } + else + { + element.className = "active" + } } function updateSearch() { @@ -65,10 +80,14 @@ li ::marker { display:none; } +li { + list-style-type: none !important; +} + li b::before{ content:'+'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -78,7 +97,7 @@ li b.active::before { content: '-'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -128,6 +147,7 @@ li b {
+

QScript Intro

QScript is a multi-language scripting system designed with security and stability in mind. diff --git a/dst/QScript/Lua/Classes.html b/dst/QScript/Lua/Classes.html index a0f441d..7b2221d 100644 --- a/dst/QScript/Lua/Classes.html +++ b/dst/QScript/Lua/Classes.html @@ -6,8 +6,23 @@ function toggleTree(element) { - element.parentElement.querySelector(".nested").classList.toggle("active"); - element.classList.toggle("active"); + const nested = element.parentElement.querySelector(".nested"); + if(nested.className.indexOf("active",0) != -1) + { + nested.className = "nested"; + } + else + { + nested.className = "nested active"; + } + if(element.className.indexOf("active",0) != -1) + { + element.className = "" + } + else + { + element.className = "active" + } } function updateSearch() { @@ -65,10 +80,14 @@ li ::marker { display:none; } +li { + list-style-type: none !important; +} + li b::before{ content:'+'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -78,7 +97,7 @@ li b.active::before { content: '-'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -128,6 +147,7 @@ li b {

+

Lua Classes

Let's start with an analogy. Imagine you want to make star-shaped cookies. You could of course, manually cut the baked cookie and then be left with a mess, or you could use a cookie cutter before baking it. In this analogy, the cookie is an object, the manual cutting method is using tables, and the cookie cutter is a class.

diff --git a/dst/QScript/Lua/Exports.html b/dst/QScript/Lua/Exports.html index 9b5b6a9..b75e4c5 100644 --- a/dst/QScript/Lua/Exports.html +++ b/dst/QScript/Lua/Exports.html @@ -6,8 +6,23 @@ function toggleTree(element) { - element.parentElement.querySelector(".nested").classList.toggle("active"); - element.classList.toggle("active"); + const nested = element.parentElement.querySelector(".nested"); + if(nested.className.indexOf("active",0) != -1) + { + nested.className = "nested"; + } + else + { + nested.className = "nested active"; + } + if(element.className.indexOf("active",0) != -1) + { + element.className = "" + } + else + { + element.className = "active" + } } function updateSearch() { @@ -65,10 +80,14 @@ li ::marker { display:none; } +li { + list-style-type: none !important; +} + li b::before{ content:'+'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -78,7 +97,7 @@ li b.active::before { content: '-'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -128,6 +147,7 @@ li b {
+

Lua Exports

Here is the real meat and potatoes of QScript. The import/export system allows you to share objects, functions and classes between scripts and other languages! The system is stupidly simple to understand.

diff --git a/dst/QScript/Lua/Imports.html b/dst/QScript/Lua/Imports.html index 0fa44a8..c221126 100644 --- a/dst/QScript/Lua/Imports.html +++ b/dst/QScript/Lua/Imports.html @@ -6,8 +6,23 @@ function toggleTree(element) { - element.parentElement.querySelector(".nested").classList.toggle("active"); - element.classList.toggle("active"); + const nested = element.parentElement.querySelector(".nested"); + if(nested.className.indexOf("active",0) != -1) + { + nested.className = "nested"; + } + else + { + nested.className = "nested active"; + } + if(element.className.indexOf("active",0) != -1) + { + element.className = "" + } + else + { + element.className = "active" + } } function updateSearch() { @@ -65,10 +80,14 @@ li ::marker { display:none; } +li { + list-style-type: none !important; +} + li b::before{ content:'+'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -78,7 +97,7 @@ li b.active::before { content: '-'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -128,6 +147,7 @@ li b {
+

Lua Imports

Now that you have exported some variables, something's gotta import them! As always, it is very simple to do.

diff --git a/dst/QScript/Lua/Intro.html b/dst/QScript/Lua/Intro.html index f8fe72a..d92f456 100644 --- a/dst/QScript/Lua/Intro.html +++ b/dst/QScript/Lua/Intro.html @@ -6,8 +6,23 @@ function toggleTree(element) { - element.parentElement.querySelector(".nested").classList.toggle("active"); - element.classList.toggle("active"); + const nested = element.parentElement.querySelector(".nested"); + if(nested.className.indexOf("active",0) != -1) + { + nested.className = "nested"; + } + else + { + nested.className = "nested active"; + } + if(element.className.indexOf("active",0) != -1) + { + element.className = "" + } + else + { + element.className = "active" + } } function updateSearch() { @@ -65,10 +80,14 @@ li ::marker { display:none; } +li { + list-style-type: none !important; +} + li b::before{ content:'+'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -78,7 +97,7 @@ li b.active::before { content: '-'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -128,6 +147,7 @@ li b {
+

Lua Intro

The tutorial will assume that you already know the basics of Lua. If you do not know anything about it, then you can go to the official PIL

diff --git a/dst/QScript/Lua/Objects.html b/dst/QScript/Lua/Objects.html index 068f1de..1732e86 100644 --- a/dst/QScript/Lua/Objects.html +++ b/dst/QScript/Lua/Objects.html @@ -6,8 +6,23 @@ function toggleTree(element) { - element.parentElement.querySelector(".nested").classList.toggle("active"); - element.classList.toggle("active"); + const nested = element.parentElement.querySelector(".nested"); + if(nested.className.indexOf("active",0) != -1) + { + nested.className = "nested"; + } + else + { + nested.className = "nested active"; + } + if(element.className.indexOf("active",0) != -1) + { + element.className = "" + } + else + { + element.className = "active" + } } function updateSearch() { @@ -65,10 +80,14 @@ li ::marker { display:none; } +li { + list-style-type: none !important; +} + li b::before{ content:'+'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -78,7 +97,7 @@ li b.active::before { content: '-'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -128,6 +147,7 @@ li b {
+

Lua Objects

Objects store a number of variables and functions which are defined in the class the object comes from. They kind of act like tables but are not modifiable. Meaning, if you wanted to make a new variable or function inside an object, you would get an error.

diff --git a/dst/QScript/Tutorial/Chapter1.html b/dst/QScript/Tutorial/Chapter1.html index 2a12d52..8034e07 100644 --- a/dst/QScript/Tutorial/Chapter1.html +++ b/dst/QScript/Tutorial/Chapter1.html @@ -6,8 +6,23 @@ function toggleTree(element) { - element.parentElement.querySelector(".nested").classList.toggle("active"); - element.classList.toggle("active"); + const nested = element.parentElement.querySelector(".nested"); + if(nested.className.indexOf("active",0) != -1) + { + nested.className = "nested"; + } + else + { + nested.className = "nested active"; + } + if(element.className.indexOf("active",0) != -1) + { + element.className = "" + } + else + { + element.className = "active" + } } function updateSearch() { @@ -65,10 +80,14 @@ li ::marker { display:none; } +li { + list-style-type: none !important; +} + li b::before{ content:'+'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -78,7 +97,7 @@ li b.active::before { content: '-'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -128,6 +147,7 @@ li b {
+

QScript Tutorial Chapter 1

Currently, only a short documentation of Lua is available.

diff --git a/dst/index.html b/dst/index.html index 52eb934..daa4b6f 100644 --- a/dst/index.html +++ b/dst/index.html @@ -6,8 +6,23 @@ function toggleTree(element) { - element.parentElement.querySelector(".nested").classList.toggle("active"); - element.classList.toggle("active"); + const nested = element.parentElement.querySelector(".nested"); + if(nested.className.indexOf("active",0) != -1) + { + nested.className = "nested"; + } + else + { + nested.className = "nested active"; + } + if(element.className.indexOf("active",0) != -1) + { + element.className = "" + } + else + { + element.className = "active" + } } function updateSearch() { @@ -65,10 +80,14 @@ li ::marker { display:none; } +li { + list-style-type: none !important; +} + li b::before{ content:'+'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -78,7 +97,7 @@ li b.active::before { content: '-'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -128,6 +147,7 @@ li b {
+

Wiki Intro

Welcome to the SourceBox wiki!

diff --git a/template.html b/template.html index 38fbcc1..02f55e4 100644 --- a/template.html +++ b/template.html @@ -6,8 +6,23 @@ function toggleTree(element) { - element.parentElement.querySelector(".nested").classList.toggle("active"); - element.classList.toggle("active"); + const nested = element.parentElement.querySelector(".nested"); + if(nested.className.indexOf("active",0) != -1) + { + nested.className = "nested"; + } + else + { + nested.className = "nested active"; + } + if(element.className.indexOf("active",0) != -1) + { + element.className = "" + } + else + { + element.className = "active" + } } function updateSearch() { @@ -65,10 +80,14 @@ li ::marker { display:none; } +li { + list-style-type: none !important; +} + li b::before{ content:'+'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -78,7 +97,7 @@ li b.active::before { content: '-'; width:12px; - height:8px; + height:100%; display: inline-block; font-weight: 500; } @@ -100,5 +119,6 @@ li b {
+

@CONTENT
\ No newline at end of file