зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1665897 - Display current TRR URL in about:networking r=fluent-reviewers,nhnt11,flod
Differential Revision: https://phabricator.services.mozilla.com/D90681
This commit is contained in:
Родитель
7ff1c84dc1
Коммит
53c18c28a4
|
@ -93,6 +93,14 @@
|
|||
</thead>
|
||||
<tbody id="dns_suffix_content" />
|
||||
</table>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-l10n-id="about-networking-dns-trr-url"/>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="dns_trr_url" />
|
||||
</table>
|
||||
<br/><br/>
|
||||
<button id="clearDNSCache" data-l10n-id="about-networking-dns-clear-cache-button"></button>
|
||||
<br/><br/>
|
||||
|
|
|
@ -21,6 +21,9 @@ const gNetLinkSvc =
|
|||
Cc["@mozilla.org/network/network-link-service;1"].getService(
|
||||
Ci.nsINetworkLinkService
|
||||
);
|
||||
const gDNSService = Cc["@mozilla.org/network/dns-service;1"].getService(
|
||||
Ci.nsIDNSService
|
||||
);
|
||||
|
||||
const gRequestNetworkingData = {
|
||||
http: gDashboard.requestHttpConnections,
|
||||
|
@ -105,6 +108,14 @@ function displayDns(data) {
|
|||
}
|
||||
suffixParent.replaceChild(suffix_tbody, suffixContent);
|
||||
|
||||
let trr_url_tbody = document.createElement("tbody");
|
||||
trr_url_tbody.id = "dns_trr_url";
|
||||
let trr_url = document.createElement("tr");
|
||||
trr_url.appendChild(col(gDNSService.currentTrrURI));
|
||||
trr_url_tbody.appendChild(trr_url);
|
||||
let prevURL = document.getElementById("dns_trr_url");
|
||||
prevURL.parentNode.replaceChild(trr_url_tbody, prevURL);
|
||||
|
||||
let cont = document.getElementById("dns_content");
|
||||
let parent = cont.parentNode;
|
||||
let new_cont = document.createElement("tbody");
|
||||
|
@ -274,9 +285,7 @@ function init() {
|
|||
|
||||
let clearDNSCache = document.getElementById("clearDNSCache");
|
||||
clearDNSCache.addEventListener("click", function() {
|
||||
Cc["@mozilla.org/network/dns-service;1"]
|
||||
.getService(Ci.nsIDNSService)
|
||||
.clearCache(true);
|
||||
gDNSService.clearCache(true);
|
||||
});
|
||||
|
||||
let setLogButton = document.getElementById("set-log-file-button");
|
||||
|
|
|
@ -7,6 +7,7 @@ about-networking-http = HTTP
|
|||
about-networking-sockets = Sockets
|
||||
about-networking-dns = DNS
|
||||
about-networking-dns-clear-cache-button = Clear DNS Cache
|
||||
about-networking-dns-trr-url = DoH URL
|
||||
about-networking-dns-suffix = DNS suffix
|
||||
about-networking-websockets = WebSockets
|
||||
about-networking-refresh = Refresh
|
||||
|
|
Загрузка…
Ссылка в новой задаче