I am experienced in HTML and JavaScript but have never made a (real) Chrome Extension (other than the "Hello World' tutorial).
What I want to do is make an extension that adds functionality to viewing images. Basically I want a pieice of JavaScript to load when you go to a .jpg, .png, ect. page.
I couldn't get much out of the "Hello World" tutorial or the Docs and I've looked at code from XML Tree, but I'm having trouble understanding it.
I don't know where to go from here.
Since you're experienced in JavaScript and HTML, tell you what the best source is?
http://developer.chrome.com/extensions/getstarted.html
Documentation
The above link (Chrome Extension Documentation) is so simple to read once you get a hang of it. For example, I didn't know JavaScript when I created my first Chrome Extension (Reload all tabs). I recommend you to read the docs (will only take you an hour), and follow the steps that you need.
- Make sure you understand the different UI's you can tap to
-
Browser Actions: You use browser actions to put icons in the main Chrome toolbar.
-
Context Menus: You use context menus to add items to Chromes context menu.
-
Desktop Notifications: Use desktop notifications to notify users that something is important.
-
Option Pages: If you want an options page, this is your guy!
-
Page Actions: If you want to override certain pages (New Tab, History, Bookmark Manager)
- Make sure you realize there are many browser interactions that you can tap into:
-
Bookmarks: Access to your bookmarks
-
Cookies: Access to Cookies
-
History: Access to History
-
Management: Access to Extension Management
-
Tabs: Access to your Tabs
-
Windows: Access to your Windows (which has Tabs).
- Make sure you understand the difference between Background Pages and Content Scripts, and their limitations.
- Make sure you realize there are some neat functions in the Chrome.* API.
- Make sure you understand permissions.
- Many more
145 Chrome Questions I answered on Stackoverflow
If you want more examples, I have answered many questions regarding Chrome Extensions that might help you get started (145+ Questions Answered), for example, here are some of the more recent ones:
-
Content Script Skeleton
- Send data from Background Page to Content Script
-
Communication with the embedding page, Simple fetching of the pages JS variable
- Taking Screenshots in Chrome
- Walkthrough building an extension
- Executing JavaScript when a user clicks on a browser action.
- How to capture selected text and send it to a web service
- Walkthrough how to create an extension to access Disqus Comment Box
- Walkthrough how to highlight the DIV that the mouse if hovering over
- Walkthrough how to move to the top of the page extension
- Walkthrough how to create a bubble overlay when you select text.
- etc and 120 more answers for Chrome Extensions, the above is what I copied from the results on the first page. So a search in Google will get you many results.
Real open source extension I created
If you want to see real source code of the extensions I have written (some are super small, some are super big):
- Reload all tabs extension
- Open link in a foreground tab extension
- HTML5 Haptics Chrome extension
- Set Wallpaper extension
- Prayer times extension
- Facebook friend exporter extension
- Proxy Anywhere extension
Resources
If you still want more resources, you can:
- Read the documentation.
- Read the Official Chromium Extension Mailing list
- The unofficial Internet Relay Chatroom #chromium-extensions on irc.freenode.net
- Google (Will bring you to Stackoverflow, or Quora)
I hope this helped!