Commit 13ca58b1 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Browser extension may include inline styles

parent 4558c766
...@@ -848,7 +848,8 @@ ...@@ -848,7 +848,8 @@
if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
for (index = 0; index < document.styleSheets.length; index += 1) { for (index = 0; index < document.styleSheets.length; index += 1) {
styleSheet = document.styleSheets[index]; styleSheet = document.styleSheets[index];
if (styleSheet.href.startsWith('data:text/css;')) { if ((styleSheet.href !== null) &&
(styleSheet.href.startsWith('data:text/css;'))) {
wallpaper_url = styleSheet.cssRules[0].style wallpaper_url = styleSheet.cssRules[0].style
.backgroundImage.slice(4, -1).replace(/["']/g, ''); .backgroundImage.slice(4, -1).replace(/["']/g, '');
wallpaper_absolute_url = new URL( wallpaper_absolute_url = new URL(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment