safari-extension

Safari Extension Popover Links

谁说我不能喝 提交于 2019-12-07 04:26:45
问题 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. 回答1: You can add onclick listener on href or div .onclick = safari.application.activeBrowserWindow.openTab().url = "http://www.yourdomain.com/"; 回答2: var link = document.querySelector('#~~~'); link.addEventListener("click", function(event) {

-webkit-transform CSS Properties Hose Font Rendering

拜拜、爱过 提交于 2019-12-07 04:06:33
问题 This question is pretty much the same as this one except that I'm seeing it exclusively in Safari on Mac (the only platform I need to care about). It's definitely CSS-related and I think I've narrowed it down to a few properties which seem to wreak havoc on the way text is rendered. They are: -webkit-transform-style: preserve-3d; -webkit-transform: rotateY(180deg); -webkit-transform: rotateY(180deg); -webkit-perspective: 2500; As soon as I disable these (by prefixing them with an "x", e.g. x

jQuery access table inside a frame

佐手、 提交于 2019-12-06 14:24:14
问题 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" />

How to port a Chrome extension to another Web Browsers [closed]

有些话、适合烂在心里 提交于 2019-12-06 06:47:53
Closed . This question needs to be more focused . It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 2 years ago . I wanted to know the best way to bring a Chrome extension on another browser, use Crossbrowser , re-coding is not an option as its very large. the best way to port a chrome extension is to look into WebExtension: https://wiki.mozilla.org/WebExtensions https://developer.mozilla.org/en-US/Add-ons/WebExtensions Firefox already is on its way to support it: https://blog.mozilla.org

Safari extension messaging

我的未来我决定 提交于 2019-12-06 06:23:46
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.getElementById('local_login').style.display=''; document.getElementById('local_login_link').style.display = 'none

/How to get active Tab url in safari browser using java script

浪尽此生 提交于 2019-12-06 04:26:25
How to get the browser window or active tab url using java script in a safari browser ? I tried to do it using -> document.url window.location.href But both this solutions are giving me so many urls . I dont know why ? Also I have searched that safari.application.browserWindow.activeTab gives obj of current active window . But I dont know which methods are provided by activeTab class If anyone knows , plz help me . Thanks in advance. If you just want the URL of the "top" document in the current tab, you can use safari.application.activeBrowserWindow.activeTab.url from within your extension's

Get URL and page title data from SafariNavigateEvent

≡放荡痞女 提交于 2019-12-06 03:45:15
I am debugging something for a colleague who is on holiday and know very little about Safari Extension development. I have a Safari extension that listens for 'open', 'beforeNavigate', 'navigate' and 'activate' events. When any of these events are fired I want to track the activeTab's url and page title. It seems however that in certain instances (namely beforeNavigate and navigate when a new tab is opened) the page title isn't always defined in either the safari.application.activeBrowserWindow.activeTab object or the event object passed to my handlers. When I print the event object out to the

Safari Extension Taking Screenshot

旧巷老猫 提交于 2019-12-06 02:49:41
问题 I am developing safari browser extension which should have taking screenshot functionality. Chrome and Firefox has their own apis to take SS of the current window document. I could not find any safari specific/API documentation for it. The Windows and Tabs API What would be the best way to achieve it? 回答1: SafariBrowserTab has a visibleContentsAsDataURL method to get the image data of the currently visible content. For example, in your global page: safari.application.addEventListener('command

How to reload a Safari Extension from the command line?

强颜欢笑 提交于 2019-12-05 16:38:57
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 googling hopelessly I tried using this AppleScript: tell application "System Events" tell process "Safari" click the button "Reload" of window "Extension Builder" end tell end tell Which errors out with: System Events got an error: Can’t get button "Reload" of window "Extension Builder" of process "Safari". And this variation: tell application "System

Using Selenium Webdriver and Safari

天大地大妈咪最大 提交于 2019-12-05 15:53:36
I am working on Selenium Webdriver C# using Visual Studio Express 2012. I installed the latest safari browser and I create the developer certificate for extension from Apple and I built the extension and install it. But even after that, I am not able to send the URL to the browser. The browser is launched successfully, but after that I didn't get any logs. The error message is: Additional information: Did not receive a connection from the Safari extension. Please verify that it is properly installed and is the proper version. The code that I use : IWebDriver driver = new SafariDriver(); driver