BvS Filler Themes Notifier

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

目前為 2014-06-14 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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
// @version        1.0
// @history        1.0 Initial Release
// ==/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());
}
}