Skip to content

Commit d215443

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 8572fc0 + d2b08da commit d215443

3 files changed

Lines changed: 9 additions & 17 deletions

File tree

addons/goboscript/addon.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"name": "Goboscript integration",
33
"description": "Integration with goboscript.",
4-
"tags": [
5-
"community", "editor"
6-
],
4+
"tags": ["community", "editor"],
75
"credits": [
86
{
97
"name": "faretek1"
@@ -20,17 +18,13 @@
2018
"userscripts": [
2119
{
2220
"url": "userscript.js",
23-
"matches": [
24-
"projects"
25-
]
21+
"matches": ["projects"]
2622
}
2723
],
2824
"userstyles": [
2925
{
3026
"url": "style.css",
31-
"matches": [
32-
"projects"
33-
]
27+
"matches": ["projects"]
3428
}
3529
]
3630
}

addons/goboscript/sb2gs.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* global chrome */
22
import downloadBlob from "../../libraries/common/cs/download-blob.js";
33

4-
54
export const sb2gsWhlName = "sb2gs-2.0.0-py3-none-any.whl";
65

76
/**
@@ -54,8 +53,8 @@ shutil.make_archive("${outputPath.slice(0, -4)}", "zip", "${outputDirPath}")
5453
const title = isOwn ? document.querySelector(".project-title input") : document.querySelector(".project-title");
5554
const titleStr = isOwn ? title.value : title.innerText;
5655

57-
const projectId = window.location.pathname.split("/")[2]
56+
const projectId = window.location.pathname.split("/")[2];
5857

5958
const beginFilenameWithId = true;
60-
downloadBlob((beginFilenameWithId ? `${projectId} ` : "") + titleStr + '.zip', blob);
59+
downloadBlob((beginFilenameWithId ? `${projectId} ` : "") + titleStr + ".zip", blob);
6160
}

addons/goboscript/userscript.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* global chrome */
2-
import * as sb2gs from './sb2gs.js';
2+
import * as sb2gs from "./sb2gs.js";
33
import * as pyodidePkg from "./pyodide/pyodide.mjs";
44

55
/**
66
* @param addon {UserscriptAddon}
77
* @param console
88
* @returns {Promise<void>}
99
*/
10-
export default async function({ addon, console }) {
10+
export default async function ({ addon, console }) {
1111
const decompileButton = document.createElement("button");
1212
decompileButton.className = "button sa-decompile-button waiting";
1313
decompileButton.title = "decompile to goboscript code";
@@ -20,8 +20,7 @@ export default async function({ addon, console }) {
2020

2121
const loadMicropipPromise = pyodide.loadPackage("micropip");
2222

23-
const sb2gsWhlFile = await ((await
24-
fetch(`${addon.self.dir}/${sb2gs.sb2gsWhlName}`)).bytes());
23+
const sb2gsWhlFile = await (await fetch(`${addon.self.dir}/${sb2gs.sb2gsWhlName}`)).bytes();
2524

2625
pyodide.FS.writeFile(`/${sb2gs.sb2gsWhlName}`, sb2gsWhlFile);
2726

@@ -41,7 +40,7 @@ export default async function({ addon, console }) {
4140
await sb2gs.decompile(addon, console, pyodide, decompileButton);
4241
decompileButton.classList.remove("loading");
4342
decompileButton.classList.add("waiting");
44-
}
43+
};
4544

4645
while (true) {
4746
const seeInside = await addon.tab.waitForElement(".see-inside-button", {

0 commit comments

Comments
 (0)