Individuals For: " + numberWithCommas(resolution.nation_votes_for) + " (" + percent + "%)
").insertAfter($("p:contains('Votes For')")) 23 | $("strong:contains('Votes For')").html("Delegates Votes For:"); 24 | } 25 | if (resolution.nation_votes_against) { 26 | var percent = Math.floor((resolution.nation_votes_against / total) * 100); 27 | $("Individuals Against: " + numberWithCommas(resolution.nation_votes_against) + " (" + percent + "%)
").insertAfter($("p:contains('Votes Against')")) 28 | $("strong:contains('Votes Against')").html("Delegates Votes Against:"); 29 | } 30 | } 31 | } 32 | }); 33 | } 34 | 35 | function numberWithCommas(x) { 36 | return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); 37 | } 38 | })(); -------------------------------------------------------------------------------- /Extension/css/nationstates++_dark.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | text-shadow: 2px 2px 1px #5A5858; 3 | } 4 | 5 | h1, h1 a, h2, h3, h4, h5, h6 { 6 | color: #FFFFFF !important; 7 | } 8 | 9 | .ns-settings { 10 | background: #2A2A2A; 11 | border: 1px solid #383838; 12 | } 13 | 14 | .puppet-form { 15 | background: #2A2A2A; 16 | } 17 | 18 | #nationstates_settings h1 { 19 | color: #D0D0D0 !important; 20 | } 21 | 22 | #nationstates_settings { 23 | background: #000 !important; 24 | color: #D0D0D0 !important; 25 | } 26 | 27 | #nationstates_settings fieldset{ 28 | background: #2A2A2A !important; 29 | border: 1px solid #383838 !important; 30 | color: #D0D0D0 !important; 31 | } 32 | 33 | .dossier_element { 34 | border: 6px solid #191919 !important; 35 | background-color: #191919 !important; 36 | } 37 | 38 | .older { 39 | background: #191919; 40 | border: 1px #383838 solid; 41 | } 42 | 43 | #manage_newspaper { 44 | border: solid 2px white; 45 | background: black; 46 | } 47 | 48 | #inner-content fieldset, #target fieldset { 49 | background-color: black !important; 50 | } 51 | 52 | .updatetime { 53 | background: #2A2A2A; 54 | border: 1px solid #383838; 55 | color: #D0D0D0 !important; 56 | } 57 | 58 | #nspp_trophy { 59 | -webkit-filter: none !important; 60 | } 61 | 62 | #preview { 63 | color: black !important; 64 | } 65 | 66 | #alert_msg_box h1, #alert_msg_box h2, #alert_msg_box h3, #alert_msg_box h4, #alert_msg_box h5, #alert_msg_box h6{ 67 | color: black !important; 68 | text-shadow: 2px 2px 1px #FFFFFF; 69 | } 70 | 71 | #toggle_dossier_label { 72 | border: 2px solid white !important; 73 | } 74 | 75 | .banner-theme { 76 | background: #2A2A2A !important; 77 | border: 1px solid #383838 !important; 78 | } -------------------------------------------------------------------------------- /Extension/Safari/nationstates++.safariextension/global.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 29 | 30 | -------------------------------------------------------------------------------- /Extension/html/banhammer.html: -------------------------------------------------------------------------------- 1 | 52 | -------------------------------------------------------------------------------- /Extension/js/bootstrap-dropdown.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bootstrap.js by @fat & @mdo 3 | * plugins: bootstrap-dropdown.js 4 | * Copyright 2013 Twitter, Inc. 5 | * http://www.apache.org/licenses/LICENSE-2.0.txt 6 | */ 7 | !function(a){function d(){a(".dropdown-backdrop").remove(),a(b).each(function(){e(a(this)).removeClass("open")})}function e(b){var c=b.attr("data-target"),d;c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,"")),d=c&&a(c);if(!d||!d.length)d=b.parent();return d}var b="[data-toggle=dropdown]",c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),f,g;if(c.is(".disabled, :disabled"))return;return f=e(c),g=f.hasClass("open"),d(),g||("ontouchstart"in document.documentElement&&a('').insertBefore(a(this)).on("click",d),f.toggleClass("open")),c.focus(),!1},keydown:function(c){var d,f,g,h,i,j;if(!/(38|40|27)/.test(c.keyCode))return;d=a(this),c.preventDefault(),c.stopPropagation();if(d.is(".disabled, :disabled"))return;h=e(d),i=h.hasClass("open");if(!i||i&&c.keyCode==27)return c.which==27&&h.find(b).focus(),d.click();f=a("[role=menu] li:not(.divider):visible a",h);if(!f.length)return;j=f.index(f.filter(":focus")),c.keyCode==38&&j>0&&j--,c.keyCode==40&&jdecodeURIComponent function. Returns
17 | * null if the String is null.
18 | *
19 | * @param s
20 | * The UTF-8 encoded String to be decoded
21 | * @return the decoded String
22 | */
23 | public static String decodeURIComponent(String s) {
24 | if (s == null) {
25 | return null;
26 | }
27 |
28 | String result = null;
29 |
30 | try {
31 | result = URLDecoder.decode(s, "UTF-8");
32 | }
33 |
34 | // This exception should never occur.
35 | catch (UnsupportedEncodingException e) {
36 | result = s;
37 | }
38 |
39 | return result;
40 | }
41 |
42 | /**
43 | * Encodes the passed String as UTF-8 using an algorithm that's compatible
44 | * with JavaScript's encodeURIComponent function. Returns
45 | * null if the String is null.
46 | *
47 | * @param s
48 | * The String to be encoded
49 | * @return the encoded String
50 | */
51 | public static String encodeURIComponent(String s) {
52 | String result = null;
53 |
54 | try {
55 | result = URLEncoder.encode(s, "UTF-8").replaceAll("\\+", "%20").replaceAll("\\%21", "!").replaceAll("\\%27", "'").replaceAll("\\%28", "(").replaceAll("\\%29", ")").replaceAll("\\%7E", "~");
56 | }
57 |
58 | // This exception should never occur.
59 | catch (UnsupportedEncodingException e) {
60 | result = s;
61 | }
62 |
63 | return result;
64 | }
65 |
66 | /**
67 | * Private constructor to prevent this class from being instantiated.
68 | */
69 | private EncodingUtil() {
70 | super();
71 | }
72 | }
--------------------------------------------------------------------------------
/Assembly/app/net/nationstatesplusplus/assembly/model/websocket/DataRequest.java:
--------------------------------------------------------------------------------
1 | package net.nationstatesplusplus.assembly.model.websocket;
2 |
3 | import java.util.Collections;
4 | import java.util.HashMap;
5 | import java.util.Map;
6 |
7 | import com.fasterxml.jackson.annotation.JsonInclude;
8 | import com.fasterxml.jackson.annotation.JsonProperty;
9 | import com.fasterxml.jackson.databind.JsonNode;
10 | import com.fasterxml.jackson.databind.ObjectMapper;
11 |
12 | @JsonInclude(JsonInclude.Include.NON_NULL)
13 | public class DataRequest {
14 | @JsonProperty
15 | private String name;
16 | @JsonProperty()
17 | private Map