MediaWiki:Gadget-eventslist.js: Difference between revisions

No edit summary
No edit summary
Line 1,573: Line 1,573:
// Daily
// Daily
var dailyReset = moment(now).add(1, 'days').startOf('day'),
var dailyReset = moment(now).add(1, 'days').startOf('day'),
img = '/images/thumb/0/08/D%26D_token_%28daily%29_detail.png/200px-D%26D_token_%28daily%29_detail.png';
img = '';
if (dailyReset.diff(now, 'minutes') <= 10) {
if (dailyReset.diff(now, 'minutes') <= 10) {
notifs.push( { title:'Daily Reset', opts:{
notifs.push( { title:'Daily Reset', opts:{
Line 1,590: Line 1,590:
// Weekly
// Weekly
var weeklyReset = moment(now).day(3).startOf('day'),
var weeklyReset = moment(now).day(3).startOf('day'),
img = '/images/4/47/D%26D_token_%28weekly%29_detail.png';
img = '';
if (now.isAfter(weeklyReset)) {
if (now.isAfter(weeklyReset)) {
weeklyReset.add(1, 'week');
weeklyReset.add(1, 'week');
Line 1,622: Line 1,622:
// Monthly
// Monthly
var monthlyReset = moment(now).add(1, 'months').startOf('month'),
var monthlyReset = moment(now).add(1, 'months').startOf('month'),
img = '/images/thumb/a/a7/D%26D_token_%28monthly%29_detail.png/200px-D%26D_token_%28monthly%29_detail.png';
img = '';
if (monthlyReset.diff(now, 'minutes') <= 10) {
if (monthlyReset.diff(now, 'minutes') <= 10) {
notifs.push( { title:'Monthly Reset', opts:{
notifs.push( { title:'Monthly Reset', opts:{
Line 1,748: Line 1,748:
// Generate notification
// Generate notification
if (pofnots.length > 0) {
if (pofnots.length > 0) {
var img = '/images/1/18/Farming.png',
var img = '',
nbod = 'Spawning soon:',
nbod = 'Spawning soon:',
len = pofnots.length,
len = pofnots.length,
Line 1,783: Line 1,783:
if (spot[0] != self.lastRot.mgspot) {
if (spot[0] != self.lastRot.mgspot) {
self.lastRot.mgspot = spot[0];
self.lastRot.mgspot = spot[0];
var img = '/images/c/c8/Current_spotlight_icon.png';
var img = '';


notifs.push( { title:'Minigame Spotlight', opts:{
notifs.push( { title:'Minigame Spotlight', opts:{