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
0
votes
1 answer

How to trigger code when a popover is hidden in a Safari extension?

In a Safari extension, is there a way to trigger some code when a popover is hidden? There is the popover event when the popover is first shown, but I haven't found the opposite, when the popover is hidden. I use elements in the popover,…
Guillaume
  • 4,331
  • 2
  • 28
  • 31
0
votes
1 answer

Can I detect if Safari is version 6 from within a Safari Extension?

Basically I have a Safari Extension and I want to deliver slightly different code to Safari 6 from that that I use for Safari 5.1... Is there a way I can detect the browser version from within an extension?
dmid
  • 483
  • 4
  • 18
0
votes
1 answer

NSIS Script example to install extension on all browsers (Chrome, FF, IE, Opera, Safari)

i need to package my plugin into an installer so that it can install on all available browsers on the computer. After browsing many topics, i found a couple of script to single install Chrome or FF script with NSIS that helped a lot, but i really…
0
votes
1 answer

How can I get Safari (on Mac) to play MPEG files on my website?

We have lots of media files and I want to play these files on Safari (on Mac) with QuickTime plug-in or VLC Web plug-in or anyting else... These files' properties: Extension: mpg Video codec: MPEG Video (PAL) (Version 1) Audio codec: MPEG Audio…
ogun
  • 1,314
  • 2
  • 16
  • 40
0
votes
0 answers

Safari Extension SQL transaction fails unless I refer to a non-existant variable

I'm "trying" to create a Safari Extension that adds links to a local sqlite database. In the global.html file, I can create the database, but I can't create a table unless I refer to a non-existant variable, which makes the rest of the script…
cybernanga
  • 11
  • 1
0
votes
1 answer

Safari extension - how to use the setContextEventUserInfo method

I am building a Safari extension. On the manual, at the page about "Adding Contextual Menu Items", at the paragraph "Adding Contextual Menu Items Programmatically", it says: You can add menu items to the contextual menu by responding to the …
Dan
  • 15,948
  • 20
  • 63
  • 92
0
votes
1 answer

Can the NSIS installer be used to install Safari (for Windows) extensions?

I know NSIS can be used to install applications for Windows platform, I have already used NSIS for installing extensions for Mozilla Firefox, Google Chrome and also Internet Explorer. Want to use NSIS to install extensions for Safari (for…
0
votes
1 answer

Safari Extension : retrieve full HTML code from a page

i'm trying to create a safari extension and i'm stuck with something. I have my global.html on my extension and i've been searching the web for like 3hours on how to retrieve the full html code without success. I…
Pedro Vieira
  • 3,330
  • 3
  • 41
  • 76
0
votes
2 answers

How can two Safari extensions communicate with each other?

The Safari extension framework explicitly does not support message passing between extensions. I'm looking for a workable hack to get around this, without letting the page know that extensions are running. Suggestions (not tested): One extension…
Michael Gundlach
  • 106,555
  • 11
  • 37
  • 41
-1
votes
1 answer

How to listen to safari extension popup toolbar button event

I am developing a safari app extension. I have created a popup toolbar item that looks like this. How can I get the value from textfield when tapped on the submit button. Thank you so much.
-1
votes
1 answer

Safari App Extension to read browser history

Can the new Safari App Extensions read browser history? If so, what are the API calls?
LBogaardt
  • 402
  • 1
  • 4
  • 25
-1
votes
1 answer

how do I implement content security policy in safari extension

I am getting following error Refused to load https://plus.google.com/_/favicon?domain_url=https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2&locale=en_US&font=sf&iframeId=24f64667-08f1-4ffb-ac10-4bda573c8ed7…
-1
votes
1 answer

Safari extension - How do I set the badge number on specific tab only?

How can I set the badge number on a specific tab only? So far I have a code that sets the badge number on all the tabs.. I've been reading around A LOT, but there doesn't seem to be a whole lot of information about this, so perhaps I will find a…
Anders
  • 513
  • 2
  • 10
  • 32
-1
votes
1 answer

Safari Extension Settings to Injected Script

I'm trying to pass a variable from the settings in my safari extension to the injected javascript. I've managed to get the message passed but have no idea how to use the variable out of the handleMessage scope so I can use it in my injected file.…
mousebat
  • 474
  • 7
  • 25
-1
votes
1 answer

Use jQuery in a Safari Extension

For some reason in my global.html file jquery doesn't work for me. here is the code that is in my global.html file:
atomikpanda
  • 1,845
  • 5
  • 33
  • 47
1 2 3
44
45