I've finally decided to solve an issue with my YGP RRs management..
When we reach the RRs page, we get a list of our RRs that are sorted by the "Expires" column, so that we get the ones expiring first listed at the top.
Then sometimes we get to a point where a bunch of them, but not all, need to be renewed (etc. ~50 of them).
This is really a pain for me to have to select all 50 of them one by one, before selecting the renewal action at the bottom.
So, I decided to automate that, and the solution is Javascript.
All modern browsers have an option to run Javascript code directly through a console that affects the current loaded page, normally (in Chrome and Firefox) by pressing F12 and selecting "Console".
We then get a "command line" interface where we can insert commands and execute them by pressing "Enter".
So, I've developed this simple script where we give a specific number of days and the script checks all RRs that expire within that number of days. Here's the script:
Code (Javascript):$('#tablelist > tr > td').filter(function(){
var pattern = / days/;
if(pattern.test($(this).text())){
return $(this).text().replace(/ days/i, "") <= 5 //<-- Adjust this number to set days to your preferrence
}
}).parent().children().has('input').children().prop('checked', true);
$('#rentedbar').show();
So, in order to select all referrals that expire within 10 days, simply copy this code, paste it in your console, change the number 5 to 10 and hit "Enter" (you may want to hit it hard with frustration and all
).
This will automatically select all RRs expiring in equal or less than 10 days.
This has been troubling me for sooo long and I never got myself to write it down.. Thankfully I did it now.
In case someone needs this for another site, please let me know and I'll create an equivalent for that one.
Now I could make it a Chrome plugin that works with a single button, but where's the fun in that?
This helps you more into feeling like a true geek, other than just clicking a button..
Edited: You can hide the developer options by clicking F12 again.. I forgot to mention that.