Greasy Fork is available in English.

BvS Filler Themes Notifier

Notifies you when you need to set filler themes for Hidden Hoclaus and Candyween

질문, 리뷰하거나, 이 스크립트를 신고하세요.
// ==UserScript==
// @name           BvS Filler Themes Notifier
// @namespace      Thewho
// @description    Notifies you when you need to set filler themes for Hidden Hoclaus and Candyween
// @include        http*://*animecubed.com/billy/bvs/pages/main.html
// @include        http*://*animecubedgaming.com/billy/bvs/pages/main.html
// @version	   1.3
// @history        1.3 New domain - animecubedgaming.com - Channel28
// @history        1.2 Now https compatible (Updated by Channel28)
// @history        1.1 Added grant permissions (Updated by Channel28)
// @history        1.0 Initial Release
// @grant          GM_getValue
// @grant          GM_setValue
// ==/UserScript==


var currentDate = new Date().getTime().toString();

if (currentDate - GM_getValue("lastDate", "") > 86400000)
{
var d = new Date();
if (d.getDate() == 23) 
{
alert("You need to activate your filler themes today \n for access to Hidden Hoclaus Tomorrow!");
var dt = new Date().getTime();
GM_setValue("lastDate", dt.toString());
}


//Notification for Candyween

//This bellow calculates how many days the current month has
function getLastDayOfMonth()
{
var day;
var month;
var year;

var tmpdate = new Date();
month = tmpdate.getMonth() +1;
year = tmpdate.getFullYear();


switch(month)
{
case 1 :
case 3 :
case 5 :
case 7 :
case 8 :
case 10:
case 12:
day = 31;
break;
case 4 :
case 6 :
case 9 :
case 11:
day = 30;
break;

case 2 :
if( ( (year % 4 == 0) && ( year % 100 != 0) ) || (year % 400 == 0) )
day = 29;
else
day = 28;
break;
}

return day;

}

if (d.getDate() == getLastDayOfMonth() -1) 
{
alert("You need to activate your filler themes today \n for access to Candyween Tomorrow!");
var dt = new Date().getTime();
GM_setValue("lastDate", dt.toString());
}
}