I've recently been perusing Freecycle to see what bargains come up.
Part of the problem with browsing the lists is that all the "wanted" and "offered" posts are mixed in together and there doesn't seem to be a way to show just either one....or am I just being stupid?
Anyway, I wrote a GM script to hide all the "wanted" requests so I could just see what is being offered and what has been taken. Freecycle joy!
Here it is for anyone else who would find it useful:
// ==UserScript==
// @name Freecycle - hide wanted
// @namespace [url]http://ukbouldering.com/gm/[/url]
// @description Hides wanted requests from the freecycle yahoo groups message listings
// @include [url]http://groups.yahoo.com/group/Sheffield-FreeCycle/messages[/url]*
// @include [url]http://groups.yahoo.com/group/Sheffield-FreeCycle/messages/[/url]*
// ==/UserScript==
var allTDs, thisTD, lc, pn;
allTDs = document.evaluate(
"//td[@class='message']",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < allTDs.snapshotLength; i++) {
thisTD = allTDs.snapshotItem(i);
// do something with thisTD
lc = thisTD.textContent.toLowerCase();
if (lc.indexOf('wanted')>= 0) {
pn = thisTD.parentNode;
pn.parentNode.removeChild(pn);
}
}
edit: damn forum software is automatically putting [url] tags into the namespace/include meta-data - remove them before using...