I did a little script for Tampermonkey to help me browse tumblr notes without a flick of a click or look at the “user liked” spam.
$('.more_notes_link').click(function() {
var LoopCount = 10;
var i = 0;
clearInterval(loadNotesInterval);
var loadNotesInterval = setInterval(function() {
if ($('.more_notes_link').length ) {
$('.more_notes_link').click();
i++;
console.log(i);
if (i >= LoopCount) {
clearInterval(loadNotesInterval);
}
}
else
{
clearInterval(loadNotesInterval);
}
}, 1000)
});
GM_addStyle ( ".notes .note.without_commentary{display:none} .notes .note.reply{display:inline}" );
For some reason, however, it just works fine when it starts up once, writing down numbers from 1 to 10, and then stopping ... And then it doesn't work anymore. There is no console output, no cycles, and it only clicks once.
I tried and refused it several times, so I thought that finally I would just ask if anyone could fix my problem. I can’t figure it out myself.
EDIT: console.log , , script . - , .more_notes_link , , .