Skip to content

Instantly share code, notes, and snippets.

@t-ashula
Created November 22, 2009 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t-ashula/240634 to your computer and use it in GitHub Desktop.
Save t-ashula/240634 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name - Twitter List Delete
// @include http://twitter.com/*
// @author - t.ashula
// ==/UserScript==
(function(){
opera.addEventListener(
'BeforeScript',
function(e){
if ( e.element.src.match(/javascripts\/lists.js/ ) ) {
opera.postError('patch lists.js');
var r1 = /else{E\+="\/"\+K}\$.ajax\({type:H,/; if ( r1.test(e.element.text) ) { opera.postError('R1 match ok'); }
var r2 = /,type:"DELETE",dataType:"json",data:{a/g; if ( r2.test(e.element.text) ) { opera.postError('R2 match ok'); }
e.element.text = e.element.text
.replace(r1, "else{J['_method']='delete';E+=\"/\"+K}$.ajax({type:'POST',")
.replace(r2, ",type:'POST',dataType:'json',data:{_method:'delete',a");
}
},
false
);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment