This repository has been archived by the owner on Nov 21, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwa.html
116 lines (107 loc) · 4.84 KB
/
wa.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>NationStates++</title>
<link href="assets//css/bootstrap.css" rel="stylesheet">
<link rel="icon" type="image/ico" href="favicon.ico?v=1"/>
<link href="jumbotron.css?v=12" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-47457755-1', 'nationstatesplusplus.com');
ga('send', 'pageview');
</script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="https://nationstatesplusplus.net/">NationStates++</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li ><a href="https://nationstatesplusplus.net/newspapers">Newspapers</a></li>
<li class="active"><a href="https://nationstatesplusplus.net/wa">World Assembly</a></li>
<li><a href="https://nationstatesplusplus.net/happenings">Happenings</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="http://blog.nationstatesplusplus.net">Blog</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6 content"><h2>Power Transfers</h2><div id='transfers'></div></div>
</div>
</div>
<footer class="bs-footer" role="contentinfo">
<p>NationStates++, <a href="http://opensource.org/licenses/MIT">Licensed MIT</a>, 2014</p>
<ul class="footer-links muted">
<li><a href="https://nationstatesplusplus.net/install">Install NS++</a></li>
<li>·</li>
<li><a href="https://github.com/Afforess/nspp-website">GitHub</a></li>
<li>·</li>
<li><a href="https://nationstatesplusplus.net/">About</a></li>
<li>·</li>
<li><a href="https://nationstatesplusplus.net/privacy">Privacy</a></li>
<li>·</li>
<li><a href="https://nationstatesplusplus.net/tos">Terms Of Service</a></li>
<li>·</li>
<li><a href="http://blog.nationstatesplusplus.net/">Blog</a></li>
<li>·</li>
</ul>
</footer>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="assets//js/bootstrap.min.js"></script>
<script src="nspp.js"></script>
<script src="functions.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.get("https://nationstatesplusplus.net/api/wa/power_transfers/", function(data) {
var html = "";
var nations = "";
var regions = "";
for (var i = 0; i < data.length; i++) {
var transfer = data[i];
if (regions.length > 0) regions += ",";
regions += transfer.region;
if (nations.length > 0) nations += ",";
nations += transfer.delegate;
html += "<div id='" + transfer.region + "'><a href='https://www.nationstates.net/region=" + transfer.region + "' target='_blank'>";
html += "<img class='miniflag' region='" + transfer.region + "'><span>" + transfer.region_title + "</span></a>";
html += " was " + (transfer.type == "SEIZED_DELEGATE_STATUS" ? "seized" : "conquered") + " by ";
html += "<a href='https://www.nationstates.net/nation=" + transfer.delegate + "' target='_blank'><img nation='" + transfer.delegate;
html += "' class='miniflag' ><span>" + transfer.delegate_title + "</span></a>.</div>";
}
$("#transfers").html(html);
$.get("https://nationstatesplusplus.net/api/regionflag/?region=" + regions, function(data) {
for (var region in data) {
$("img[region='" + region + "']").attr("src", data[region].replaceAll("http://", "https://"));
}
});
$.get("https://nationstatesplusplus.net/api/flag/?nation=" + nations, function(data) {
for (var nation in data) {
$("img[nation='" + nation + "']").attr("src", data[nation].replaceAll("http://", "https://"));
}
});
});
});
</script>
</body>
</html>