Skip to content

Commit

Permalink
Merge pull request #1 from yangshenghan/gh-pages
Browse files Browse the repository at this point in the history
Add waypoint codes
  • Loading branch information
howar31 committed Apr 17, 2014
2 parents c7c0524 + aefa214 commit 74043ae
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 18 deletions.
18 changes: 18 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ body {
color: white;
}

.scale-lowlevel {
}

.scale-standard {
}

.scale-hardcore {
}

.wbname {
}

Expand All @@ -66,6 +75,15 @@ body {
.localtime {
}

.waypoint {
font-family: monospace;
}

.waypoint input {
margin-left: -4px;
position: absolute;
}

#footer {
color: #CCCCCC;
padding-top: 9px;
Expand Down
19 changes: 15 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ <h1 id="header-title">Guild Wars 2 Timer</h1>

<div id="table-worldboss">
<div class="row table-header">
<div class="col-sm-6" id="wbname-title">World Boss</div>
<div class="col-sm-4" id="wbname-title">World Boss</div>
<div class="col-sm-3" id="localtime-title">Local Time <span id="nowtime"></span></div>
<div class="col-sm-3" id="psttime-title">US Pacific Time (Server Time)</div>
<div class="col-sm-2" id="waypoint-title">Waypoint</div>
</div>
</div>

Expand Down Expand Up @@ -90,6 +91,14 @@ <h1 id="header-title">Guild Wars 2 Timer</h1>
setInterval(function() {
refreshall();
},60000);
$( document ).on("click", ".waypoint:not(:has(input))", function() {
var text = this;
var chatlink = $("<input class=\"chatlink\" type=\"text\" value=\""+$( text ).text()+"\" />");
$( text ).html( chatlink );
chatlink.one("focusout", function() {
$( text ).html($( this ).val());
}).focus().select();
});
});

function refreshall () {
Expand All @@ -110,18 +119,20 @@ <h1 id="header-title">Guild Wars 2 Timer</h1>
upsec: sec,
lctime: sec2str(lsec),
lcsec: lsec,
scale: json.worldboss[i].scale
scale: json.worldboss[i].scale,
waypoint: json.worldboss[i].waypoint
};
j++;
}
i++;
}
wbt.sort(sortByTime);
for (i = 0; i<k; i++) {
var tmp = '<div class="row">'
+'<div class="col-sm-6 wbname">'+wbt[i].name+'</div>'
var tmp = '<div class="row scale-'+wbt[i].scale+'">'
+'<div class="col-sm-4 wbname">'+wbt[i].name+'</div>'
+'<div class="col-sm-3 localtime">'+wbt[i].lctime+'</div>'
+'<div class="col-sm-3 psttime">'+wbt[i].uptime+'</div>'
+'<div class="col-sm-2 waypoint">'+wbt[i].waypoint+'</div>'
+'</div>';
$("#table-worldboss").append(tmp);
}
Expand Down
42 changes: 28 additions & 14 deletions wbtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,85 @@
"worldboss":[{
"name":"Megadestroyer",
"uptime":["16:00","21:00","02:30","07:30","12:30"],
"scale":"standard"
"scale":"standard",
"waypoint":"[&BM0CAAA=]"
},
{
"name":"Jungle Wurm",
"uptime":["16:15","18:15","20:15","22:15","00:15","02:15","04:15","06:15","07:15","08:15","10:15","12:15","14:15"],
"scale":"lowlevel"
"scale":"lowlevel",
"waypoint":"[&BEEFAAA=]"
},
{
"name":"TBD",
"uptime":["16:30","21:30","03:00","08:00","13:00"],
"scale":"standard"
"scale":"none",
"waypoint":""
},
{
"name":"Shadow Behemoth",
"uptime":["16:45","18:45","20:45","22:45","00:45","02:45","04:45","06:45","08:45","10:45","12:45","14:45"],
"scale":"lowlevel"
"scale":"lowlevel",
"waypoint":"[&BPwAAAA=]"
},
{
"name":"The Shatterer",
"uptime":["17:00","22:00","00:00","04:00","08:30","13:30"],
"scale":"standard"
"scale":"standard",
"waypoint":"[&BE4DAAA=]"
},
{
"name":"Svanir Shaman",
"uptime":["17:15","19:15","21:15","23:15","01:15","03:15","05:15","09:15","11:15","13:15","15:15"],
"scale":"lowlevel"
"scale":"lowlevel",
"waypoint":"[&BH4BAAA=]"
},
{
"name":"Modniir Ulgoth",
"uptime":["17:30","22:30","00:30","05:00","09:30","14:00"],
"scale":"standard"
"scale":"standard",
"waypoint":"[&BLEAAAA=]"
},
{
"name":"Fire Elemental",
"uptime":["17:45","19:45","21:45","23:45","01:45","03:45","05:45","07:45","09:45","11:45","13:45","15:45"],
"scale":"lowlevel"
"scale":"lowlevel",
"waypoint":"[&BEYAAAA=]"
},
{
"name":"Karka Queen",
"uptime":["18:00","03:30","09:00"],
"scale":"hardcore"
"scale":"hardcore",
"waypoint":"[&BNcGAAA=]"
},
{
"name":"Golem Mark II",
"uptime":["18:30","23:00","01:00","06:00","10:30","14:30"],
"scale":"standard"
"scale":"standard",
"waypoint":"[&BNQCAAA=]"
},
{
"name":"Tequatl",
"uptime":["19:00","04:30","10:00"],
"scale":"hardcore"
"scale":"hardcore",
"waypoint":"[&BNABAAA=]"
},
{
"name":"Claw of Jormag",
"uptime":["19:30","23:30","01:30","06:15","11:30","15:00"],
"scale":"standard"
"scale":"standard",
"waypoint":"[&BHoCAAA=]"
},
{
"name":"Great Jungle Wurm",
"uptime":["20:00","05:30","11:00"],
"scale":"hardcore"
"scale":"hardcore",
"waypoint":"[&BKoBAAA=]"
},
{
"name":"Taidha Covington",
"uptime":["20:30","02:00","07:00","12:00","15:30"],
"scale":"standard"
"scale":"standard",
"waypoint":"[&BKgBAAA=]"
}]
}

0 comments on commit 74043ae

Please sign in to comment.