Skip to content

Commit

Permalink
_
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyHamachi committed Feb 18, 2024
1 parent eb05096 commit b93b4e8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/content/js/content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
object: {
expression: await _.text,
objectGroup: "BlueFox-js-lanch",
awaitPromise: true,
returnByValue: true,
},
});
},
Expand All @@ -95,6 +97,7 @@
expression: object,
objectGroup: "BlueFox-js-lanch",
awaitPromise: true,
returnByValue: true,
},
});
return R;
Expand Down
2 changes: 2 additions & 0 deletions src/tab/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ import { BlueFoxJs } from "/modules/BlueFoxJs/bluefox.es.min.js";
object: {
expression: ServerScript.value,
objectGroup: "BlueFox-js-lanch",
awaitPromise: true,
returnByValue: true,
},
});
});
Expand Down
9 changes: 6 additions & 3 deletions src/tab/js/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ window.BlueFoxScript = class extends BlueFoxScript {
expression: window.MonacoEditor.getValue(),
objectGroup: "BlueFox-js-lanch",
awaitPromise: true,
returnByValue: true,
},
});
});
Expand Down Expand Up @@ -162,7 +163,7 @@ window.BlueFoxScript = class extends BlueFoxScript {
``,
` let search_result = await tab.dispatch.script(`,
` () => {`,
` return JSON.stringify([...document.querySelectorAll("#search a[data-jsarwt='1']")]`,
` return [...document.querySelectorAll("#search :is(a[data-jsarwt='1'],a[jsname])")]`,
` .filter((_) => {`,
` return _.querySelector("h3");`,
` })`,
Expand All @@ -171,10 +172,10 @@ window.BlueFoxScript = class extends BlueFoxScript {
` href: _.href,`,
` title: _.querySelector("h3").textContent,`,
` }`,
` }))`,
` });`,
` }`,
` );`,
` log(JSON.parse(search_result.result.value));`,
` log(search_result.result.value);`,
`})();`,
].join("\n"),
language: "javascript",
Expand Down Expand Up @@ -242,6 +243,7 @@ window.BlueFoxScript = class extends BlueFoxScript {
expression: file,
objectGroup: "BlueFox-js-lanch",
awaitPromise: true,
returnByValue: true,
},
});
},
Expand All @@ -255,6 +257,7 @@ window.BlueFoxScript = class extends BlueFoxScript {
expression: data.content,
objectGroup: "BlueFox-js-lanch",
awaitPromise: true,
returnByValue: true,
},
});
},
Expand Down

0 comments on commit b93b4e8

Please sign in to comment.