Bookmarklet

Bookmarklet

A bookmarklet is an applet, a small computer application, stored as the URL of a bookmark in a web browser or as a hyperlink on a web page. The term is a portmanteau of the terms "bookmark" and "applet".

Whether bookmarklet utilities are stored as bookmarks or hyperlinks, they are designed to add one-click functionality to a browser or web page. When clicked, a bookmarklet performs some function, one of a wide variety such as a search query or data extraction. Usually the applet is a JavaScript program.

Concept

Web browsers use URIs for the href attribute of the <A> tag and for bookmarks. The first part of the URI, such as http:, file:, or ftp:, specifies the protocol and required form for the rest of the string. Browsers also implement a prefix javascript: that to a parser is just like any other URI. Internally, the browser sees that the protocol is "javascript", treats the rest of the string as javascript code which is then executed, and uses the resulting string as the new page.

The executing script has access to the current page, which it may inspect and change. If the script returns an undefined type rather than a string, the browser will not load a new page, with the result that the script simply runs against the current page content. This permits in-place font size and color changes, for example, without a page reload.

Usage

Bookmarklets are saved and used as normal bookmarks. As such, they are simple "one-click" tools which add functionality to the browser. For example, they can:

* Modify the appearance of a web page within the browser ("e.g.", change font size, background color, etc.).
* Extract data from a web page ("e.g.", hyperlinks, images, text, etc.).
* Query a search engine, with search term(s) provided by previously selected text, or by a dialog box.
* Submit the current page to a link validation service, or translation service.
* Set commonly chosen configuration options when the page itself provides no way to do this.

"Installation of a bookmarklet" is performed by creating a new named bookmark in the toolbar, following the browser's procedure, and pasting the code into the URL destination field. The bookmarklet can then be run by loading the bookmark normally.

History

Steve Kangas of [http://www.bookmarklets.com/ www.bookmarklets.com] coined the term "bookmarklet," which he started to create based on an idea suggested in the Netscape JavaScript Guide. The term favelet was used early on by Tantek Çelik on 6 September 2001 (personal email). Brendan Eich, who developed JavaScript at Netscape, gave this account of the origin of bookmarklets:

quote|They were a deliberate feature in this sense: I invented the javascript: URL along with JavaScript in 1995, and intended that javascript: URLs could be used as any other kind of URL, including being bookmark-able.

In particular, I made it possible to generate a new document by loading, "e.g." javascript:'hello, world', but also (key for bookmarklets) to run arbitrary script against the DOM of the current document, e.g. javascript:alert(document.links [0] .href). The difference is that the latter kind of URL uses an expression that evaluates to the undefined type in JS. I added the void operator to JS before Netscape 2 shipped to make it easy to discard any non-undefined value in a javascript: URL.|Brendan Eich|email to Simon Willison [ [http://www.sitepoint.com/blogs/2004/04/09/bookmarklets/#comment-3424 Email from Brendan Eich] Sitepoint.com. Simon Willison "(Skunk)", April 10th, 2004. Retrieved 2007-04-22.]

See also

* Greasemonkey
* iMacros

References

External links

;Resources
* [http://www.bookmarklets.com Bookmarklets Home Page]
* [https://www.squarefree.com/bookmarklets/ Jesse's Bookmarklets Site] ;Information
* [http://www.pcmag.com/print_article2/0,1217,a=116252,00.asp Bookmarklets Boost Web Surfing] , " [http://pcmag.com PC Magazine] ", Tara Calishain, 2004-03-04. Retrieved 2007-08-31.
* [http://www.collaboration20.com/wiki/show/Web+2.0+Glossary Web 2.0 Glossary]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Bookmarklet — Saltar a navegación, búsqueda Un bookmarklet es un marcador que, en lugar de apuntar a una dirección URL, hace referencia a una pequeña porción de código JavaScript para ejecutar ciertas tareas automáticamente, como por ejemplo: Cambiar el diseño …   Wikipedia Español

  • Bookmarklet — Ein Bookmarklet (auch: Favelet) ist ein kleines in JavaScript geschriebenes Makro, das als Bookmark abgespeichert wird und dadurch die Funktionen eines Webbrowsers erweitert. Es erlaubt beispielsweise, Aussehen oder Funktionalität von Webseiten… …   Deutsch Wikipedia

  • Bookmarklet — Un bookmarklet (en français : signapplet [1] (Québec), applisignet, marque page scripté) est un petit programme JavaScript pouvant être stocké : soit en tant qu URL dans un signet avec la plupart des navigateurs Web soit en tant qu… …   Wikipédia en Français

  • Bookmarklet — …   Википедия

  • bookmarklet — noun A small piece of JavaScript code stored as a URL within a bookmark. Syn: favelet …   Wiktionary

  • bookmarklet — ● ►en n. f. ►WEB Petite application (aussi connues sous le nom d applet ou applette), souvent écrite en Javascript (ou un de ses cousins), et contenue dans un bookmark …   Dictionnaire d'informatique francophone

  • Applisignet — Bookmarklet Un bookmarklet (en français : un applisignet, ou un marque page scripté) est un petit programme JavaScript pouvant être stocké : soit en tant qu URL dans un signet avec la plupart des navigateurs Web soit en tant qu… …   Wikipédia en Français

  • Favelet — Bookmarklet Un bookmarklet (en français : un applisignet, ou un marque page scripté) est un petit programme JavaScript pouvant être stocké : soit en tant qu URL dans un signet avec la plupart des navigateurs Web soit en tant qu… …   Wikipédia en Français

  • Bookmarklets — Ein Bookmarklet (auch: Favelet) ist ein kleines in JavaScript geschriebenes Makro, das als Bookmark abgespeichert wird und dadurch die Funktionen des Browsers erweitert. Es erlaubt beispielsweise, Aussehen oder Funktionalität von Webseiten zu… …   Deutsch Wikipedia

  • Favelet — Ein Bookmarklet (auch: Favelet) ist ein kleines in JavaScript geschriebenes Makro, das als Bookmark abgespeichert wird und dadurch die Funktionen des Browsers erweitert. Es erlaubt beispielsweise, Aussehen oder Funktionalität von Webseiten zu… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”