From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../im/messages/dark/Incoming/Content.html | 2 + .../im/messages/dark/Incoming/Context.html | 2 + .../im/messages/dark/Incoming/NextContent.html | 2 + .../im/messages/dark/Incoming/NextContext.html | 2 + comm/mail/components/im/messages/dark/Info.plist | 41 +++++++ comm/mail/components/im/messages/dark/Status.html | 1 + .../components/im/messages/dark/Variants/Blue.css | 8 ++ .../components/im/messages/dark/Variants/Green.css | 8 ++ .../im/messages/dark/Variants/Purple.css | 8 ++ .../components/im/messages/dark/Variants/Red.css | 8 ++ .../im/messages/dark/Variants/Yellow.css | 8 ++ comm/mail/components/im/messages/dark/inline.js | 60 ++++++++++ comm/mail/components/im/messages/dark/main.css | 127 +++++++++++++++++++++ 13 files changed, 277 insertions(+) create mode 100644 comm/mail/components/im/messages/dark/Incoming/Content.html create mode 100644 comm/mail/components/im/messages/dark/Incoming/Context.html create mode 100644 comm/mail/components/im/messages/dark/Incoming/NextContent.html create mode 100644 comm/mail/components/im/messages/dark/Incoming/NextContext.html create mode 100644 comm/mail/components/im/messages/dark/Info.plist create mode 100644 comm/mail/components/im/messages/dark/Status.html create mode 100644 comm/mail/components/im/messages/dark/Variants/Blue.css create mode 100644 comm/mail/components/im/messages/dark/Variants/Green.css create mode 100644 comm/mail/components/im/messages/dark/Variants/Purple.css create mode 100644 comm/mail/components/im/messages/dark/Variants/Red.css create mode 100644 comm/mail/components/im/messages/dark/Variants/Yellow.css create mode 100644 comm/mail/components/im/messages/dark/inline.js create mode 100644 comm/mail/components/im/messages/dark/main.css (limited to 'comm/mail/components/im/messages/dark') diff --git a/comm/mail/components/im/messages/dark/Incoming/Content.html b/comm/mail/components/im/messages/dark/Incoming/Content.html new file mode 100644 index 0000000000..3db2719441 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Incoming/Content.html @@ -0,0 +1,2 @@ +

%sender% %message%

+
diff --git a/comm/mail/components/im/messages/dark/Incoming/Context.html b/comm/mail/components/im/messages/dark/Incoming/Context.html new file mode 100644 index 0000000000..0b8c7ec20f --- /dev/null +++ b/comm/mail/components/im/messages/dark/Incoming/Context.html @@ -0,0 +1,2 @@ +

%sender%%message%

+
diff --git a/comm/mail/components/im/messages/dark/Incoming/NextContent.html b/comm/mail/components/im/messages/dark/Incoming/NextContent.html new file mode 100644 index 0000000000..c62098d838 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Incoming/NextContent.html @@ -0,0 +1,2 @@ +

%message%

+
diff --git a/comm/mail/components/im/messages/dark/Incoming/NextContext.html b/comm/mail/components/im/messages/dark/Incoming/NextContext.html new file mode 100644 index 0000000000..d57fd3b1a6 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Incoming/NextContext.html @@ -0,0 +1,2 @@ +

%message%

+
diff --git a/comm/mail/components/im/messages/dark/Info.plist b/comm/mail/components/im/messages/dark/Info.plist new file mode 100644 index 0000000000..3de1af0f4d --- /dev/null +++ b/comm/mail/components/im/messages/dark/Info.plist @@ -0,0 +1,41 @@ + + + + + ActionMessageTemplate + %sender% %message% + + CFBundleDevelopmentRegion + English + + CFBundleGetInfoString + Instantbird Dark Message Style + + CFBundleIdentifier + org.instantbird.dark.message.style + + CFBundleInfoDictionaryVersion + 1.0 + + CFBundleName + Dark + + CFBundlePackageType + AdIM + + DefaultBackgroundColor + 000000 + + DefaultVariant + Blue + + DisableCustomBackground + + + MessageViewVersion + 4 + + ShowsUserIcons + + + diff --git a/comm/mail/components/im/messages/dark/Status.html b/comm/mail/components/im/messages/dark/Status.html new file mode 100644 index 0000000000..cb3bedf216 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Status.html @@ -0,0 +1 @@ +

