countdown.html,countdown.js - reindent
This commit is contained in:
@@ -1,36 +1,36 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.3.11/d3.min.js"></script>
|
||||
<link href='http://fonts.googleapis.com/css?family=Chango' rel='stylesheet' type='text/css'>
|
||||
<style>
|
||||
body {
|
||||
<head>
|
||||
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.3.11/d3.min.js"></script>
|
||||
<link href='http://fonts.googleapis.com/css?family=Chango' rel='stylesheet' type='text/css'>
|
||||
<style>
|
||||
body {
|
||||
font-family: Chango;
|
||||
text-align: center;
|
||||
}
|
||||
div#counter {
|
||||
}
|
||||
div#counter {
|
||||
font-size: 180pt;
|
||||
text-align: left;
|
||||
}
|
||||
div#location {
|
||||
}
|
||||
div#location {
|
||||
font-size: 50pt;
|
||||
}
|
||||
div.hours { color: blue; }
|
||||
div.minutes { color: green; }
|
||||
div.seconds { color: orange; }
|
||||
div.countdown { color: red; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
}
|
||||
div.hours { color: blue; }
|
||||
div.minutes { color: green; }
|
||||
div.seconds { color: orange; }
|
||||
div.countdown { color: red; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div id="counter"></div>
|
||||
until 1st January 2014 in
|
||||
<div id="location"></div>
|
||||
<div>at <span id="localtime"></span> local time</div>
|
||||
<div id="map"></div>
|
||||
<div id="counter"></div>
|
||||
until 1st January 2014 in
|
||||
<div id="location"></div>
|
||||
<div>at <span id="localtime"></span> local time</div>
|
||||
<div id="map"></div>
|
||||
|
||||
<script src="countdown.js">
|
||||
<script src="countdown.js">
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
97
countdown.js
97
countdown.js
@@ -1,53 +1,53 @@
|
||||
var events = [
|
||||
{ time: new Date("Tue 31 Dec 2013 10:00:00 GMT"), country: "Christmas Island/Kiribati and Samoa", city: "Kiritimati, Apia" },
|
||||
{ time: new Date("Tue 31 Dec 2013 10:15:00 GMT"), country: "Chatham Islands/New Zealand", city: "Chatham Islands" },
|
||||
{ time: new Date("Tue 31 Dec 2013 11:00:00 GMT"), country: "New Zealand with exceptions and 5 more", city: "Auckland, Suva, Wellington, Nukualofa" },
|
||||
{ time: new Date("Tue 31 Dec 2013 12:00:00 GMT"), country: "small region of Russia, Marshall Islands and 5 more", city: "Anadyr, Funafuti, Yaren, Tarawa" },
|
||||
{ time: new Date("Tue 31 Dec 2013 12:30:00 GMT"), country: "Norfolk Island", city: "Kingston" },
|
||||
{ time: new Date("Tue 31 Dec 2013 13:00:00 GMT"), country: "much of Australia and 5 more", city: "Melbourne, Sydney, Canberra, Honiara" },
|
||||
{ time: new Date("Tue 31 Dec 2013 13:30:00 GMT"), country: "small region of Australia", city: "Adelaide, Broken Hill" },
|
||||
{ time: new Date("Tue 31 Dec 2013 14:00:00 GMT"), country: "Queensland/Australia and 5 more", city: "Brisbane, Port Moresby, Guam (Hagåtña), Cairns" },
|
||||
{ time: new Date("Tue 31 Dec 2013 14:30:00 GMT"), country: "Northern Territory/Australia", city: "Darwin, Alice Springs, Uluru" },
|
||||
{ time: new Date("Tue 31 Dec 2013 15:00:00 GMT"), country: "Japan and 6 more", city: "Tokyo, Seoul, Pyongyang, Dili" },
|
||||
{ time: new Date("Tue 31 Dec 2013 15:15:00 GMT"), country: "Western Australia/Australia", city: "Eucla" },
|
||||
{ time: new Date("Tue 31 Dec 2013 16:00:00 GMT"), country: "China and 12 more", city: "Beijing, Hong Kong, Manila, Singapore" },
|
||||
{ time: new Date("Tue 31 Dec 2013 17:00:00 GMT"), country: "much of Indonesia, Thailand and 7 more", city: "Jakarta, Bangkok, Hanoi, Phnom Penh" },
|
||||
{ time: new Date("Tue 31 Dec 2013 17:30:00 GMT"), country: "Myanmar and Cocos Islands", city: "Yangon, Naypyidaw, Mandalay, Bantam" },
|
||||
{ time: new Date("Tue 31 Dec 2013 18:00:00 GMT"), country: "Bangladesh, some regions of Russia and 4 more", city: "Dhaka, Almaty, Bishkek, Thimphu" },
|
||||
{ time: new Date("Tue 31 Dec 2013 18:15:00 GMT"), country: "Nepal", city: "Kathmandu, Biratnagar, Pokhara" },
|
||||
{ time: new Date("Tue 31 Dec 2013 18:30:00 GMT"), country: "India and Sri Lanka", city: "New Delhi, Mumbai, Kolkata, Bangalore" },
|
||||
{ time: new Date("Tue 31 Dec 2013 19:00:00 GMT"), country: "Pakistan and 8 more", city: "Tashkent, Islamabad, Lahore, Karachi" },
|
||||
{ time: new Date("Tue 31 Dec 2013 19:30:00 GMT"), country: "Afghanistan", city: "Kabul, Kandahar, Mazari Sharif, Herat" },
|
||||
{ time: new Date("Tue 31 Dec 2013 20:00:00 GMT"), country: "much of Russia and 8 more", city: "Moscow, Dubai, Abu Dhabi, Muscat" },
|
||||
{ time: new Date("Tue 31 Dec 2013 20:30:00 GMT"), country: "Iran", city: "Tehran, Rasht, Esfahãn, Bandar-Abbas" },
|
||||
{ time: new Date("Tue 31 Dec 2013 21:00:00 GMT"), country: "Iraq and 20 more", city: "Baghdad, Khartoum, Nairobi, Addis Ababa" },
|
||||
{ time: new Date("Tue 31 Dec 2013 22:00:00 GMT"), country: "Greece and 30 more", city: "Cairo, Ankara, Athens, Bucharest" },
|
||||
{ time: new Date("Tue 31 Dec 2013 23:00:00 GMT"), country: "Germany and 43 more", city: "Brussels, Madrid, Paris, Rome" },
|
||||
{ time: new Date("Wed 1 Jan 2014 00:00:00 GMT"), country: "United Kingdom and 24 more", city: "London, Casablanca, Dublin, Lisbon" },
|
||||
{ time: new Date("Tue 31 Dec 2013 10:00:00 GMT"), country: "Christmas Island/Kiribati and Samoa", city: "Kiritimati, Apia" },
|
||||
{ time: new Date("Tue 31 Dec 2013 10:15:00 GMT"), country: "Chatham Islands/New Zealand", city: "Chatham Islands" },
|
||||
{ time: new Date("Tue 31 Dec 2013 11:00:00 GMT"), country: "New Zealand with exceptions and 5 more", city: "Auckland, Suva, Wellington, Nukualofa" },
|
||||
{ time: new Date("Tue 31 Dec 2013 12:00:00 GMT"), country: "small region of Russia, Marshall Islands and 5 more", city: "Anadyr, Funafuti, Yaren, Tarawa" },
|
||||
{ time: new Date("Tue 31 Dec 2013 12:30:00 GMT"), country: "Norfolk Island", city: "Kingston" },
|
||||
{ time: new Date("Tue 31 Dec 2013 13:00:00 GMT"), country: "much of Australia and 5 more", city: "Melbourne, Sydney, Canberra, Honiara" },
|
||||
{ time: new Date("Tue 31 Dec 2013 13:30:00 GMT"), country: "small region of Australia", city: "Adelaide, Broken Hill" },
|
||||
{ time: new Date("Tue 31 Dec 2013 14:00:00 GMT"), country: "Queensland/Australia and 5 more", city: "Brisbane, Port Moresby, Guam (Hagåtña), Cairns" },
|
||||
{ time: new Date("Tue 31 Dec 2013 14:30:00 GMT"), country: "Northern Territory/Australia", city: "Darwin, Alice Springs, Uluru" },
|
||||
{ time: new Date("Tue 31 Dec 2013 15:00:00 GMT"), country: "Japan and 6 more", city: "Tokyo, Seoul, Pyongyang, Dili" },
|
||||
{ time: new Date("Tue 31 Dec 2013 15:15:00 GMT"), country: "Western Australia/Australia", city: "Eucla" },
|
||||
{ time: new Date("Tue 31 Dec 2013 16:00:00 GMT"), country: "China and 12 more", city: "Beijing, Hong Kong, Manila, Singapore" },
|
||||
{ time: new Date("Tue 31 Dec 2013 17:00:00 GMT"), country: "much of Indonesia, Thailand and 7 more", city: "Jakarta, Bangkok, Hanoi, Phnom Penh" },
|
||||
{ time: new Date("Tue 31 Dec 2013 17:30:00 GMT"), country: "Myanmar and Cocos Islands", city: "Yangon, Naypyidaw, Mandalay, Bantam" },
|
||||
{ time: new Date("Tue 31 Dec 2013 18:00:00 GMT"), country: "Bangladesh, some regions of Russia and 4 more", city: "Dhaka, Almaty, Bishkek, Thimphu" },
|
||||
{ time: new Date("Tue 31 Dec 2013 18:15:00 GMT"), country: "Nepal", city: "Kathmandu, Biratnagar, Pokhara" },
|
||||
{ time: new Date("Tue 31 Dec 2013 18:30:00 GMT"), country: "India and Sri Lanka", city: "New Delhi, Mumbai, Kolkata, Bangalore" },
|
||||
{ time: new Date("Tue 31 Dec 2013 19:00:00 GMT"), country: "Pakistan and 8 more", city: "Tashkent, Islamabad, Lahore, Karachi" },
|
||||
{ time: new Date("Tue 31 Dec 2013 19:30:00 GMT"), country: "Afghanistan", city: "Kabul, Kandahar, Mazari Sharif, Herat" },
|
||||
{ time: new Date("Tue 31 Dec 2013 20:00:00 GMT"), country: "much of Russia and 8 more", city: "Moscow, Dubai, Abu Dhabi, Muscat" },
|
||||
{ time: new Date("Tue 31 Dec 2013 20:30:00 GMT"), country: "Iran", city: "Tehran, Rasht, Esfahãn, Bandar-Abbas" },
|
||||
{ time: new Date("Tue 31 Dec 2013 21:00:00 GMT"), country: "Iraq and 20 more", city: "Baghdad, Khartoum, Nairobi, Addis Ababa" },
|
||||
{ time: new Date("Tue 31 Dec 2013 22:00:00 GMT"), country: "Greece and 30 more", city: "Cairo, Ankara, Athens, Bucharest" },
|
||||
{ time: new Date("Tue 31 Dec 2013 23:00:00 GMT"), country: "Germany and 43 more", city: "Brussels, Madrid, Paris, Rome" },
|
||||
{ time: new Date("Wed 1 Jan 2014 00:00:00 GMT"), country: "United Kingdom and 24 more", city: "London, Casablanca, Dublin, Lisbon" },
|
||||
|
||||
{ time: new Date("Wed 1 Jan 2014 1:00:00 GMT"), country: "Cape Verde, some regions of Greenland and 1 more", city: "Praia, Ponta Delgada (Azores), Ittoqqortoormiit, Mindelo" },
|
||||
{ time: new Date("Wed 1 Jan 2014 2:00:00 GMT"), country: "regions of Brazil, Uruguay and 1 more", city: "Rio de Janeiro, São Paulo, Brasilia, Wed 1 Jan 2014tevideo" },
|
||||
{ time: new Date("Wed 1 Jan 2014 3:00:00 GMT"), country: "regions of Brazil, Argentina and 7 more", city: "Buenos Aires, Santiago, Asuncion, Paramaribo" },
|
||||
{ time: new Date("Wed 1 Jan 2014 3:30:00 GMT"), country: "Newfoundland and Labrador/Canada", city: "St. John's, Conception Bay South, Corner Brook, Gander" },
|
||||
{ time: new Date("Wed 1 Jan 2014 4:00:00 GMT"), country: "some regions of Canada and 26 more", city: "La Paz, San Juan, Santo Domingo, Halifax" },
|
||||
{ time: new Date("Wed 1 Jan 2014 4:30:00 GMT"), country: "Venezuela", city: "Caracas, Barquisimeto, Maracaibo, Maracay" },
|
||||
{ time: new Date("Wed 1 Jan 2014 5:00:00 GMT"), country: "regions of U.S.A., regions of Canada and 12 more", city: "New York, Washington DC, Detroit, Havana" },
|
||||
{ time: new Date("Wed 1 Jan 2014 6:00:00 GMT"), country: "regions of U.S.A., some regions of Canada and 8 more", city: "Mexico City, Chicago, Guatemala, Dallas" },
|
||||
{ time: new Date("Wed 1 Jan 2014 7:00:00 GMT"), country: "some regions of U.S.A., some regions of Canada and 1 more", city: "Calgary, Denver, Edmonton, Phoenix" },
|
||||
{ time: new Date("Wed 1 Jan 2014 8:00:00 GMT"), country: "regions of U.S.A., some regions of Canada and 2 more", city: "Los Angeles, San Francisco, Las Vegas, Seattle" },
|
||||
{ time: new Date("Wed 1 Jan 2014 9:00:00 GMT"), country: "Alaska/U.S.A. and French Polynesia", city: "Anchorage, Fairbanks, Unalaska, Juneau" },
|
||||
{ time: new Date("Wed 1 Jan 2014 9:30:00 GMT"), country: "Marquesas Islands/France", city: "Taiohae" },
|
||||
{ time: new Date("Wed 1 Jan 2014 10:00:00 GMT"), country: "small region of U.S.A. and 2 more", city: "Honolulu, Rarotonga, Adak, Papeete" },
|
||||
{ time: new Date("Wed 1 Jan 2014 11:00:00 GMT"), country: "American Samoa, Midway Atoll/U.S.A. and 1 more", city: "Alofi, Midway, Pago Pago" },
|
||||
{ time: new Date("Wed 1 Jan 2014 12:00:00 GMT"), country: "small region of U.S.A.", city: "Baker Island, Howland Island" },
|
||||
{ time: new Date("Wed 1 Jan 2014 1:00:00 GMT"), country: "Cape Verde, some regions of Greenland and 1 more", city: "Praia, Ponta Delgada (Azores), Ittoqqortoormiit, Mindelo" },
|
||||
{ time: new Date("Wed 1 Jan 2014 2:00:00 GMT"), country: "regions of Brazil, Uruguay and 1 more", city: "Rio de Janeiro, São Paulo, Brasilia, Wed 1 Jan 2014tevideo" },
|
||||
{ time: new Date("Wed 1 Jan 2014 3:00:00 GMT"), country: "regions of Brazil, Argentina and 7 more", city: "Buenos Aires, Santiago, Asuncion, Paramaribo" },
|
||||
{ time: new Date("Wed 1 Jan 2014 3:30:00 GMT"), country: "Newfoundland and Labrador/Canada", city: "St. John's, Conception Bay South, Corner Brook, Gander" },
|
||||
{ time: new Date("Wed 1 Jan 2014 4:00:00 GMT"), country: "some regions of Canada and 26 more", city: "La Paz, San Juan, Santo Domingo, Halifax" },
|
||||
{ time: new Date("Wed 1 Jan 2014 4:30:00 GMT"), country: "Venezuela", city: "Caracas, Barquisimeto, Maracaibo, Maracay" },
|
||||
{ time: new Date("Wed 1 Jan 2014 5:00:00 GMT"), country: "regions of U.S.A., regions of Canada and 12 more", city: "New York, Washington DC, Detroit, Havana" },
|
||||
{ time: new Date("Wed 1 Jan 2014 6:00:00 GMT"), country: "regions of U.S.A., some regions of Canada and 8 more", city: "Mexico City, Chicago, Guatemala, Dallas" },
|
||||
{ time: new Date("Wed 1 Jan 2014 7:00:00 GMT"), country: "some regions of U.S.A., some regions of Canada and 1 more", city: "Calgary, Denver, Edmonton, Phoenix" },
|
||||
{ time: new Date("Wed 1 Jan 2014 8:00:00 GMT"), country: "regions of U.S.A., some regions of Canada and 2 more", city: "Los Angeles, San Francisco, Las Vegas, Seattle" },
|
||||
{ time: new Date("Wed 1 Jan 2014 9:00:00 GMT"), country: "Alaska/U.S.A. and French Polynesia", city: "Anchorage, Fairbanks, Unalaska, Juneau" },
|
||||
{ time: new Date("Wed 1 Jan 2014 9:30:00 GMT"), country: "Marquesas Islands/France", city: "Taiohae" },
|
||||
{ time: new Date("Wed 1 Jan 2014 10:00:00 GMT"), country: "small region of U.S.A. and 2 more", city: "Honolulu, Rarotonga, Adak, Papeete" },
|
||||
{ time: new Date("Wed 1 Jan 2014 11:00:00 GMT"), country: "American Samoa, Midway Atoll/U.S.A. and 1 more", city: "Alofi, Midway, Pago Pago" },
|
||||
{ time: new Date("Wed 1 Jan 2014 12:00:00 GMT"), country: "small region of U.S.A.", city: "Baker Island, Howland Island" },
|
||||
];
|
||||
/*
|
||||
var events = [
|
||||
{ time: new Date("Tue 31 Dec 2013 1:00:00 GMT"), country: "Cape Verde, some regions of Greenland and 1 more", city: "Praia, Ponta Delgada (Azores), Ittoqqortoormiit, Mindelo" },
|
||||
{ time: new Date("Tue 31 Dec 2013 2:00:00 GMT"), country: "regions of Brazil, Uruguay and 1 more", city: "Rio de Janeiro, São Paulo, Brasilia, Tue 31 Dec 2013tevideo" },
|
||||
{ time: new Date("Tue 31 Dec 2013 2:30:00 GMT"), country: "regions of Brazil, Argentina and 7 more", city: "Buenos Aires, Santiago, Asuncion, Paramaribo" },
|
||||
{ time: new Date("Tue 31 Dec 2013 2:45:00 GMT"), country: "Newfoundland and Labrador/Canada", city: "St. John's, Conception Bay South, Corner Brook, Gander" },
|
||||
];
|
||||
var events = [
|
||||
{ time: new Date("Tue 31 Dec 2013 1:00:00 GMT"), country: "Cape Verde, some regions of Greenland and 1 more", city: "Praia, Ponta Delgada (Azores), Ittoqqortoormiit, Mindelo" },
|
||||
{ time: new Date("Tue 31 Dec 2013 2:00:00 GMT"), country: "regions of Brazil, Uruguay and 1 more", city: "Rio de Janeiro, São Paulo, Brasilia, Tue 31 Dec 2013tevideo" },
|
||||
{ time: new Date("Tue 31 Dec 2013 2:30:00 GMT"), country: "regions of Brazil, Argentina and 7 more", city: "Buenos Aires, Santiago, Asuncion, Paramaribo" },
|
||||
{ time: new Date("Tue 31 Dec 2013 2:45:00 GMT"), country: "Newfoundland and Labrador/Canada", city: "St. John's, Conception Bay South, Corner Brook, Gander" },
|
||||
];
|
||||
*/
|
||||
var now = new Date().getTime();
|
||||
var secsRemaining = 0;
|
||||
@@ -72,8 +72,8 @@ function counterClass(millisecsRemaining) {
|
||||
}
|
||||
|
||||
function timeRemaining(millisecsRemaining) {
|
||||
// var days = Math.floor(millisecsRemaining / millisInDay)
|
||||
// millisecsRemaining -= days * millisInDay
|
||||
// var days = Math.floor(millisecsRemaining / millisInDay)
|
||||
// millisecsRemaining -= days * millisInDay
|
||||
|
||||
var hours = Math.floor(millisecsRemaining / 3600000)
|
||||
millisecsRemaining -= hours * 3600000
|
||||
@@ -127,4 +127,3 @@ function ticker() {
|
||||
}
|
||||
|
||||
ticker();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user