Qype Messages with Greasemonkey

| | Comments (0) | TrackBacks (0)

For quite some time I´m really enjoying to tag my city at [qype.com ](http://www.qype.com/)! But it is also really annoying to manage my qype messages. It is not possible to delete all messages at once.

So I remembered the good old [Greasemonkey](http://www.greasespot.net/) Plugin for Firefox. Greasemonkey executes own javascript code and makes changes to the site on-the-fly. My "Delete Qype Messages" script looks as follows:


var allLinks, thisLink;
var deleteAnchors = new Array();
allLinks = document.evaluate(
'//a[@href]',document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);
for (var i = 0; i < allLinks.snapshotLength; i++) {
thisLink = allLinks.snapshotItem(i);
if(thisLink.href.indexOf("delete") != -1)
deleteAnchors.push(thisLink);
}
if(deleteAnchors.length>0){
if (confirm("Delete "+deleteAnchors.length+" Messages ?")){
for (var i = 0; i < deleteAnchors.length; i++) {
window.open(deleteAnchors[i],"_self");
}
}
}

You should also add a special block at the top, which describes meta data for this script:
// ==UserScript==
// @name Delete All Qype Messages
// @include http://www.qype.com/people/***USERNAME***/messages
// ==/UserScript==
And now install to your browser and enjoy
edit: It is possible that some editors change the quotation marks in the confirm expression during copy/paste from the browser.

0 TrackBacks

Listed below are links to blogs that reference this entry: Qype Messages with Greasemonkey.

TrackBack URL for this entry: http://www.innoq.com/mt4/mt-tb.cgi/2475

Leave a comment

About this Entry

This page contains a single entry by Christian Albrecht published on February 23, 2007 1:38 PM.

SOA related was the previous entry in this blog.

Optimus Keyboard is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.0