mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 07:07:30 +09:00
revert and rewrite "Remove e10s info from about:support (f7f7224de)" to not relying on string bundle (i.e. becoming non-translable) in order to compatible to official language packs
This commit is contained in:
parent
b415378cc3
commit
7da25d73be
4 changed files with 54 additions and 0 deletions
|
|
@ -53,6 +53,32 @@ var snapshotFormatters = {
|
|||
if (data.updateChannel)
|
||||
$("updatechannel-box").textContent = data.updateChannel;
|
||||
|
||||
let statusText = "unknown status";
|
||||
|
||||
// Whitelist of known values with string descriptions:
|
||||
switch (data.autoStartStatus) {
|
||||
case 0:
|
||||
statusText = "Enabled by user"; break;
|
||||
case 1:
|
||||
statusText = "Enabled by default"; break;
|
||||
case 2:
|
||||
statusText = "Disabled"; break;
|
||||
case 4:
|
||||
statusText = "Disabled by accessibility tools"; break;
|
||||
case 6:
|
||||
statusText = "Disabled by unsupported text input"; break;
|
||||
case 7:
|
||||
statusText = "Disabled by add-ons"; break;
|
||||
case 8:
|
||||
statusText = "Disabled forcibly"; break;
|
||||
|
||||
case 10:
|
||||
statusText = (Services.appinfo.OS == "Darwin" ? "OS X 10.6 - 10.8" : "Windows XP");
|
||||
break;
|
||||
}
|
||||
|
||||
$("multiprocess-box").textContent = data.numRemoteWindows + "/" + data.numTotalWindows + " (" statusText + ")";
|
||||
|
||||
$("safemode-box").textContent = data.safeMode;
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -234,6 +234,15 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="column">
|
||||
Multiprocess Windows
|
||||
</th>
|
||||
|
||||
<td id="multiprocess-box">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="column">
|
||||
&aboutSupport.appBasicsSafeMode;
|
||||
|
|
|
|||
|
|
@ -220,6 +220,18 @@ var dataProviders = {
|
|||
}
|
||||
}
|
||||
|
||||
data.remoteAutoStart = Services.appinfo.browserTabsRemoteAutostart;
|
||||
|
||||
try {
|
||||
let e10sStatus = Cc["@mozilla.org/supports-PRUint64;1"]
|
||||
.createInstance(Ci.nsISupportsPRUint64);
|
||||
let appinfo = Services.appinfo.QueryInterface(Ci.nsIObserver);
|
||||
appinfo.observe(e10sStatus, "getE10SBlocked", "");
|
||||
data.autoStartStatus = e10sStatus.data;
|
||||
} catch (e) {
|
||||
data.autoStartStatus = -1;
|
||||
}
|
||||
|
||||
done(data);
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,13 @@ const SNAPSHOT_SCHEMA = {
|
|||
supportURL: {
|
||||
type: "string",
|
||||
},
|
||||
remoteAutoStart: {
|
||||
type: "boolean",
|
||||
required: true,
|
||||
},
|
||||
autoStartStatus: {
|
||||
type: "number",
|
||||
},
|
||||
numTotalWindows: {
|
||||
type: "number",
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue