[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [atlas/master] Compatibility fixes for Internet Explorer 11
commit d081c09b15ed15ba497520f3216aa13d3060f7c9
Author: Iain R. Learmonth <irl@xxxxxxxx>
Date: Fri Dec 1 17:31:13 2017 +0000
Compatibility fixes for Internet Explorer 11
---
css/style.css | 2 +-
index.html | 2 +-
js/collections/aggregates.js | 19 +++++++++++++++----
js/models/relay.js | 2 +-
4 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/css/style.css b/css/style.css
index 6770c84..2652faf 100644
--- a/css/style.css
+++ b/css/style.css
@@ -7,7 +7,7 @@ body {
background-image:none !important;
}
body #wrapper {
- display:initial !important;
+ display:block !important;
}
diff --git a/index.html b/index.html
index 283c208..a25f240 100644
--- a/index.html
+++ b/index.html
@@ -143,7 +143,7 @@
<div class="input-group add-on">
<input class="form-control" placeholder="Search" name="secondary-search-query" id="secondary-search-query" type="text" autocorrect="off" autocapitalize="none">
<div class="input-group-btn">
- <button class="btn btn-danger" id="secondary-search-clear" type="button" title="Clear Search Query"><i class="glyphicon glyphicon-remove-circle"></i></span>
+ <button class="btn btn-danger" id="secondary-search-clear" type="button" title="Clear Search Query"><i class="glyphicon glyphicon-remove-circle"></i></button>
<button class="btn btn-primary" id="secondary-search-submit" type="submit" title="Perform Search"><i class="glyphicon glyphicon-search"></i></button>
<button class="btn btn-secondary" id="secondary-search-aggregate" type="button" title="Perform Aggregated Search"><i class="fa fa-compress"></i></button>
</div>
diff --git a/js/collections/aggregates.js b/js/collections/aggregates.js
index 1161ff4..163d7fb 100644
--- a/js/collections/aggregates.js
+++ b/js/collections/aggregates.js
@@ -87,15 +87,26 @@ define([
error(0);
return false;
}
- _.each(Object.values(aggregates), function(aggregate) {
+ var aggregatesArr = [];
+ _.each(Object.keys(aggregates), function(aggregateKey) {
+ var aggregate = aggregates[aggregateKey];
if ((typeof aggregate.as) !== "string") {
- if (aggregate.as.size == 1) aggregate.as = Array.from(aggregate.as.values())[0];
+ if (aggregate.as.size == 1) {
+ aggregate.as.forEach(function(value1, value2, set) {
+ aggregate.as = value1;
+ });
+ }
}
if ((typeof aggregate.country) !== "string") {
- if (aggregate.country.size == 1) aggregate.country = Array.from(aggregate.country.values())[0];
+ if (aggregate.country.size == 1) {
+ aggregate.country.forEach(function(value1, value2, set) {
+ aggregate.country = value1;
+ });
+ }
}
+ aggregatesArr.push(aggregate);
});
- collection[options.add ? 'add' : 'reset'](Object.values(aggregates), options);
+ collection[options.add ? 'add' : 'reset'](aggregatesArr, options);
success(err, relaysPublished, bridgesPublished);
}).fail(function(jqXHR, textStatus, errorThrown) {
if(jqXHR.statusText == "error") {
diff --git a/js/models/relay.js b/js/models/relay.js
index f0a660f..1204544 100644
--- a/js/models/relay.js
+++ b/js/models/relay.js
@@ -201,7 +201,7 @@ define([
relay.or_addresses = new_addresses;
}
relay.or_address = relay.or_addresses ? relay.or_addresses[0].split(":")[0] : null;
- relay.or_v6_addresses = $.grep(relay.or_addresses, function(n, i) { return n.startsWith("["); });
+ relay.or_v6_addresses = $.grep(relay.or_addresses, function(n, i) { return n.indexOf("[") == 0; });
relay.or_port = relay.or_addresses ? relay.or_addresses[0].split(":")[1] : 0;
relay.dir_port = relay.dir_address ? relay.dir_address.split(":")[1] : 0;
relay.exit_addresses = relay.exit_addresses ? relay.exit_addresses : null;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits