safari-extension

Copy window.location.href to clipboard from extension

試著忘記壹切 提交于 2019-12-11 19:48:45
问题 I am trying to copy 'window.location.href' e.g. the URL of the current page to clipboard from my extension. My issue is that when I copy the URL to clipboard, it is the extensions URL that is copied and not the page I am visiting. Extensionbar: <!DOCTYPE HTML> <html> <head> <button onclick="copyFunction();">Copy</button> <script type="text/javascript"> function copyFunction() { var inputDump = document.createElement('input'), hrefText = window.location.href; document.body.appendChild

How to setAcceptUntrustedCertificates for Safari.

a 夏天 提交于 2019-12-11 04:59:30
问题 With version 2.30, selenium webdruiver has given in built support for Safari browser. I want to know how to handle SSL Certificates in Safari (which is installed on Windows). Below piece of code I tried but its not working: DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); capabilities.setBrowserName("SAFARI"); driver = new SafariDriver(capabilities); driver.get("https://MYDUMMYSITE"); 回答1: I have countered the

Session state persistence between web page content and XmlHttpRequest for Mac dashboard widgets and Safari extensions

风格不统一 提交于 2019-12-10 23:38:40
问题 I already posted to Apple's Safari dev forum but got no responses so thought try cross posting elsewhere to get ideas: I'm asking this question in regards to both Safari Extension (toolbar type AJAX extension) Mac OS X dashboard widget I assume both will be similar as they use the WebKit rendering engine? I would like to know if the engine for maintaining built in session state support (cookies?) shares and persists the session between web content loaded on the page by the browser engine

How can I load a NPAPI Plugin from a Safari extension?

流过昼夜 提交于 2019-12-10 21:52:49
问题 My query is similar to this global.html is unable to load NPAPI plugin from safari-extension builder but its loading from the direct link. How can I load a NPAPI Plugin from a Safari extension? 回答1: The simple answer is that you can't. Unlike firefox and chrome extensions, Safari extensions don't allow you to embed npapi plugins in them. 回答2: You can create toolbar in Safari extension Load npapi to the toolbar On start extension make it invisible Get toolbar object Get plugin object from

Chrome/FF/Safari extension: Load hidden web page in incognito-like mode

别等时光非礼了梦想. 提交于 2019-12-10 12:00:42
问题 Is it possible to build an 'incognito mode' for loading background web-pages in a browser extension? I am writing a non-IE cross-browser extension that periodically checks web-pages on the user's behalf. There are two requirements: Page checks are done in the background, to be as unobtrusive as possible. I believe this could be done by opening the page in a new unfocussed browser tab, or hidden in a sandboxed iframe in the extension's background page. The page checks should operate in

Safari extension messaging

喜夏-厌秋 提交于 2019-12-10 11:32:30
问题 I have been working on a Safari extension and have hit a wall. I cannot figure out how to send multiple lines of data from global to the inject. I have been searching for a while on this site and others and only have found bits and pieces, but when combined fail. Heres what I need to get out of Global safari.extension.secureSettings.username; safari.extension.secureSettings.password; I've tried puting them into global variables but the inject doesn't see those. inject code document

Where is the details of extension of Safari 8 is stored in Yosemite(Mac OS 10.10)

余生颓废 提交于 2019-12-10 10:44:42
问题 I want to install the safari extension in Safari v8 in Yosemite(Mac OS 10.10) by programmatically. As in safari v5,v6,v7 for extension details, safari maintain Extensions.plist which is stored at ~/Library/Safari/Extensions/Extensions.plist. But in safari v8 there is no information in Extensions.plist for installed extensions like extension is enabled or not. So is there anyone who knows how safari v8 stores its Extensions information and where? 回答1: Since safari 6.2, 7.1 and 8.0 it is stored

content blocker works in simulator but does not work in iPhone device

三世轮回 提交于 2019-12-08 16:25:52
问题 i am working on content blocker and block the adult site so, this code is perfect work on simulator when i test on iPhone 6 then its no one site is block Alamofire.request(url).responseJSON { response in if let data = response.data, let utf8Text = String(data: data, encoding: .utf8) { print("Data: \(utf8Text)") self.containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.domainName.contentBlocker") let path = self.containerURL?.appendingPathComponent(

How to use OAuth with Github in a Safari extension

女生的网名这么多〃 提交于 2019-12-08 10:03:00
问题 I'm new to browser extensions. i'm trying to create a Safari extension that allows me to perform basic tasks in my Github account (Create a repo, for example). I'm doing it mostly to learn how to develop extensions while practicing my JS. The issue is that in order to connect to Github I want to use OAuth, but I have no clue of how to do that. I have googled to see if I can find a library that I can use without any results. The main problem is that when trying to register my "application"

Safari Extension - Message

不打扰是莪最后的温柔 提交于 2019-12-07 23:16:01
问题 This is my first Safari extension and thus far I like it quiet a bit. I am trying to add an extension bar that interacts with an injected.js page and toggles items on the pages via the jquery .toggle(); I have been able to load jQuery into the page no issue, however when it comes to sending a message from the extension bar to the injected.js I am falling short. I have spent over 8 hours today reviewing the developer pages on Apple. The only thing I have managed to do is Extension Bar: <