标签:print type ++ pen interval define card func out
javascript: void(function(d) {
var objDiv = null;
var intMid = 0;
var RunMyJs = function(){
var size = $(‘div .WB_cardwrap‘).size();
if (size == 0) return;
var i = 0;
do
{
objDiv = $(‘div .WB_cardwrap‘).get(i++);
intMid = $(objDiv).attr(‘mid‘);
}while(isNaN(intMid) && i < size);
console.log(‘obj: ‘ + objDiv + ‘|mid: ‘ + intMid);
if (i == size) return;
$.ajax({
type: ‘POST‘,
url: ‘http://weibo.com/aj/mblog/del?ajwvr=6‘,
data: ‘mid=‘ + intMid,
success: function(ret) {
console.log(‘success : ‘ + intMid);
$(objDiv).remove();
window.setTimeout(function(){
RunMyJs();
}, 1000);
}
});
};
if (typeof jQuery == ‘undefined‘) {
console.log(‘load jquery...‘);
var head = document.getElementsByTagName(‘head‘)[0];
var script = document.createElement(‘script‘);
script.type = ‘text/javascript‘;
script.src = ‘http://code.jquery.com/jquery-2.1.4.min.js‘;
head.appendChild(script);
}
var val = window.setInterval(function() {
if (typeof jQuery != ‘undefined‘) {
window.clearInterval(val);
console.log(‘jQuery is not undefined, means load.‘);
RunMyJs();
}
}, 500);
}(document));
标签:print type ++ pen interval define card func out
原文地址:https://www.cnblogs.com/hookjc/p/13182980.html