在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:kritollm/chrome-extension-api-for-safari-and-firefox开源软件地址:https://github.com/kritollm/chrome-extension-api-for-safari-and-firefox开源编程语言:JavaScript 100.0%开源软件介绍:Chrome extension API for Safari and FirefoxWith these two API's you can make Chrome extensions and use the same code and manifest in Safari and Firefox. If you have more than one '*' in your urls in the manifest Firefox or Safari (I don't remember) fails. The manifest parser for Firefox is the same as main.js. Safari:
If you inject css with fonts you need to use .ttf instead of .wof If you have only used Chrome Api's defined in the ChromeAPIForSafari.js, it should work. Firefox: ChromeApiForFirefox have a hack to follow a tab which is moved between windows. I found no better solution, and the solution does not work in FirefoxDeveloperEdition where you eventually lose the tab reference. For some strange reason, tab id change when moving tab to another window. I used the cfx init, but I see that tool is deprecated. But I think you can do jpm init, choose the chromeApiForSafari/chromeManifestSimulatorFirefox.js as your entry point. Make a data directory, then copy all your files (js directory, html, img..) into the data directory. If you inject css with fonts you need to use dataURL instead. If you have only used Chrome Api's defined in the ChromeAPIForFirefox.js, it should work. Things I want to add:
I will include a sample later. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论