Open external application from the extension

1,096 views
Skip to first unread message

Tanel Tammik

unread,
May 17, 2014, 5:25:17 PM5/17/14
to chromium-...@chromium.org
Hello,

i'm looking some info on how to open external applications from chrome extension. 

Can i get some help from here?

I managed to write a extension, which adds new context menu on the right click. i need to crab the link i'm clicking, which i can do, and then open external application. 

Is it possible?

var parent = chrome.contextMenus.create({
    'title': 'Open stream',
    'contexts': ['link'],
    'onclick': function(info, tab) {
        alert(info.linkUrl) // run a shell command here
    }
});

Joe Marini

unread,
May 17, 2014, 5:39:22 PM5/17/14
to Tanel Tammik, Chromium-extensions
Extensions cannot invoke arbitrary shell commands. That's a huge security hole.



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/f9971c4e-0684-4b83-bab7-28efd0ca7ba4%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.



--
Joe Marini
Developer Advocate - Google

Tanel Tammik

unread,
May 17, 2014, 5:52:08 PM5/17/14
to chromium-...@chromium.org, Tanel Tammik
i'm developing this extension for my personal use only. 

Is it possible to download the link i'm clicking into specified directory?

Tanel


On Sunday, May 18, 2014 12:39:22 AM UTC+3, Joe Marini wrote:
Extensions cannot invoke arbitrary shell commands. That's a huge security hole.

On Sat, May 17, 2014 at 2:25 PM, Tanel Tammik <keev...@gmail.com> wrote:
Hello,

i'm looking some info on how to open external applications from chrome extension. 

Can i get some help from here?

I managed to write a extension, which adds new context menu on the right click. i need to crab the link i'm clicking, which i can do, and then open external application. 

Is it possible?

var parent = chrome.contextMenus.create({
    'title': 'Open stream',
    'contexts': ['link'],
    'onclick': function(info, tab) {
        alert(info.linkUrl) // run a shell command here
    }
});

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.

Joe Marini

unread,
May 17, 2014, 6:16:01 PM5/17/14
to Tanel Tammik, Chromium-extensions
If all you want to do is download the link content, you can use the Downloads API or use the filesystem API. You can also use Native Messaging to send a message to your own native app on the machine.



To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.

To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
Reply all
Reply to author
Forward
0 new messages