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
0 answers

Javascript/Safari - Searching a webpage's text using innerHTML

I'm working on an extension for Mac OS X's Safari browser. I only want this extension to execute if a few specific strings appear on the page. It should search for these strings throughout the entire HTML document. Validation bool: function…
MrCarder
  • 438
  • 1
  • 9
  • 19
0
votes
1 answer

How to create browser Extension ? compatible with IE, Chrome, Firefox , Safari and Opera?

I want to make my own extension so people who are using my website for every purpose they get easily things in same window. I tried to install and build a Alexa Toolbar But it not support further extension which I want to put within like…
0
votes
0 answers

How to disable a particular safari extension settings item?

I am working on safari Plugin. How can I disable "Safari extension setting item" so that it will grayed out in "safari prefernces extension" window.
Nik
  • 682
  • 1
  • 8
  • 27
0
votes
1 answer

NPP_New not getting called in few webpages (Chrome and Safari)

I am trying to access NPAPI plugin from content/inject script of Chrome/Safari extensions. The code to embed the plugin object and access methods. var newElement = document.createElement("embed"); newElement.id = "myPluginID"; newElement.type =…
0
votes
0 answers

Can you leverage OS specific desktop browser gestures?

No, it would not be a good idea to do so, but still a real question. Example, Google Chrome allows OSX users to swipe back and forth to move back and forth between pages. Things like that. On mobile devices, you can leverage these gestures for your…
o_O
  • 5,527
  • 12
  • 52
  • 90
0
votes
1 answer

Imitate search engine header in browser

I'm using Google Chrome and Apple Safari as browser. I would like to see websites like search engines would - since I sometimes experience that I am being treated differently as a "real human" rather than what a search engine would be served. Is…
preyz
  • 3,029
  • 5
  • 29
  • 36
0
votes
3 answers

safari extension to obtain url from address bar

I am working on a Safari Extension to obtain the url from the address bar and then send it to a mysql database. This in turn is picked by a website that displays the database content. The part where I am stuck at is how do I obtain the URL from the…
cocoacoder
  • 381
  • 8
  • 19
0
votes
1 answer

Safari extension "activate" event not dispatched when switching windows

The documentation states that "Safari 5.1 sends an "activate" event to a window or tab whenever it is activated". I use the following code in my global page to capture this event: function onWindowOrTabSwitched(event) { …
Mac_Cain13
  • 3,611
  • 2
  • 24
  • 38
0
votes
1 answer

Tab reload in Safari after extension installation

Is there any equivalent in safari extension of such a code: chrome.tabs.getSelected(null,function(tab) { chrome.tabs.reload(tab.id); }); This code comes from Chrome. I would like to put this code to the global.html. I want to…
0
votes
2 answers

Weird behaviour of visibleContentsAsDataURL

To take a snapshot of a page, I'm using the method visibleContentsAsDataURL() from the Safari extension API (based on the Snapper Safari extension ). Oddly, the method only get a snapshot of the top of the page. I'm using a event mechanism to…
xurei
  • 1,057
  • 8
  • 22
0
votes
3 answers

Automatic updating of Safari Extension is preventing publishing Extension in Safari Gallery

I'm trying uploading my Safari Extension to Gallery. Every time I did it, I get error message after a few days of waiting: During our review, we found that you still have not enabled automatic updating for your extension. Cool! But I did it,…
Mike Keskinov
  • 11,614
  • 6
  • 59
  • 87
0
votes
1 answer

Safari 5.1 extension development error -> event.userInfo returns null when it try to get selected text

I am trying to create a simple safari extension. My current version of Safari is 5.1.7 running in Snow Leopard. I have 2 documents : global.html