mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-07 12:16:04 +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.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# 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).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
@ -67,4 +67,4 @@ jobs:
|
|||
# make release
|
||||
|
||||
- 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="caption">Save File</span>
|
||||
</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>
|
||||
</nav>
|
||||
|
@ -61,6 +65,8 @@
|
|||
|
||||
<script>
|
||||
var editor;
|
||||
var currentFileName = "sayhello.js";
|
||||
|
||||
function resizeEditor() {
|
||||
if (editor) {
|
||||
var ribbonHeight = document.querySelector('nav').offsetHeight;
|
||||
|
@ -108,6 +114,8 @@
|
|||
function handleFileSelect(event) {
|
||||
var file = event.target.files[0];
|
||||
if (!file) return;
|
||||
|
||||
currentFileName = file.name;
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
var language = getFileLanguage(file.name);
|
||||
|
@ -119,14 +127,26 @@
|
|||
|
||||
function saveFile() {
|
||||
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 a = document.createElement('a');
|
||||
a.href = URL.createObjectURL(blob);
|
||||
a.download = 'code.js';
|
||||
a.download = fileName;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
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>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
## 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