From 1720a5e79bc2bc20b37960f4014a65ba5f5c5292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20J=C3=BCrgens?= Date: Mon, 25 Apr 2022 20:01:14 +0200 Subject: [PATCH] add v100 about dialog --- assets/patches.txt | 1 + patches/aboutLogos.patch | 17 ++++++ themes/browser/base/content/aboutDialog.css | 30 +++++++++- themes/browser/base/content/aboutDialog.js | 52 ++++++++++++++++++ themes/browser/base/content/aboutDialog.xhtml | 14 +++-- themes/browser/base/content/aboutLogos/0.png | Bin 0 -> 31030 bytes themes/browser/base/content/aboutLogos/1.png | Bin 0 -> 320913 bytes themes/browser/base/content/aboutLogos/2.png | Bin 0 -> 19804 bytes themes/browser/base/content/aboutLogos/3.png | Bin 0 -> 108203 bytes themes/browser/base/content/aboutLogos/4.png | Bin 0 -> 97950 bytes themes/browser/base/content/aboutLogos/5.png | Bin 0 -> 16991 bytes themes/browser/base/content/aboutLogos/6.png | Bin 0 -> 150542 bytes .../base/content/aboutLogos/original.svg | 25 +++++++++ 13 files changed, 132 insertions(+), 7 deletions(-) create mode 100644 patches/aboutLogos.patch create mode 100644 themes/browser/base/content/aboutLogos/0.png create mode 100644 themes/browser/base/content/aboutLogos/1.png create mode 100644 themes/browser/base/content/aboutLogos/2.png create mode 100644 themes/browser/base/content/aboutLogos/3.png create mode 100644 themes/browser/base/content/aboutLogos/4.png create mode 100644 themes/browser/base/content/aboutLogos/5.png create mode 100644 themes/browser/base/content/aboutLogos/6.png create mode 100644 themes/browser/base/content/aboutLogos/original.svg diff --git a/assets/patches.txt b/assets/patches.txt index 61b9f22..393cc72 100644 --- a/assets/patches.txt +++ b/assets/patches.txt @@ -1,3 +1,4 @@ +patches/aboutLogos.patch patches/allow-ubo-private-mode.patch patches/bootstrap-without-vcs.patch patches/context-menu.patch diff --git a/patches/aboutLogos.patch b/patches/aboutLogos.patch new file mode 100644 index 0000000..6584e40 --- /dev/null +++ b/patches/aboutLogos.patch @@ -0,0 +1,17 @@ +--- a/browser/base/jar.mn ++++ b/browser/base/jar.mn +@@ -97,6 +97,14 @@ browser.jar: + #endif + content/browser/webrtcIndicator.xhtml (content/webrtcIndicator.xhtml) + content/browser/webrtcIndicator.js (content/webrtcIndicator.js) ++ content/browser/aboutLogos/0.png (content/aboutLogos/0.png) ++ content/browser/aboutLogos/1.png (content/aboutLogos/1.png) ++ content/browser/aboutLogos/2.png (content/aboutLogos/2.png) ++ content/browser/aboutLogos/3.png (content/aboutLogos/3.png) ++ content/browser/aboutLogos/4.png (content/aboutLogos/4.png) ++ content/browser/aboutLogos/5.png (content/aboutLogos/5.png) ++ content/browser/aboutLogos/6.png (content/aboutLogos/6.png) ++ content/browser/aboutLogos/original.svg (content/aboutLogos/original.svg) + # the following files are browser-specific overrides + * content/browser/license.html (/toolkit/content/license.html) + % override chrome://global/content/license.html chrome://browser/content/license.html diff --git a/themes/browser/base/content/aboutDialog.css b/themes/browser/base/content/aboutDialog.css index d1138cd..44b3ac4 100644 --- a/themes/browser/base/content/aboutDialog.css +++ b/themes/browser/base/content/aboutDialog.css @@ -17,14 +17,38 @@ } #left { - width: 150px; flex-shrink: 0.5; - height: 150px; margin: 25px; - background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiB2aWV3Qm94PSIwIDAgNjcuNzMzIDY3LjczMyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTQyLjEwNyAtMTUzLjg5OCkiPjxjaXJjbGUgY3g9Ijc1Ljk3MyIgY3k9IjE4Ny43NjUiIHI9IjMzLjg2NyIgZmlsbD0iIzAwYWNmZiIvPjxwYXRoIGQ9Ik03Mi41NDQgMjE0LjY3N2MtNC43NDQtLjYwOS05LjI4Mi0yLjUtMTMuMjQyLTUuNTE4LTEuMjkyLS45ODUtMy43MTUtMy40MjQtNC43NzMtNC44MDQtMi45NjMtMy44NjUtNC44MDUtOC4yN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uMDE2IDMuMDMyLS4xNzMgMy43NzYtLjk5MyA0LjcxLS45MzEgMS4wNi0xLjg2MiAzLjM5MS0xLjk0IDQuODYtLjA1LjkyOC0uMTkyIDEuODMyLS4zOTUgMi41MDItLjA5LjI5NS4wNzcuMjkxIDEuMDcyLS4wMjJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTc3LjA2MiAxODEuNjU0bDEuMjIyLTEuNTY1IDEuOTY2LS4yNzUtMS4yMjIgMS41NjR6IiBmaWxsPSIjMDBhY2ZmIi8+PC9nPjwvc3ZnPg=="); + display: flex; + flex-direction: column; + align-items: center; + font-size: 10px; + position: relative; +} + +#logoA, #logoB { + width: 150px; + height: 150px; + margin-bottom: 10px; background-size: contain; background-repeat: no-repeat; background-position: center; + transition: opacity 0.5s ease; +} + +#logoA { + position: absolute; + margin-bottom: -150px; +} + +#logoCreatorA, #logoCreatorB { + height: 10px; + transition: opacity 0.5s ease; +} + +#logoCreatorA { + position: absolute; + bottom: 0; } #right { diff --git a/themes/browser/base/content/aboutDialog.js b/themes/browser/base/content/aboutDialog.js index 9b59bfc..56b5466 100644 --- a/themes/browser/base/content/aboutDialog.js +++ b/themes/browser/base/content/aboutDialog.js @@ -99,6 +99,58 @@ async function init(aEvent) { }) } + const logos = [ + { + creator: "/u/NO8X71", + url: "https://old.reddit.com/r/LibreWolf/comments/u91scw/revised_alternate_icons_with_a_night_version/" + }, + { + creator: "/u/Lythrox", + url: "https://old.reddit.com/r/LibreWolf/comments/ub65m6/librewolf_netscape_tribute/" + }, + { + creator: "/u/rere_dnaw", + url: "https://old.reddit.com/r/LibreWolf/comments/rh28rq/new_logo_ideas/" + }, + { + creator: "/u/chunkyhairball", + url: "https://old.reddit.com/r/LibreWolf/comments/qk5jiv/i_like_cute_icons_so_ima_leave_this_here/" + }, + { + creator: "/u/diiscotheque", + url: "https://old.reddit.com/r/LibreWolf/comments/tb4i52/icon_update_2/" + }, + { + creator: "/u/Huginstog", + url: "https://old.reddit.com/r/LibreWolf/comments/u5yi3d/fluffier_cuddlier_but_still_free_wild/" + }, + { + creator: "/u/diiscotheque", + url: "https://old.reddit.com/r/LibreWolf/comments/t9c84n/icon_update/" + }, + ] + + let i = Math.floor(Math.random() * 6); + + function newLogo() { + i += 1; + i = i % logos.length; + const a = i % 2 === 0 ? "A" : "B"; + const b = i % 2 === 1 ? "A" : "B"; + document.getElementById("logo" + a).style.backgroundImage = `url("chrome://browser/content/aboutLogos/${i}.png")`; + document.getElementById("logo" + a).style.opacity = 1; + document.getElementById("logo" + b).style.opacity = 0; + document.getElementById("logoCreator" + a).innerHTML = logos[i].creator + document.getElementById("logoCreator" + a).href = logos[i].url; + document.getElementById("logoCreator" + a).style.opacity = 1; + document.getElementById("logoCreator" + b).style.opacity = 0; + document.getElementById("logoCreator" + a).style.pointerEvents = "all"; + document.getElementById("logoCreator" + b).style.pointerEvents = "none"; + } + + newLogo(); + setInterval(newLogo, 7000); + window.sizeToContent(); if (AppConstants.platform == "macosx") { diff --git a/themes/browser/base/content/aboutDialog.xhtml b/themes/browser/base/content/aboutDialog.xhtml index 3c448c9..9076eb5 100644 --- a/themes/browser/base/content/aboutDialog.xhtml +++ b/themes/browser/base/content/aboutDialog.xhtml @@ -34,12 +34,18 @@