Open anc95 opened 2 years ago
@anc95 Did your script show the link list on the right side? It seems to work on my iPad simulator.
@anc95 If you finish testing your script ok on Stay², it should be great if you put the Stay² available signature on your Greasy fork homepage.
<img width="242px" src="https://raw.githubusercontent.com/shenruisi/Stay-Offical-Userscript/main/Stay-signature%403x.png" alt="Stay" />
I captured a screenshot. I have activated my script and set Stay enabled for safari.
The weird thing is when I click Stay icon in url zone, just shows a shadowed icon under it, is it expected?
IMG_2979.MOV
I captured a screenshot. I have activated my script and set Stay enabled for safari.
The weird thing is when I click Stay icon in url zone, just shows a shadowed icon under it, is it expected?
A shadowed icon is an adapt problem on iPadOS(But this issue does not affect the script running). Could you like to give me an email address? I will invite you to TestFlight with the latest version.
@shenruisi My email is 1481988258@qq.com, Thx. By the way, is there a method to debug script on ipad
@shenruisi My email is 1481988258@qq.com, Thx. By the way, is there a method to debug script on ipad
Invited. First, you need to check the console of the popup view if there is some exception on your script. And you can debug your script using GM_log to output the logs.
@shenruisi I connected ipad to my Mac, and debug in develop tools
I noticed you wrap my script content with gm_init
, and I tried to modify script.content
with my origin script content(without gm_init wrapped)before sendMessage of injectScript
, it result in working well. (But if with gm_init
wrapped, it not working, meanwhile without related error in console)
if (script.active){ //inject active script
console.log("injectScript",script);
// before this, I exec `script.content =${origin script}` in console
browser.runtime.sendMessage({
from: "bootstrap",
operate: "injectScript",
code:script.content,
allFrames:!script.noFrames,
runAt:"document_"+script.runAt
});
}
@shenruisi I connected ipad to my Mac, and debug in develop tools I noticed you wrap my script content with
gm_init
, and I tried to modifyscript.content
with my origin script content(without gm_init wrapped)before sendMessage ofinjectScript
, it result in working well. (But if withgm_init
wrapped, it not working, meanwhile without related error in console)if (script.active){ //inject active script console.log("injectScript",script); // before this, I exec `script.content =${origin script}` in console browser.runtime.sendMessage({ from: "bootstrap", operate: "injectScript", code:script.content, allFrames:!script.noFrames, runAt:"document_"+script.runAt }); }
gm_init
just nested your script to an async function, so we can use await feature in our init function. But it just affects some code you want to do something on context loaded. By the. way, which branch did you test on? I run your script from the greasy fork homepage, it always runs ok on branch 2.0.2.
I have invited you to the internal testing of version 2.0.2, please check.
Any update? @anc95
@shenruisi I am on CNY, I will try your solution tomorrow and then feedback here.
@shenruisi It works, I just tested. But I encounter a new problem, script seems run two times occasionally, so movie list is repeated
@shenruisi It works, I just tested. But I encounter a new problem, script seems run two times occasionally, so movie list is repeated
This should be an issue of the content script injected at frames. I will mention you to test when the new version is updated.
Hello, Thanks for your Stay enables script on ios and ipados safari
I have written a script to show online movie resource when user surf movie.douban.com. It works well on chrome and safari of pc(macOS). Now I want use it on my ipad. I created a new script on Stay and copied my code(monkey script) here added to Stay. I am ensure I enabled Stay extensions and gave all needed privilege. But it seems just not work.