Skip to content

Instantly share code, notes, and snippets.

@Gamewalker
Created June 17, 2016 05:26
Show Gist options
  • Select an option

  • Save Gamewalker/fa40f947557fdaf9c31dfcc16af19154 to your computer and use it in GitHub Desktop.

Select an option

Save Gamewalker/fa40f947557fdaf9c31dfcc16af19154 to your computer and use it in GitHub Desktop.
// Here You can type your custom JavaScript...
var url = window.location.href; // Returns full URL
var lastRls = getCookie("last_release");
var site1Rls = getCookie("site1_release");
var newLastRls = lastRls;
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires;
}
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') {
c = c.substring(1);
}
if (c.indexOf(name) === 0) {
return c.substring(name.length,c.length);
}
}
return "";
}
if(url == "http://0xxx.ws/" || url == "http://0xxx.ws/index.php?p=1") {
var site1Rls = $("#home-table tr").eq(1).find("td").eq(2).find("a").text();
setCookie("site1_release", site1Rls, 9999);
if(lastRls != site1Rls) {
newLastRls = lastRls;
lastRls = site1Rls;
}
}
$("#home-table tr").each(function() {
var sites = [
"MyFirstPublic",
"PublicAgent",
"X-Art",
"FakeHospital",
"GFRevenge",
"CzechMassage",
"CzechCouples",
"CzechStreets",
"CzechAmateurs",
"Tushy",
"FuckedInTraffic",
"SexArt",
"SellYourGF"
];
var txt = $(this).find("td").eq(2).find("a").text();
var tr = $(this);
$.each(sites, function(key, val) {
if(txt.indexOf(val) >= 0)
tr.css("background-color", "yellow");
if(txt.indexOf(newLastRls) >= 0) {
tr.css("background-color", "red");
setCookie("last_release", site1Rls, 9999);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment