Skip to content

Instantly share code, notes, and snippets.

@VMatrix1900
Forked from anonymous/gist:4604542
Last active August 29, 2015 14:05
Show Gist options
  • Save VMatrix1900/9c36461472050cf43521 to your computer and use it in GitHub Desktop.
Save VMatrix1900/9c36461472050cf43521 to your computer and use it in GitHub Desktop.
var sids = document.getElementsByClassName("share-item-delete");
var url="http://share.renren.com/share/EditShare.do";
for(var i=0;i<sids.length;i++){
var sid = sids[i].getAttribute("data-id");
var formData = new FormData();
formData.append('action', 'del');
formData.append('sid',""+sid);
formData.append('type', ""+nx.user.id);
formData.append('requestToken', ""+nx.user.requestToken);
formData.append('_rtk', ""+nx.user._rtk);
var xhr = new XMLHttpRequest();
xhr.open("POST",url, true);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.send(formData);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment