Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Tor Browser
Commits
9693c926
Verified
Commit
9693c926
authored
10 months ago
by
henry
Committed by
ma1
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Bug 42347: Add a notification for dropped OS version support.
parent
9e05ca8c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1326
Bug 43383: Rebased legacy onto 115.19.0esr
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 @
9693c926
...
...
@@ -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 @
9693c926
"
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 @
9693c926
...
...
@@ -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