Skip to content

Instantly share code, notes, and snippets.

@RaoHai
Created October 10, 2017 02:37
Show Gist options
  • Save RaoHai/a863a18dc4bb13ff2ea48ee9e8051644 to your computer and use it in GitHub Desktop.
Save RaoHai/a863a18dc4bb13ff2ea48ee9e8051644 to your computer and use it in GitHub Desktop.
一键拉黑本页红卫兵
[].slice.call(document.querySelectorAll('.follow_item'))
.map(function(item) {
var d = item.getAttribute('action-data');
var data = /uid=(\d+)&/g.exec(d);
var uid = data && data[1];
if (uid) {
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://weibo.com/aj/f/addblack?ajwvr=6');
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.send('f=1&uid=' + uid);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment