Questions tagged [safari-extension]

A legacy API to extend Apple's Safari web browser. As of Safari 14/MacOS 11, a framework named Safari Web Extension implements the standard browser extension APIs. Safari App Extensions, introduced with MacOS 10.12 ("Sierra"), is aimed at integration of native applications with the browser.

Safari Extensions is the term Apple used for a legacy API to extend the browser. As of MacOS 11, Safari Web Extensions (safari-web-extension) is the official framework to implement browser extensions in JS, while Safari App Extensions (safari-app-extension) focus on the integration of native applications with the browser and their communication.

Legacy documentation can be found starting at the Safari Extensions Development Guide.

662 questions
4
votes
1 answer

Is there any tab specific unique id safari browser

i want to store tab specific values in a array. i want to store tab unique id as key. is there any unique id for safari browser tab. thanks in advance
Ramesh
  • 79
  • 5
4
votes
1 answer

NSExtensionRequestHandling not handling native messages

I'm trying to create a Safari Web Extension to my native app. I want to have a popup with a button which when clicked will communicate with my native app. Before I get to this part I have a problem sending a native message and handling it in…
4
votes
1 answer

Safari Extension CSS Injection not loading

I built a Safari Extension in XCode from scratch. The main goal was to hide the video recommendations on YouTube when watching something - I figured I could do that using some css properties. For testing purposes, I included some more style…
Felix Jassler
  • 1,029
  • 11
  • 22
4
votes
2 answers

Safari Extension Invalid Code Signature Identifier

Facts: I am trying to upload an app to the app store. I am deploying via xcode archive distribution I have setup an app appstoreconnect.apple.com I have setup an ID on developer.apple.com When I try to deploy and it getting signed I get this…
MindlessRouse
  • 425
  • 2
  • 12
4
votes
2 answers

How to reload a Safari Extension from the command line?

I need to "Reload" a Safari extension from the command line (and also build the package later). How can this be done? Why? I'd like to build in one step - my code is in CoffeeScript and thus I'm compiling it anyway. What have I tried? Apart from…
Jakub Hampl
  • 39,863
  • 10
  • 77
  • 106
4
votes
1 answer

Safari extension builded with Xcode, disappears from Safari after rebuild

I'm trying to build a Safari extension using Xcode, using this manual: https://developer.apple.com/documentation/safariservices/safari_app_extensions/building_a_safari_app_extension The first time it builds fine and actually works, however if I want…
xb1itz
  • 1,022
  • 10
  • 17
4
votes
2 answers

Cannot read property 'helpers' of undefined with babel and webapck

I'm trying to build a Safari extension. Since I can't use require or import in the browser, I am trying to set up Webpack and Babel. I replied heavily on some other examples I found, but no joy. Any help appreciated. webpack.conf.js const path =…
Noah
  • 4,601
  • 9
  • 39
  • 52
4
votes
1 answer

Safari app extension how to capture beforeNavigate event?

With older safari extension, we had global javascript to handle beforeNavigate event but with new safari app extension concept is there any way to capture the same event in the app code ? i tried overiding beginRequest but not sure how to capture…
Akhil Thayyil
  • 9,263
  • 6
  • 34
  • 48
4
votes
2 answers

How do I load extension on firefox and safari browser?

I have developed extension for chrome and later I made browser specific using gulp. So I know left with folders. /Chrome /Firefox |-/data/ |-/locale/ |-index.js |-package.json /Safari So for the chrome it was simple drag and drop.…
4
votes
1 answer

How can i open a new private window using safari extension?

I'm now converting my chrome extension to safari extension. My chrome extension uses the API to open a new private window like this. chrome.windows.create({"url": url, "incognito": true}); Does anyone know the way to implement this functionality in…
4
votes
1 answer

Expired WWDR certificate and Safari Extension Builder

Today, Apple's WWDR certificate expired. I've removed it from Keychain Access, both from login and system, as described here. I've also downloaded and imported a new version of WWDR certificate. However, when I open Safari Extension Builder and…
Rinat Khanov
  • 1,566
  • 10
  • 32
4
votes
1 answer

Safari, JavaScript and Copying to the System Clipboard

I'm doing a Safari extension and would like it to copy something to the users clipboard. Unfortunately all the sources I find talk about cross-platform solutions with Flash or have vague references to execCommand. Is there a way to do it in Safari…
Kay Pale
  • 6,449
  • 7
  • 28
  • 28
4
votes
2 answers

Safari 5.0 Extension Scripts Won't Run on Local Files

I wrote a very simple extension for Safari 5 that only outputs a single log message from a start script. This is the start script: console.log('start script running'); If I go to any internet page (eg. http://www.yahoo.com) the log message appears…
4
votes
2 answers

How can I access Safari extension settings from outside of the global scope?

I am trying to allow the user to configure my safari extension through a HTML preference page (as many Safari extensions do). I open this page from a javascript call inside my global html file: var newTab =…
Chris
  • 3,245
  • 4
  • 29
  • 53
4
votes
1 answer

how to change the height of safari extension at runtime?

I have developed a safari extension and it is working well when it comes to the logic. But my problem is that i am not able to change the width and height of the popover at runtime. So can someone suggest me how to dynamically change the height and…
Susan Williams
  • 317
  • 3
  • 18