Difference between revisions of "Widget:ServerStatus"
From DDO Compendium
(removed container for better centering) |
m (trying to figure out what's wrong with the SS widget) |
||
Line 46: | Line 46: | ||
$('.loading').html('<img src="https://ddocompendium.com/images/b/b8/Loading_Circle.gif" />'); | $('.loading').html('<img src="https://ddocompendium.com/images/b/b8/Loading_Circle.gif" />'); | ||
$.getJSON( "https://ddocrafting.info/discord/", function ( status ) { | $.getJSON( "https://ddocrafting.info/discord/", function ( status ) { | ||
if (status.argonnessen) { | if (status.argonnessen == 1) { | ||
$("#argo-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | $("#argo-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("#argo-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | $("#argo-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status.cannith) { | if (status.cannith == 1) { | ||
$("#cannith-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | $("#cannith-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("#cannith-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | $("#cannith-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status.khyber) { | if (status.khyber == 1) { | ||
$("#khyber-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | $("#khyber-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("#khyber-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | $("#khyber-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status.ghallanda) { | if (status.ghallanda == 1) { | ||
$("#ghallanda-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | $("#ghallanda-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("#ghallanda-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | $("#ghallanda-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status.orien) { | if (status.orien == 1) { | ||
$("#orien-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | $("#orien-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("#orien-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | $("#orien-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status.sarlona) { | if (status.sarlona == 1) { | ||
$("#sarlona-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | $("#sarlona-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("#sarlona-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | $("#sarlona-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status.thelanis) { | if (status.thelanis == 1) { | ||
$("#thelanis-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | $("#thelanis-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("#thelanis-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | $("#thelanis-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status.wayfinder) { | if (status.wayfinder == 1) { | ||
$("#wayfinder-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | $("#wayfinder-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("#wayfinder-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | $("#wayfinder-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status.lamannia) { | if (status.lamannia == 1) { | ||
$("#lam-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | $("#lam-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />'); | ||
} else { | } else { |
Revision as of 06:04, 4 October 2018
About[edit]
This widget will display the server statuses for Dungeons and Dragons Online.
How to Use[edit]
Add the following code snippet on a page you wish to use it on. The endpoint that this widget uses is rate limited, so please use it sparingly.
{{#widget:ServerStatus}}