Bug 1478869 - Allow remembering autoplay permission for session in private mode. r=johannh

MozReview-Commit-ID: BcwGZ2t06jE
This commit is contained in:
Dale Harvey 2018-08-17 11:42:04 +01:00
parent 124dd7e583
commit bd06f8da9f
2 changed files with 5 additions and 5 deletions

View file

@ -974,6 +974,7 @@ autoplay.Allow2.accesskey = A
autoplay.DontAllow.label = Dont Allow
autoplay.DontAllow.accesskey = n
autoplay.remember = Remember this decision
autoplay.remember-private = Remember for this session
# LOCALIZATION NOTE (autoplay.message): %S is the name of the site URL (https://...) trying to autoplay media
autoplay.message = Will you allow %S to autoplay media with sound?
autoplay.messageWithFile = Will you allow this file to autoplay media with sound?

View file

@ -800,13 +800,12 @@ AutoplayPermissionPrompt.prototype = {
get popupOptions() {
let learnMoreURL =
Services.urlFormatter.formatURLPref("app.support.baseURL") + "block-autoplay";
let checkbox = {
show: !PrivateBrowsingUtils.isWindowPrivate(this.browser.ownerGlobal) &&
!this.principal.URI.schemeIs("file")
};
let checkbox = {show: !this.principal.URI.schemeIs("file")};
if (checkbox.show) {
checkbox.checked = true;
checkbox.label = gBrowserBundle.GetStringFromName("autoplay.remember");
checkbox.label = PrivateBrowsingUtils.isWindowPrivate(this.browser.ownerGlobal) ?
gBrowserBundle.GetStringFromName("autoplay.remember-private") :
gBrowserBundle.GetStringFromName("autoplay.remember");
}
return {
checkbox,