MediaWiki:CampaignData.js

From Orbis Wiki
Revision as of 16:35, 3 February 2022 by Nvaccaro (talk | contribs)
Jump to navigation Jump to search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
$(function() {
	const campaignData = [ {
		}, {
			name: 'Sleeping Giants',
			games: [
				{id: 0, date: new Date(2017, 5, 6)},
				{id: 1, date: new Date(2017, 5, 6)},
				{id: 2, date: new Date(2017, 5, 20)},
				{id: 3, date: new Date(2017, 5, 27)},
				{id: 4, date: new Date(2017, 6, 10)},
				{id: 5, date: new Date(2017, 6, 18)},
				{id: 6, date: new Date(2017, 7, 8)},
				{id: 7, date: new Date(2017, 7, 22)},
				{id: 8, date: new Date(2017, 8, 5)},
				{id: 9, date: new Date(2017, 8, 19)},
				{id: 10, date: new Date(2017, 9, 3)},
				{id: 11, date: new Date(2017, 9, 18)},
				{id: 12, date: new Date(2017, 9, 30)},
				{id: 13, date: new Date(2017, 10, 14)},
				{id: 14, date: new Date(2017, 10, 28)},
				{id: 15, date: new Date(2017, 11, 12)},
				{id: 16, date: new Date(2018, 0, 31)},
				{id: 17, date: new Date(2018, 1, 6)},
				{id: 18, date: new Date(2018, 1, 27)},
				{id: 19, date: new Date(2018, 2, 13)},
				{id: 20, date: new Date(2018, 2, 27)},
				{id: 21, date: new Date(2018, 3, 8)},
				{id: 22, date: new Date(2018, 3, 15)},
				{id: 23, date: new Date(2018, 4, 3)},
				{id: 24, date: new Date(2018, 4, 16)},
				{id: 25, date: new Date(2018, 5, 12)},
				{id: 26, date: new Date(2018, 5, 26)},
				{id: 27, date: new Date(2018, 6, 10)},
				{id: 28, date: new Date(2018, 6, 24)},
				{id: 29, date: new Date(2018, 7, 7)},
				{id: 30, date: new Date(2018, 7, 21)},
				{id: 31, date: new Date(2018, 8, 4)},
				{id: 32, date: new Date(2018, 9, 2)},
				{id: 33, date: new Date(2018, 9, 16)},
				{id: 34, date: new Date(2018, 9, 30)},
				{id: 35, date: new Date(2018, 10, 13)},
				{id: 36, date: new Date(2018, 11, 15)},
				{id: 37, date: new Date(2019, 0, 12)},
				{id: 38, date: new Date(2019, 1, 2)},
				{id: 39, date: new Date(2019, 1, 26)},
				{id: 40, date: new Date(2019, 2, 12)},
				{id: 41, date: new Date(2019, 2, 26)},
				{id: 42, date: new Date(2019, 3, 14)},
				{id: 43, date: new Date(2019, 3, 23)},
				{id: 44, date: new Date(2019, 4, 14)},
				{id: 45, date: new Date(2019, 4, 21)},
				{id: 46, date: new Date(2019, 5, 2)},
				{id: 47, date: new Date(2019, 5, 11)},
				{id: 48, date: new Date(2019, 5, 25)},
				{id: 49, date: new Date(2019, 6, 2)},
				{id: 50, date: new Date(2019, 6, 10)},
				{id: 51, date: new Date(2019, 6, 16)},
			]
		}, {
			name: 'Dormian Mysteries',
			games: [
				{id: 0, date: new Date(2021, 4, 8)},
				{id: 1, date: new Date(2021, 4, 22)},
				{id: 2, data: new Date(2022, 0, 29)},
			]
		}
	];
	
	for(let i = 1; i < campaignData.length; i++) {
		campaignData[i].games.forEach(game => {
			$('#' + i + '-' + game.id).text(campaignData[i].name + ', Game ' + game.id + ' (' + game.date.toDateString() + ')');
		});
	}
}());