Bug 1589076 - Add dns suffix list to about:networking r=kershaw,fluent-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D49432

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Valentin Gosu 2019-10-17 16:15:24 +00:00
parent 9a71f8e114
commit 3961d153bb
3 changed files with 25 additions and 0 deletions

View File

@ -88,6 +88,21 @@ function displaySockets(data) {
}
function displayDns(data) {
let suffixContent = document.getElementById("dns_suffix_content");
let suffixParent = suffixContent.parentNode;
let suffixes = [];
try {
suffixes = gNetLinkSvc.dnsSuffixList; // May throw
} catch (e) {}
let suffix_tbody = document.createElement("tbody");
suffix_tbody.id = "dns_suffix_content";
for (let suffix of suffixes) {
let row = document.createElement("tr");
row.appendChild(col(suffix));
suffix_tbody.appendChild(row);
}
suffixParent.replaceChild(suffix_tbody, suffixContent);
let cont = document.getElementById("dns_content");
let parent = cont.parentNode;
let new_cont = document.createElement("tbody");

View File

@ -85,6 +85,15 @@
</div>
<div id="dns" class="tab" hidden="true">
<table>
<thead>
<tr>
<th data-l10n-id="dnssuffix"/>
</tr>
</thead>
<tbody id="dns_suffix_content" />
</table>
<br/><br/>
<table>
<thead>
<tr>

View File

@ -6,6 +6,7 @@ title = About Networking
http = HTTP
sockets = Sockets
dns = DNS
dnssuffix = DNS suffix
websockets = WebSockets
refresh = Refresh
auto-refresh = Autorefresh every 3 seconds