%time% - %message%

diff --git a/comm/mail/components/im/messages/dark/Variants/Blue.css b/comm/mail/components/im/messages/dark/Variants/Blue.css new file mode 100644 index 0000000000..d32a90406f --- /dev/null +++ b/comm/mail/components/im/messages/dark/Variants/Blue.css @@ -0,0 +1,8 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +p.incoming { + border-top: 1px solid hsla(215, 100%, 80%, 0.4); + background: -moz-linear-gradient(top, hsla(215, 100%, 80%, 0.3), hsla(215, 100%, 80%, 0.1) 30px); +} diff --git a/comm/mail/components/im/messages/dark/Variants/Green.css b/comm/mail/components/im/messages/dark/Variants/Green.css new file mode 100644 index 0000000000..d2a8ecca33 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Variants/Green.css @@ -0,0 +1,8 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +p.incoming { + border-top: 1px solid hsla(150, 80%, 80%, 0.4); + background: -moz-linear-gradient(top, hsla(150, 80%, 80%, 0.3), hsla(150, 80%, 80%, 0.1) 30px); +} diff --git a/comm/mail/components/im/messages/dark/Variants/Purple.css b/comm/mail/components/im/messages/dark/Variants/Purple.css new file mode 100644 index 0000000000..bf26f8d549 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Variants/Purple.css @@ -0,0 +1,8 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +p.incoming { + border-top: 1px solid hsla(275, 100%, 80%, 0.4); + background: -moz-linear-gradient(top, hsla(275, 100%, 80%, 0.3), hsla(275, 100%, 80%, 0.1) 30px); +} diff --git a/comm/mail/components/im/messages/dark/Variants/Red.css b/comm/mail/components/im/messages/dark/Variants/Red.css new file mode 100644 index 0000000000..5bb6dab2ed --- /dev/null +++ b/comm/mail/components/im/messages/dark/Variants/Red.css @@ -0,0 +1,8 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +p.incoming { + border-top: 1px solid hsla(0, 100%, 80%, 0.4); + background: -moz-linear-gradient(top, hsla(0, 100%, 80%, 0.3), hsla(0, 100%, 80%, 0.1) 30px); +} diff --git a/comm/mail/components/im/messages/dark/Variants/Yellow.css b/comm/mail/components/im/messages/dark/Variants/Yellow.css new file mode 100644 index 0000000000..aa493bfdc7 --- /dev/null +++ b/comm/mail/components/im/messages/dark/Variants/Yellow.css @@ -0,0 +1,8 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +p.incoming { + border-top: 1px solid hsla(50, 100%, 80%, 0.4); + background: -moz-linear-gradient(top, hsla(50, 100%, 80%, 0.3), hsla(50, 100%, 80%, 0.1) 30px); +} diff --git a/comm/mail/components/im/messages/dark/inline.js b/comm/mail/components/im/messages/dark/inline.js new file mode 100644 index 0000000000..71cbd46475 --- /dev/null +++ b/comm/mail/components/im/messages/dark/inline.js @@ -0,0 +1,60 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +const p_border_top = "1px solid hsla(#, 100%, 80%, 0.4)"; +const p_background = + "-moz-linear-gradient(top, hsla(#, 100%, 80%, 0.3), hsla(#, 100%, 80%, 0.1) 30px)"; +const nick_background = + "-moz-linear-gradient(top, hsla(#, 100%, 80%, 0.3), hsla(#, 100%, 80%, 0.1) 1em)"; + +function setColors(target) { + var senderColor = target.getAttribute("data-senderColor"); + + if (!senderColor) { + return; + } + + var regexp = + /color:\s*hsl\(\s*(\d{1,3})\s*,\s*\d{1,3}\%\s*,\s*\d{1,3}\%\s*\)/; + var parsed = regexp.exec(senderColor); + + if (!parsed) { + return; + } + + var senderHue = parsed[1]; + + target.style.borderTop = p_border_top.replace("#", senderHue); + target.style.background = p_background.replace(/#/g, senderHue); +} + +function checkNewText(target) { + if (target.tagName == "P" && target.className != "event-messages") { + setColors(target); + } + + var nicks = target.getElementsByClassName("ib-nick"); + for (var i = 0; i < nicks.length; ++i) { + var nick = nicks[i]; + if (!nick.hasAttribute("data-left")) { + nick.style.background = nick_background.replace( + /#/g, + nick.getAttribute("data-nickColor") + ); + } + } +} + +new MutationObserver(function (aMutations) { + for (let mutation of aMutations) { + for (let node of mutation.addedNodes) { + if (node instanceof HTMLElement) { + checkNewText(node); + } + } + } +}).observe(document.getElementById("ibcontent"), { + childList: true, + subtree: true, +}); diff --git a/comm/mail/components/im/messages/dark/main.css b/comm/mail/components/im/messages/dark/main.css new file mode 100644 index 0000000000..b3f94d9d2c --- /dev/null +++ b/comm/mail/components/im/messages/dark/main.css @@ -0,0 +1,127 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +body { + margin: 0; + padding: 0; + background-color: black; +} + +p { + font-family: sans-serif; + margin: 0; + padding: 0; + color: rgba(255, 255, 255, 0.6); +} + +p.message { + margin: 0; + padding: 4px 15px 6px 15px; + border-bottom: 1px solid black; + border-top: 1px solid rgba(255, 255, 255, 0.3); + background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07) 30px); +} + +p.context:not(:hover) { + opacity: 0.5; + color: rgba(255, 255, 255, 1); +} + +span.message-style, +p.event-messages { + font-size: 90%; +} + +p.event-messages { + margin: 5px 0px 5px 0px; + text-align: center; + opacity: 0.4; + -moz-transition-property: opacity; + -moz-transition-duration: 0.3s; +} + +p.event-messages:hover { + opacity: 1; +} + +.message-style { + display: block; +} + +.pseudo { + margin-bottom: 3px; + font-weight: bold; + color: white; + display: block; +} + +.nick > .message-style { + font-weight: bold; +} + +.action > .message-style { + font-style: italic; +} + +.action > .message-style::before { + content: "*** "; +} + +a, +a:hover { + color: rgba(255, 255, 255, 0.6); +} + +a:active { + color: rgba(255, 255, 255, 1); +} + +a:visited { + color: rgba(255, 255, 255, 0.4); +} + +#Chat { + white-space: normal; +} + +p *:any-link img { + margin-bottom: 1px; + border-bottom: solid 1px; +} + +.ib-nick { + color: white !important; + border-radius: 3px; + padding: 0 0.25em; +} + +.ib-nick[left] { + color: white !important; + background-color: black; + opacity: 0.4; + -moz-transition-property: opacity; + -moz-transition-duration: 0.3s; +} + +.ib-nick[left]:hover { + opacity: 1; +} + +.ib-sender.message-encrypted { + position: relative; +} + +.ib-sender.message-encrypted::after { + position: relative; + display: inline-block; + content: ''; + width: 11px; + height: 11px; + opacity: 0.5; + background: url("chrome://messenger/skin/icons/connection-secure.svg") no-repeat center; + background-size: contain; + margin-inline-start: 4px; + -moz-context-properties: fill; + fill: currentColor; +} -- cgit v1.2.3