Post

Replies

Boosts

Views

Activity

Reply to [Safari Extension Dev] Return from browser.scripting.executeScript is always null?
This is working for me with 16.4.1, at least when I run it with world: "MAIN". Here is my working (chromium/safari cross-platform) code: const stuff = await chrome.scripting.executeScript({ target: { tabId: tab.id }, func: (lang) => { const subs = window.mysubs[lang]; const language = window.mylanguage; return { subs, language, }; }, args: [myLang], world: "MAIN", }); /* safari doesn't return InjectionResults, it returns the values directly;*/ myData = stuff[0]?.result || stuff[0];
Topic: Safari & Web SubTopic: General Tags:
May ’23
Reply to Background script import fails in version 3 Safari extension
This is finally fixed! https://webkit.org/blog/13966/webkit-features-in-safari-16-4/#safari-web-extensions And I even tested, and it even works :). I was very much not looking forward to any of these hacks (using "scripts" instead of "service_worker", and no type="module", etc) after starting to migrate my extension from Chrome and it turns out (almost) all of the bugs I was facing have been fixed in 16.4! Note to self - make sure your system is up-to-date before starting in-depth debugging...
Topic: App & System Services SubTopic: General Tags:
Apr ’23
Reply to AVSpeechSynthesisVoice.speechVoices() - different behavior on Mac (Designed for iPhone) and iOS and MANY errors checking .audioFileSettings properties.
Getting the same thing in the latest Safari.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Cannot enroll in Developer Program
The astonishing thing is that people are so stupid they pay lots to use Apple devices in the first place... I guess the answer is to find a Chinese person who doesn't use Apple and then get them to sign up and give you their account.
Replies
Boosts
Views
Activity
May ’23
Reply to Google registerContentScripts sample doesn't work with Safari 16.4.*
Ok, not sure what was happening there - I must have been holding it wrong... Turns out that example does work when you add host_permissions, at least when they are specified correctly! :-). My bad... sorry for the noise!
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’23
Reply to [Safari Extension Dev] Return from browser.scripting.executeScript is always null?
This is working for me with 16.4.1, at least when I run it with world: "MAIN". Here is my working (chromium/safari cross-platform) code: const stuff = await chrome.scripting.executeScript({ target: { tabId: tab.id }, func: (lang) => { const subs = window.mysubs[lang]; const language = window.mylanguage; return { subs, language, }; }, args: [myLang], world: "MAIN", }); /* safari doesn't return InjectionResults, it returns the values directly;*/ myData = stuff[0]?.result || stuff[0];
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’23
Reply to Support for `world: "MAIN"` in Safari web extension content scripts
Um, so https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/scripting/RegisteredContentScript is wrong? From my testing it doesn't appear to be wrong... Maybe there are cases when it does work for Chrome but doesn't work for Safari? Maybe it only works on iOS (I only tested on the desktop so far...)?
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Background script import fails in version 3 Safari extension
This is finally fixed! https://webkit.org/blog/13966/webkit-features-in-safari-16-4/#safari-web-extensions And I even tested, and it even works :). I was very much not looking forward to any of these hacks (using "scripts" instead of "service_worker", and no type="module", etc) after starting to migrate my extension from Chrome and it turns out (almost) all of the bugs I was facing have been fixed in 16.4! Note to self - make sure your system is up-to-date before starting in-depth debugging...
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’23