Extension

36 views
Skip to first unread message

Alyssa Reimold

unread,
Mar 6, 2017, 11:42:37 AM3/6/17
to Chromium-Extensions-Announce
I attempted to make my first extension. All I want is an icon extension that sits on the browser bar that links directly to a website. However, when I click on mine, it looks like an app.  A box opens up and doesn't directly take you to the website.  When the app is open, you can't click on any of the website pages. So essentially, it's just a picture of the front of the website with no functionality.

Any ideas on how to make this work? Also, is there an easier way.  I want the entire building to have this extension on their browser and then they can click on the icon and it will take them to the website that has building information. We are trying to systematically place it all in one spot for staff/students.  I'm sure we could push out a shortcut to the website for laptop desktops, but that won't help all students who use chromebooks.  

Any help would be fantastic.

Thanks!
A

Conrad Irwin

unread,
Mar 6, 2017, 3:41:59 PM3/6/17
to Alyssa Reimold, Chromium-Extensions-Announce
Hi Alyssa,

You should be able to make this work using the browserAction api and the chrome.tabs API to open a new tab when the user clicks the button:

chrome.browserAction.onClicked.addListener(function(tab) {
  chrome.tabs.create({
    windowId: tab.windowId,
    index: tab.index + 1,
    url: "https://example.com",
    active: true
  })
});

With regards to provisioning this to everyone — I've never done it, but it's definitely possible. There are some pointers here: https://support.google.com/chrome/a/answer/6306504?hl=en

Conrad

Sent via Superhuman


--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsubscribe@chromium.org.
To post to this group, send email to chromium-extensions@chromium.org.
Visit this group at https://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/7cbef94d-f902-4089-bbb0-826e3185be55%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Alyssa Reimold

unread,
Mar 19, 2017, 7:45:32 AM3/19/17
to Chromium-Extensions-Announce
Thanks Conrad. Will I have to take any code out after I input this piece in? I'm specifically thinking about whatever code makes the extension its own standalone window when you click it (which is more like and app).

I'm new to all of this. Obviously. :) Once I get this working it will help a whole organization.

Thanks!
A

Conrad Irwin

unread,
Mar 20, 2017, 2:01:35 AM3/20/17
to Alyssa Reimold, Chromium-Extensions-Announce
Hi Alyssa, 

It should be relatively little code. Just a manifest file, an icon, and the code in my first email. I've put an example version of what you want on GitHub: https://github.com/ConradIrwin/browser-action-open 

Best of luck,

Conrad

Sent via Superhuman


--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsubscribe@chromium.org. To post to this group, send email to chromium-extensions@chromium.org. Visit this group at https://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/d684e510-5349-46de-8aab-92939cf2402f%40chromium.org. For more options, visit https://groups.google.com/a/chromium.org/d/optout.


Reply all
Reply to author
Forward
0 new messages