Bug 557738 - Add user.js section to about:support. r=adw
This commit is contained in:
@@ -366,4 +366,12 @@ let dataProviders = {
|
||||
}
|
||||
done(data);
|
||||
},
|
||||
|
||||
userJS: function userJS(done) {
|
||||
let userJSFile = Services.dirsvc.get("PrefD", Ci.nsIFile);
|
||||
userJSFile.append("user.js");
|
||||
done({
|
||||
exists: userJSFile.exists() && userJSFile.fileSize > 0,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
@@ -178,6 +178,15 @@ let snapshotFormatters = {
|
||||
);
|
||||
$.append($("libversions-tbody"), trs);
|
||||
},
|
||||
|
||||
userJS: function userJS(data) {
|
||||
if (!data.exists)
|
||||
return;
|
||||
let userJSFile = Services.dirsvc.get("PrefD", Ci.nsIFile);
|
||||
userJSFile.append("user.js");
|
||||
$("prefs-user-js-link").href = Services.io.newFileURI(userJSFile).spec;
|
||||
$("prefs-user-js-section").style.display = "";
|
||||
},
|
||||
};
|
||||
|
||||
let $ = document.getElementById.bind(document);
|
||||
|
||||
@@ -209,6 +209,11 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<section id="prefs-user-js-section" style="display:none">
|
||||
<h3>&aboutSupport.userJSTitle;</h3>
|
||||
<p>&aboutSupport.userJSDescription;</p>
|
||||
</section>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - -->
|
||||
<h2 class="major-section">
|
||||
&aboutSupport.graphicsTitle;
|
||||
|
||||
@@ -322,6 +322,16 @@ const SNAPSHOT_SCHEMA = {
|
||||
},
|
||||
},
|
||||
},
|
||||
userJS: {
|
||||
required: true,
|
||||
type: "object",
|
||||
properties: {
|
||||
exists: {
|
||||
required: true,
|
||||
type: "boolean",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -46,6 +46,10 @@ variant of aboutSupport.showDir.label. -->
|
||||
<!ENTITY aboutSupport.modifiedPrefsName "Name">
|
||||
<!ENTITY aboutSupport.modifiedPrefsValue "Value">
|
||||
|
||||
<!-- LOCALIZATION NOTE (aboutSupport.userJSTitle, aboutSupport.userJSDescription): user.js is the name of the preference override file being checked. -->
|
||||
<!ENTITY aboutSupport.userJSTitle "user.js Preferences">
|
||||
<!ENTITY aboutSupport.userJSDescription "Your profile folder contains a <a id='prefs-user-js-link'>user.js file</a>, which includes preferences that were not created by &brandShortName;.">
|
||||
|
||||
<!ENTITY aboutSupport.graphicsTitle "Graphics">
|
||||
|
||||
<!ENTITY aboutSupport.jsTitle "JavaScript">
|
||||
|
||||
Reference in New Issue
Block a user