-
-
Save NKid/6ef8c64427d0ce4e30f2 to your computer and use it in GitHub Desktop.
M01 Hightlight Today
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name M01 Hightlight Today | |
// @description M01 Hightlight Today | |
// @include http://www.mobile01.com/topiclist.php* | |
// @include http://www.mobile01.com/forumtopic.php* | |
// @include http://www.mobile01.com/newtopics.php* | |
// @include http://www.mobile01.com/hottopics.php* | |
// ==/UserScript== | |
function padLeft(nr, n, str) { | |
return Array(n - String(nr).length + 1).join(str || '0') + nr; | |
} | |
var today=new Date(); | |
var tstr=today.getFullYear()+ "-" + padLeft(today.getMonth()+1,2) + "-" + padLeft(today.getDate(),2); | |
console.log(tstr); | |
var t=document.querySelectorAll('td.authur a p:nth-child(1)'); | |
for(var i=0;i<t.length;i++) | |
{ | |
if(t[i].innerHTML.indexOf(tstr) != -1) | |
t[i].style.backgroundColor='yellow'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment