mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-10 13:42:37 +00:00
Merge branch 'dev' of https://github.com/gnh1201/welsonjs into dev
This commit is contained in:
commit
4d26f504f8
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
|
@ -42,7 +42,7 @@ jobs:
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
@ -53,7 +53,7 @@ jobs:
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v1
|
uses: github/codeql-action/autobuild@v2
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
|
@ -67,4 +67,4 @@ jobs:
|
||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
|
@ -43,6 +43,10 @@
|
||||||
<span class="icon mif-floppy-disk"></span>
|
<span class="icon mif-floppy-disk"></span>
|
||||||
<span class="caption">Save File</span>
|
<span class="caption">Save File</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button class="ribbon-button" onclick="navigate('https://github.com/sponsors/gnh1201')">
|
||||||
|
<span class="icon mif-heart"></span>
|
||||||
|
<span class="caption">Sponsor</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -61,6 +65,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var editor;
|
var editor;
|
||||||
|
var currentFileName = "sayhello.js";
|
||||||
|
|
||||||
function resizeEditor() {
|
function resizeEditor() {
|
||||||
if (editor) {
|
if (editor) {
|
||||||
var ribbonHeight = document.querySelector('nav').offsetHeight;
|
var ribbonHeight = document.querySelector('nav').offsetHeight;
|
||||||
|
@ -108,6 +114,8 @@
|
||||||
function handleFileSelect(event) {
|
function handleFileSelect(event) {
|
||||||
var file = event.target.files[0];
|
var file = event.target.files[0];
|
||||||
if (!file) return;
|
if (!file) return;
|
||||||
|
|
||||||
|
currentFileName = file.name;
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
reader.onload = function(e) {
|
reader.onload = function(e) {
|
||||||
var language = getFileLanguage(file.name);
|
var language = getFileLanguage(file.name);
|
||||||
|
@ -119,14 +127,26 @@
|
||||||
|
|
||||||
function saveFile() {
|
function saveFile() {
|
||||||
var text = editor.getValue();
|
var text = editor.getValue();
|
||||||
|
var fileName = prompt("Enter file name:", currentFileName);
|
||||||
|
if (!fileName) return;
|
||||||
|
|
||||||
|
currentFileName = fileName;
|
||||||
var blob = new Blob([text], { type: 'text/plain' });
|
var blob = new Blob([text], { type: 'text/plain' });
|
||||||
var a = document.createElement('a');
|
var a = document.createElement('a');
|
||||||
a.href = URL.createObjectURL(blob);
|
a.href = URL.createObjectURL(blob);
|
||||||
a.download = 'code.js';
|
a.download = fileName;
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function navigate(href) {
|
||||||
|
var a = document.createElement("a");
|
||||||
|
a.href = href;
|
||||||
|
a.target = "_blank";
|
||||||
|
document.body.appendChild(a);
|
||||||
|
a.click();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
## tmp
|
## tmp
|
||||||
|
|
||||||
A tmp directory is required for the interface of the Shell library.
|
Some tasks may use the tmp directory if the WelsonJS version is lower than 0.2.7.
|
Loading…
Reference in New Issue
Block a user