[Greasemonkey] Adding Bookmarks from GM
Dave Land
land at aol.com
Tue Sep 6 11:29:33 EDT 2005
On Sep 6, 2005, at 12:39 AM, Jeremy Dunck wrote:
> On 9/6/05, Dave Land <land at aol.com> wrote:
>
>> Good news: bringing up the bookmark dialog is a one-liner:
>>
>> window.sidebar.addPanel( document.title, location.href, '')
>>
>
> Hooray, a variant of popup ads! :)
Of course, they'd want to do it in a cross-platform way, so it becomes:
if (document.all) { # IE detected
window.external.addFavorite( location.href, document.title )
} else if ( window.sidebar ) { # Mozillan browser detected
window.sidebar.addPanel( document.title, location.href, '' )
}
What surprises me is that this *hasn't* been jumped on by spammers.
Dave
More information about the Greasemonkey
mailing list