Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
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
Pleroma
pleroma-fe
Commits
1bdf67c0
Commit
1bdf67c0
authored
2 weeks ago
by
HJ
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-palememe' into 'develop'
Fix Palemoon See merge request
!2072
parents
ce29e791
081890be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2072
Fix Palemoon
Pipeline
#52106
passed
2 weeks ago
Stage: lint
Stage: build
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
changelog.d/palemoon-css-compatibility.fix
+1
-0
1 addition, 0 deletions
changelog.d/palemoon-css-compatibility.fix
src/main.js
+7
-0
7 additions, 0 deletions
src/main.js
src/services/style_setter/style_setter.js
+23
-6
23 additions, 6 deletions
src/services/style_setter/style_setter.js
with
31 additions
and
6 deletions
changelog.d/palemoon-css-compatibility.fix
0 → 100644
+
1
−
0
View file @
1bdf67c0
Fix CSS compatibility issues in style_setter.js for older browsers like Palemoon
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main.js
+
7
−
0
View file @
1bdf67c0
...
...
@@ -5,6 +5,13 @@ import { createPinia } from 'pinia'
import
'
custom-event-polyfill
'
import
'
./lib/event_target_polyfill.js
'
// Polyfill for Array.prototype.toSorted (ES2023)
if
(
!
Array
.
prototype
.
toSorted
)
{
Array
.
prototype
.
toSorted
=
function
(
compareFn
)
{
return
[...
this
].
sort
(
compareFn
)
}
}
import
vuexModules
from
'
./modules/index.js
'
import
{
createI18n
}
from
'
vue-i18n
'
...
...
This diff is collapsed.
Click to expand it.
src/services/style_setter/style_setter.js
+
23
−
6
View file @
1bdf67c0
...
...
@@ -124,16 +124,33 @@ export const applyTheme = (
const
lazyStyles
=
createStyleSheet
(
LAZY_STYLE_ID
)
const
insertRule
=
(
styles
,
rule
)
=>
{
if
(
rule
.
indexOf
(
'
webkit
'
)
>=
0
)
{
try
{
// Try to use modern syntax first
try
{
styles
.
sheet
.
insertRule
(
rule
,
'
index-max
'
)
styles
.
rules
.
push
(
rule
)
}
catch
(
e
)
{
console
.
warn
(
'
Can
\'
t insert rule due to lack of support
'
,
e
)
}
catch
{
// Fallback for older browsers that don't support 'index-max'
styles
.
sheet
.
insertRule
(
rule
,
styles
.
sheet
.
cssRules
.
length
)
styles
.
rules
.
push
(
rule
)
}
}
catch
(
e
)
{
console
.
warn
(
'
Can
\'
t insert rule due to lack of support
'
,
e
,
rule
)
// Try to sanitize the rule for better compatibility
try
{
// Remove any potentially problematic CSS features
let
sanitizedRule
=
rule
.
replace
(
/backdrop-filter:
[^
;
]
+;/g
,
''
)
// Remove backdrop-filter
.
replace
(
/var
\(
--shadowFilter
\)[^
;
]
*;/g
,
''
)
// Remove shadowFilter references
if
(
sanitizedRule
!==
rule
)
{
styles
.
sheet
.
insertRule
(
sanitizedRule
,
styles
.
sheet
.
cssRules
.
length
)
styles
.
rules
.
push
(
sanitizedRule
)
}
}
catch
(
e2
)
{
console
.
error
(
'
Failed to insert even sanitized rule
'
,
e2
)
}
}
else
{
styles
.
sheet
.
insertRule
(
rule
,
'
index-max
'
)
styles
.
rules
.
push
(
rule
)
}
}
...
...
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