Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mullvad Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Mullvad Browser
Commits
b2453fc5
Verified
Commit
b2453fc5
authored
10 months ago
by
henry
Committed by
Pier Angelo Vendrame
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Bug 42347: Add a notification for dropped OS version support.
parent
765527d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
browser/base/content/browser.xhtml
+1
-0
1 addition, 0 deletions
browser/base/content/browser.xhtml
browser/base/content/droppedSupportNotification.js
+69
-0
69 additions, 0 deletions
browser/base/content/droppedSupportNotification.js
browser/base/jar.mn
+1
-0
1 addition, 0 deletions
browser/base/jar.mn
with
71 additions
and
0 deletions
browser/base/content/browser.xhtml
+
1
−
0
View file @
b2453fc5
...
...
@@ -123,6 +123,7 @@
Services
.
scriptloader
.
loadSubScript
(
"
chrome://browser/content/search/autocomplete-popup.js
"
,
this
);
Services
.
scriptloader
.
loadSubScript
(
"
chrome://browser/content/search/searchbar.js
"
,
this
);
Services
.
scriptloader
.
loadSubScript
(
"
chrome://browser/content/languageNotification.js
"
,
this
);
Services
.
scriptloader
.
loadSubScript
(
"
chrome://browser/content/droppedSupportNotification.js
"
,
this
);
window
.
onload
=
gBrowserInit
.
onLoad
.
bind
(
gBrowserInit
);
window
.
onunload
=
gBrowserInit
.
onUnload
.
bind
(
gBrowserInit
);
...
...
This diff is collapsed.
Click to expand it.
browser/base/content/droppedSupportNotification.js
0 → 100644
+
69
−
0
View file @
b2453fc5
"
use strict
"
;
// Show a prompt that a user's system will no longer be supported.
window
.
addEventListener
(
"
load
"
,
()
=>
{
let
labelId
;
// Expire date is 2024-10-01 (1st October 2024).
const
isExpired
=
Date
.
now
()
>
Date
.
UTC
(
2024
,
9
,
1
);
if
(
AppConstants
.
platform
===
"
macosx
"
&&
Services
.
vc
.
compare
(
Services
.
sysinfo
.
getProperty
(
"
version
"
),
"
19.0
"
// MacOS 10.15 begins with Darwin 19.0
)
<
0
)
{
labelId
=
isExpired
?
"
dropped-support-notification-macos-version-less-than-10-15-expired
"
:
"
dropped-support-notification-macos-version-less-than-10-15
"
;
}
else
if
(
AppConstants
.
platform
===
"
win
"
&&
Services
.
vc
.
compare
(
Services
.
sysinfo
.
getProperty
(
"
version
"
),
"
10.0
"
)
<
0
)
{
labelId
=
isExpired
?
"
dropped-support-notification-win-os-version-less-than-10-expired
"
:
"
dropped-support-notification-win-os-version-less-than-10
"
;
}
const
dismissedPref
=
"
browser.dropped_support_notification_v14.dismiss_version
"
;
if
(
!
labelId
)
{
// Avoid setting any preferences for supported versions, and clean up any
// old values if the user ported their profile.
Services
.
prefs
.
clearUserPref
(
dismissedPref
);
return
;
}
if
(
!
isExpired
&&
Services
.
prefs
.
getStringPref
(
dismissedPref
,
""
)
===
AppConstants
.
BASE_BROWSER_VERSION
)
{
// Already dismissed since the last update.
return
;
}
const
buttons
=
isExpired
?
undefined
:
[
{
"
l10n-id
"
:
"
dropped-support-notification-dismiss-button
"
,
callback
:
()
=>
{
Services
.
prefs
.
setStringPref
(
dismissedPref
,
AppConstants
.
BASE_BROWSER_VERSION
);
},
},
];
gNotificationBox
.
appendNotification
(
"
dropped-support-notification
"
,
{
label
:
{
"
l10n-id
"
:
labelId
},
priority
:
gNotificationBox
.
PRIORITY_WARNING_HIGH
,
},
buttons
);
});
This diff is collapsed.
Click to expand it.
browser/base/jar.mn
+
1
−
0
View file @
b2453fc5
...
...
@@ -105,4 +105,5 @@ browser.jar:
content/browser/spotlight.js (content/spotlight.js)
* content/browser/default-bookmarks.html (content/default-bookmarks.html)
content/browser/droppedSupportNotification.js (content/droppedSupportNotification.js)
content/browser/languageNotification.js (content/languageNotification.js)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment