safari-extension

Safari Extension Popover Links

最后都变了- 提交于 2019-12-05 08:05:26
Is it possible to have a link work in a Safari popover? I've done just about everything I can think of, but it appears that the adding links to popovers only changes the appearance, and doesn't result in anything clickable, either with href or onclick. Dmitriy You can add onclick listener on href or div .onclick = safari.application.activeBrowserWindow.openTab().url = "http://www.yourdomain.com/"; var link = document.querySelector('#~~~'); link.addEventListener("click", function(event) { safari.application.activeBrowserWindow.openTab().url = "http://~~" }) 来源: https://stackoverflow.com

jQuery access table inside a frame

空扰寡人 提交于 2019-12-04 18:25:33
I've got a problem. I want to select an element inside a frame (not iframe). The name of the frame is main, but I can't add an ID (complicated to explain, but not possible). How can I manipulate the data inside that frame? I already tried various different things (also from stackoverflow) but they didn't work... dodo frameset: <frameset cols="*, 165" frameborder="0" framespacing="0" border="0"> <frame frameborder="0" marginwidth="5" marginheight="5" border="0" src="game.php" name="main" /> <frame frameborder="0" scrolling="no" noresize marginwidth="7" marginheight="0" src="ad_sky.php" name="ad

Unable to run tests on Safari - Do we need dev certificate

我们两清 提交于 2019-12-04 12:15:29
I am trying to run my protractor tests on Safari. While researching, I learnt that you need not download anything in specific for Safari when using protractor because the driver comes with it. When attempting to run my tests I was getting "No Safari driver" found message. Then I installed this extension for Safari - from the link below. https://code.google.com/p/selenium/wiki/SafariDriver http://selenium-release.storage.googleapis.com/index.html?path=2.45/ This extension does show up on preference - Extension on Safari. While running my tests, I initially get this and then it navigates to

Executing host script from an injected page

≡放荡痞女 提交于 2019-12-03 16:13:21
I'm writing a Safari Extension that adds some functionality to a web page that I don't own. I would like for my injected JavaScript page to be able to fire some JavaScript functions the host page uses, but it doesn't work. On the Console I get the message ReferenceError: Can't find variable: function_name . My script is specified to be an End Script, so the whole page should be loaded. The function is also called from an onclick() handler on the page, like so: onclick="function_name($(this).up());" I can get a reference to that page element, but when I call element.onclick() I get another

Safari doesn't detect my Extension Certificate

空扰寡人 提交于 2019-12-03 14:50:26
I have registered for the Safari Development Program and have a valid Apple ID. I've followed all the steps given by Apple. The problem is that Windows XP (Service Pack 2) does not recognize the command 'certreq', whereas the instructions said it would work on any Windows machine. However, the command 'certreq' was working on Windows Vista on the machine of my co-worker's, I downloaded the certificate (the .cer file) and installed it and Safari detected it. However, I don't have Windows Vista. I installed Windows 7 now on my machine, the command 'certreq' works and I have the Safari Extension

How to intercept a web request

雨燕双飞 提交于 2019-12-03 14:39:30
Is there something like Chromium's chrome.webRequest for Safari extensions? I went through their documentation here . The closest thing I could find was SafariBeforeNavigateEvent . This will prevent the new page load but still would send the request to the server. Moreover I don't think it will call the listeners on AJAX requests. Anyone tried something similar? We solved this problem by using "xmlhttprequest" overriding. This is our content.js . We injected content.js as start script $(document).ready(function() { var myScriptTag = document.createElement('script'); myScriptTag.src = safari

Safari Extension Questions

大憨熊 提交于 2019-12-03 12:02:48
问题 I'm in the process of building my first Safari extension--a very simple one--but I've run into a couple of problems. The extension boils down to a single, injected script that attempts to bypass the native feed handler and redirect to an http:// URI. My issues so far are twofold: The "whitelist" isn't working the way I'd expect. Since all feeds are shown under the "feed://" protocol, I've tried to capture that in the whitelist as "feed://*/*" (with nothing in the blacklist), but I end up in a

Safari Extension Questions

佐手、 提交于 2019-12-03 02:26:59
I'm in the process of building my first Safari extension--a very simple one--but I've run into a couple of problems. The extension boils down to a single, injected script that attempts to bypass the native feed handler and redirect to an http:// URI. My issues so far are twofold: The "whitelist" isn't working the way I'd expect. Since all feeds are shown under the "feed://" protocol, I've tried to capture that in the whitelist as "feed://*/*" (with nothing in the blacklist), but I end up in a request loop that I can't understand. If I set blacklist values of " http://*/* " and " https://*/* ",

Grabbing Edits from two strings

一笑奈何 提交于 2019-12-01 17:06:12
I'm going to go a bit in-depth with my problem, you can jump to the TL;DR if you don't want to read all of this What I'm trying to do I need to store a "file" (text document) which can be user-edited. If I have my original file (which could be huge) Lorem ipsum dolor sit amet and the user were to make a change: Foo ipsum amet_ sit Basically, I have the original string and the user-edited string. I want to find the differences, "edits" . To prevent storing duplicates of very large strings. I want to store the original and the "edits". Then apply the edits to the original. Kind of like data de

Grabbing Edits from two strings

廉价感情. 提交于 2019-12-01 16:19:32
问题 I'm going to go a bit in-depth with my problem, you can jump to the TL;DR if you don't want to read all of this What I'm trying to do I need to store a "file" (text document) which can be user-edited. If I have my original file (which could be huge) Lorem ipsum dolor sit amet and the user were to make a change: Foo ipsum amet_ sit Basically, I have the original string and the user-edited string. I want to find the differences, "edits" . To prevent storing duplicates of very large strings. I