TesoMayn
Boredom, it vexes me.
Just a basic userscript I literally just wrote.
I added the comments for those who are not experienced with jQuery, to help them understand the functions
I added the comments for those who are not experienced with jQuery, to help them understand the functions
Code:
// ==UserScript==
// @name DevBest Auto-like
// @namespace http://tesomayn.com/
// @version 1.0
// @description Like certain user's post automatically
// @author TesoMayn
// @match https://devbest.com/threads/*
// @grant none
// ==/UserScript==
$(document).ready(function() { // Executes when the page is loaded
var users = ['TesoMayn', 'Canadian', 'Donkjam', 'RastaLulz', 'Sledmore']; // Add users you want to autolike to this array
$.each(users, function() { // Searches each user in the array
if ($('li[data-author="'+this+'"]').length) { // Checks if user has posted
$('li[data-author="'+this+'"]').each( function() { // If user has posted, like their post
$('a.LikeLink.item.control.like',this).click();
});
var total = $('li[data-author="'+this+'"] a.LikeLink.item.control.like').length; // Generates the total number of posts liked
if ( total >= 1 ) { // If there was a new post liked
console.log('Liked '+total+' of '+this+'\'s post');
} else { // If no new post was Liked
console.log('All of '+this+'\'s post are liked');
}
}
});
});