4 ms·
Desktop Safari extensions work pretty well in Chrome. Keep in mind that Safari uses manifest v2, while Chrome v3, so you'll need two different manifests. iOS S
by efortis 4y ago
Desktop Safari extensions work pretty well in Chrome. Keep in mind that Safari uses manifest v2, while Chrome v3, so you'll need two different manifests.
iOS Safari has some limitations [1], e.g.
1. the time it can run the background script.
2. you need to use the Alarm API (minute resolution) instead of `setTimeout`
3. no support for `contextMenus`, so you'll have to make your own.
If you need `executeScript` in Safari:
if (typeof chrome.scripting === "undefined")
chrome.scripting = {
executeScript: ({ files, target }) =>
browser.tabs.executeScript(target.tabId, { file: files[0] })
}
[1]
https://developer.apple.com/documentation/safariservices/safari_web_extensions/optimizing_your_web_extension_for_safari https://developer.apple.com/documentation/safariservices/saf...