Advanced Element Grabber ($g)

By JoeSimmons Last update Jun 10, 2010 — Installed 708,773 times.


Script Summary: Advanced Element Grabber by JoeSimmons. Supports ID, Class, and XPath (full with types) in one query. Supports multiple id/class grabs in one query (split by spaces), and the ability to remove all nodes regardless of type

Version: 1.0.61

Copyright: JoeSimmons

License: Creative Commons Attribution-Noncommercial 3.0 United States License

Script homepage

Google Homepage/Searchpage Syntax Examples

$g("#gbar"); // Grab the links bar
$g("id('gbar')"); // Grab the links bar
$g("//*[@id='gbar']"); // Grab the links bar
$g("//a | //cite" , {del:true}); // Deletes all links
//alert('Head element text:\n'+$g("//head", {type:2})); // Alerts the text of the head element
//alert('Number of span elements: '+$g("count(//span)", {type:1})); // Alerts the number of span elements
$g(".gac_m .gl .s .r #ghead #user #footer", {del:true}); // Removes a bunch of stuff on a search page


Donate!