if( location.href.indexOf( 'etsy.com/receipt.php' ) == -1 ) { // not on a receipt page - stop working return } // find the buyer's username // it's a horrifically long set of chained methods which just work through the // page's structure to find the table with the buyer information on it i = document.getElementsByTagName( 'table' )[ ( location.search.match( 'show_panel=true' ) ) ? 22 : 21 ].getElementsByTagName( 'tr' )[ 0 ].getElementsByTagName( 'a' )[ 0 ].innerHTML; // set the location to the "convos with user" page location = 'http://www.etsy.com/convo_drop_search.php?drop_user_name=' + i;