// Prosper Listing Forum Thread Finder script // // Purpose: // -------- // This script fires on a Prosper.com listing page to insert // hyperlinks to any forum threads that link back to the listing. // // These threads are found by Friedo's spider and (soon) by // ProsperMonkey. // // See: http://forums.prosper.com/index.php?showtopic=20911 // and http://prospers.org/wiki/user_ProsperMonkey // for more information. // // Note that this is the ajax version that pulls requests from // up to two sites besides Prosper.com // // Version History: // ---------------- // Version Date Geek Comments // ------- ------- ------ ----------------------------------- // 1.0 03/10/2007 Friedo Created. // 1.1 03/25/2007 Mr1776 Cleaned up and added documentation. // 1.2 04/06/2007 Mr1776 Modified to work with the Prosper // site update of 4/3/2007. // // Installation: // ------------- // This is a Greasemonkey user script. // // To install, you need Greasemonkey: http://greasemonkey.mozdev.org/ // Then restart Firefox and revisit this script. // // Under Tools, there will be a new menu item to "Install User Script". // Accept the default configuration and install. // // To uninstall, go to Tools/Manage User Scripts, // select "Prosper Listing Forum Thread Finder, AJAX", and click Uninstall. // // -------------------------------------------------------------------- // // ==UserScript== // @name Prosper Listing Forum Thread Finder, AJAX // @namespace http://groovy.friedo.com/prosper/ // @description Finds Prosper forum threads which link to a given listing // @include http://www.prosper.com/lend/listing.aspx?* // @include http://prosper.com/lend/listing.aspx?* // @include https://www.prosper.com/lend/listing.aspx?* // @include http://prosper.com/lend/listing.aspx?* // ==/UserScript== var sQryStr = window.location.search; var sListingID = (sQryStr.split ("=", 2))[1]; GM_xmlhttpRequest ({ method: 'GET', url: 'http://groovy.friedo.com:22181/cgi-bin/prosper.cgi' + sQryStr, headers: {'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey', 'Accept': 'text/plain'}, onload: function (zResponseDetails) { var zTargetSpan = document.getElementById ('t1'); if (zTargetSpan) { /*--- Important: Friedo's page returns html like this: ** ** ** ** **
** Forum Threads **
** ** ** ** **
** None found. **

*/ var zNewDiv = document.createElement ('div'); var sPM_Link = 'Check Prospers.org wiki' + '

Friedo.com results...
' ; var sPayload = zResponseDetails.responseText; zNewDiv.innerHTML = sPayload.replace (/()/, ("$1" + sPM_Link)); zTargetSpan.parentNode.insertBefore (zNewDiv, zTargetSpan); } } });