How can I add hotkeys with Safari extension - safari

Can I listen to hotkeys with safari extension?
I want to respond to Cmd+SomeKey with action done by extension, but I've read intro on apple developer and there is nothing about hotkeys.
You can add custom buttons to the Safari toolbar, create bars of your own, add contextual menu items, display content in bars or tabs, and inject scripts and style sheets into webpages.
No single word about hotkeys, and google doesn't find any article about that. So is it possible at all? If it is possible, where can I get additional info?

It can be done -- someone helped me to set it up for my browser window resizer extension. You need to have an injected script that checks for a specific keypress/combo then send a message back to your toolbar or global page. Here's an example on github of an inject script to monitor for specific keypresses (alt-1 to alt-0) and here's an example of doing something with the message lines 92-108 & 131 of this toolbar page.

Related

how remove pdf-toolbar from edge

Help me please to show pdf-documents in edge without top pdf-panel this pdf-panel which I want to remove is at the picture. Pdf-documents are opened through hyperlinks. I searched settings and I tried to add "toolbar=0" to my hyperlinks, but without result yet.
You can add "#toolbar=0" to the URL and refresh the page.
I agree with KJ's comment. The PDF reader is built in in Edge. It's a part of Edge browser so you can't disable the PDF toolbar using code. And there's no setting to disable the toolbar.
You can only open PDF in other applications if you don't want to see the toolbar. Besides, you can also provide your suggestion as a feature request to suggest the Edge team to add a setting to disable the PDF toolbar. You can send the feedback through the Microsoft Edge Insider forum.
Press F8 and then Read mode under page view icon, or just Ctrl + H

Is it possible to use a textarea for a Safari extension settings?

I've made a couple small Safari extensions. For one of them, I would like to collect a set of user-entered strings (e.g., URLs or URL patterns) using a textarea in the settings screen. The only setting types offered in the documentation are one line text, check box, slider, select lists, and radio buttons. I could use a one line text field as an ugly workaround, but I'm hoping there's a better option. I've googled for hints and looked through Safari extensions in GitHub, but haven't found an example of anyone doing this yet.
Does anyone have an example of how to use a textarea for a Safari extensions setting? Is there an undocumented feature I've not been able to find? Or is there a way to trigger a custom popup window from the settings?
Thanks for any tips.
No, there is no way to build a more complex UI inside the settings dialog. What extensions typically do is add a button (checkbox, even if it's not quite the correct element) in the settings page which then launches a separate Safari page which contains the full settings UI, written in HTML.
For an example of this, install uBlock and take a look at how it launches its setting UI.

Does Magnific Popup support custom events/buttons

I know Magnific Popup supports certain events such as Close, Next, etc. out of the box. But does Magnific support custom buttons and events if I wanted to add my own event hooks, such as Download, email, buy, or whatever button I wanted to created. I'm really just looking to be able to create my custom menu within the image 'div' area or directly beneath it. An example somewhere would be great. I just haven't been able to find any.
Before starting I would recommend reading the Magnific Popup Documentation
and familiarizing yourself with the available examples, more specifically the Pin it button example.
Naturally, you will have to code out the functionality of your menu items as you need them.
For the how to's on the specifics of your buttons you will have to do more specific searching as it does not appear that there is a built in
magic(click, poof)
{
//amazing things happen
}
function.
Good luck!

How do I add buttons to Aero Peek in VB6?

I'm working on a program that can play songs off an iPod. I want to be able to put functional Back, Play/Pause and Next buttons on its Aero Peek thumbnail like this:
For those who can't see it: http://i45.tinypic.com/1yua0m.png
How would I do this in VB6?
EDIT: Can I also create a jump list for my app? For this app, I only need taskbar jump lists. For others, I'll need taskbar and start menu jump lists so posting code to achieve both would be appreciated.
EDIT 2: I have uploaded a sample of how to use the ITaskBarList3 interface to add buttons to the window preview (and handle their click events), add an icon overlay, clip the window preview and add a progress bar to the program's taskbutton. Download it here.
Look at the Taskbar Thumbnail Toolbar feature of Windows Explorer. This does use a COM interface so I don't know how practical it is to use for VB but I beliver the IDLs are available if you look.
You can also find a C# example and the UI guidelines on MSDN.
The Jumplist information is also covered on the same pages.

Menu bar button panels in Cocoa?

When I click on buttons in the menu bar (such as "About Program") when the program is running a new window pops up displaying information. How do I edit the windows associated with the buttons?
In Interface builder I manage to load "Main Menu" which allows me to customize the menu bar, but it doesn't allow me to work with the windows associated with the buttons. How would I edit these windows?
Mac OSX Snow Leopard, Xcode 3.2.6
EDIT: I am not specifically asking for steps for the "About Panel". I am looking for a general procedure for editing panels associated with buttons in the menu bar. In addition to the "About" panel I would also want to work with panels such as the "Help" panel. The "About" panel was just an example.
The standard About panel isn't in your nib; it's generated within the framework.
You can change the text of the panel by writing a Credits.rtf or Credits.html file and including that in your app bundle. (You may already have Credits.rtf supplied by the project template. If so, you should just edit that.)
If you want to make more radical changes, you'll need to create your own panel and change your About menu item to show it instead.
As far as a general procedure...no, there's no single procedure that would let you customize any standard panel in the same way. They all have their own mechanisms (e.g. some can display more panes when plug-in components are installed; some provide APIs to hide or show certain parts; some, like the About box, use bundle filename conventions to decide what to do).
For the Help panel specifically...you can't change anything about it except the web page (i.e. the help content). The toolbar, etc. is all handled by Apple. I suggest looking at this documentation for more, which also links to other important documents:
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/OnlineHelp/Concepts/ComprehenHelp.html%23//apple_ref/doc/uid/20000017-BBCCFHAC