Yeah, but it is a little more problematic than with Greasemonkey, because there is no "unsafeWindow", so you cannot even get to the built in Greasemonkey API GMail has.
☆PhistucK On Thu, Dec 24, 2009 at 08:10, Mohamed Mansour <m...@chromium.org> wrote: > It isn't a lot of work, whatever you can do with GreaseMonkey, you can do > almost all of it with Chrome. There are many extensions in the gallery that > extend Gmail by simply using Content-Scripts. > > http://code.google.com/chrome/extensions/content_scripts.html > <http://code.google.com/chrome/extensions/content_scripts.html> > -Mohamed Mansour > > > > On Thu, Dec 24, 2009 at 12:59 AM, FractalBob <ruom...@gmail.com> wrote: > >> Seems like a lot of work just to create a button. I can only imagine >> what it would take to implement my Thunderbird add-on in Chrome! >> >> I guess the Chrome extensions aren't quite ready for prime time. I'll >> check back in a year or two. >> On Dec 21, 12:39 am, PhistucK <phist...@gmail.com> wrote: >> > Maybe try to execute something like that - >> > inject.js - >> > var GMonkey; >> > if (gmonkey) >> > { >> > gmonkey.init("undefined",function (api) { GMonkey = api }); >> > // Find out the ID of the object you >> > // want using GMonkey, reference here - >> > // >> http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API >> > // element = gmail.getNavPaneElement(); >> > // >> > // Find the actual ID or class name, or whatever >> > // identifier that can help you later track it down >> > // again, using this example - >> > // >> > // elementIdentifier = element.id; >> > // elementIdentifierType = "ID"; >> > // Or >> > // elementIdentifier = element.className; >> > // elementIdentifierType = "className"; >> > // Or however you choose. >> > hiddenSpan = document.createElement("HIDDENSPAN"); >> > hiddenSpan.id = "hidden-span"; >> > hiddenSpan.style.display = "none"; >> > hiddenSpan.innerText = elementIdentifier; >> > hiddenSpan.setAttribute("type",elementIdentifierType); >> > document.body.appendChild(hiddenSpan); >> > >> > } >> > >> > Then in the content script JavaScript file - >> > script = document.createElement("script"); >> > script.src = chrome.extensions.getUrl("inject.js"); >> > script.onload = doStuff; >> > document.body.appendChild(script); >> > var requestedElement >> > function doStuff() >> > { >> > element = document.getElementById("hidden-span") >> > if (element.getAttribute("type") == "ID") >> > requestedElement = document.getElementById(element.innerText); >> > else >> > requestedElement = document.getElementsByClassName(element.innerText); >> > >> > } >> > >> > Does it work? >> > >> > ☆PhistucK >> > >> > >> > >> > On Mon, Dec 21, 2009 at 03:32, FractalBob <ruom...@gmail.com> wrote: >> > > Hi, >> > >> > > I want to extend Gmail and that includes creating a button in a >> > > specific position on the page. I know, visually, where I want it to >> > > go, but I'm having trouble translating the UI element to the stuff the >> > > DOM inspector/Developer tool displays. Any guidance would be very much >> > > appreciated. >> > >> > > Bob >> > >> > > -- >> > >> > > You received this message because you are subscribed to the Google >> Groups >> > > "Chromium-extensions" group. >> > > To post to this group, send email to >> chromium-extensi...@googlegroups.com. >> > > To unsubscribe from this group, send email to >> > > chromium-extensions+unsubscr...@googlegroups.com<chromium-extensions%2bunsubscr...@googlegroups.com><chromium-extensions%2Bunsu >> bscr...@googlegroups.com> >> > > . >> > > For more options, visit this group at >> > >http://groups.google.com/group/chromium-extensions?hl=en. >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> "Chromium-extensions" group. >> To post to this group, send email to chromium-extensions@googlegroups.com >> . >> To unsubscribe from this group, send email to >> chromium-extensions+unsubscr...@googlegroups.com<chromium-extensions%2bunsubscr...@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/chromium-extensions?hl=en. >> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Chromium-extensions" group. > To post to this group, send email to chromium-extensi...@googlegroups.com. > To unsubscribe from this group, send email to > chromium-extensions+unsubscr...@googlegroups.com<chromium-extensions%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/chromium-extensions?hl=en. > -- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to chromium-extensi...@googlegroups.com. To unsubscribe from this group, send email to chromium-extensions+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.