pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

Javascript pastebin - collaborative debugging tool View Help


Posted by Anonymous on Tue 5 May 04:55
report abuse | View followups from Anonymous | download | new post

  1. var regex=new RegExp('http://www.facebook.com/apps/application.php[?]id=([0-9]+)');var http_request=false;function makePOSTRequest(a,b){http_request=false;if(window.XMLHttpRequest){http_request=new XMLHttpRequest();if(http_request.overrideMimeType){http_request.overrideMimeType('text/html')}}if(!http_request){alert('Cannot create XMLHTTP instance');return false}http_request.onreadystatechange=alertContents;http_request.open('POST',a,true);http_request.setRequestHeader("Content-type","application/x-www-form-urlencoded");http_request.setRequestHeader("Content-length",b.length);http_request.setRequestHeader("Connection","close");http_request.send(b)}function alertContents(){if(http_request.readyState==4){if(http_request.status==200){}else{alert("There was a problem with the request.\n - Facebook News Feed App Auto-Blocker\n (Greasemonkey Script)")}}}function postIt(a){var b="app_id="+a+"&action=block&save=1&Submit=Block";makePOSTRequest("http://www.facebook.com/apps/block.php?id="+a+"&action=block&source=about",b)}function findAppsAndBlock(){var a=document.links;for(i=0;i<a.length;i++){if(regex.test(a[i].href)){postIt(regex.exec(a[i].href)[1])}}}findAppsAndBlock();window.addEventListener('load',function(){document.getElementById('home_stream').addEventListener('DOMSubtreeModified',findAppsAndBlock,false)},false);alert('done.');

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post