BvS Filler Themes Notifier

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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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());
}
}