Skip to content

Commit 4f0ad6b

Browse files
authored
Bump to v2.0 / Add support for lagoon theme
1 parent 7521055 commit 4f0ad6b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

TangerineUI.user.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
// @match https://mastodon.social/*
66
// @match https://piaille.fr/*
77
// @match https://eldritch.cafe/*
8+
// @match https://h-i.social/*
89
// @match https://AddYourInstanceUrlHere.tld/*
910
// @downloadURL https://github.com/Write/TangerineUI-Userscript/raw/main/TangerineUI.user.js
1011
// @updateURL https://github.com/Write/TangerineUI-Userscript/raw/main/TangerineUI.user.js
1112
// @homepageURL https://github.com/Write/TangerineUI-Userscript
1213
// @grant none
13-
// @version 2.1.2
14+
// @version 2.2.0
1415
// @author @Write on Github for the UserScript
1516
// @author @nileane for TangerineUI's CSS
1617
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACE0lEQVR4AZXOA2xeUQAF4BvNW8xGi7WFY227v81otu0Fs23btq3attunvrN7//bOPMmX98414bFa4edyda12u7te0m8d1UKhRyNVT32idrtcGE6+jdMpBzjtUjOFf2KTZJddchKWsWPR22HprKLATBwnYOM6CfNni+Bjs2d0j02ZKLDOCVZrhx9xGNuT7aY2MAvmdKCjQwXP0UMidm4ToPYMiSKwcmkn+Hqbsd1L7LqWqTZ9M5injyXf4oN7O3HkQCdkGRAEFWdOCNi9vROKAnx8L4Ovt+uaZhCbpn6eTVsPpjBfRkN9F3ivLFfQ0qJ+6SXFCupqv86zvcSWVjPTml4DprhQRm21At7ZgbU1X3tBnoxGegHvlvSa2cSaUjXWklIJhh/Ae2Ge5DuA94JcyfdC3q2plVOJObncYU4qA1NcIPkO4H2soxLjXZW80wNEesDXeVNSqYcY44s1pvhiMDcvt+LB7Tbw/qPrF1rx+F77l25IKh1KjNEFw40xBfhfhpiCs4RFE/JxgDEqR6Xwj5qptZaot/0JjyE867UhPBOcMeJThCH8U6QhLNNgjMj06iMyjfQ/0RSROSQ2Nrc3+TG60I/J+tAPKgWfsI/7NaMe9SXfxBSbO4j8Kdrgdx5d0FuBQrd3zbrgN28Y2quofPK3aILeDtb6v1yt8X/5Suv/qo0Sdf6vijT+r05q/F9Hkl/kM/y+SpUd6mHfAAAAAElFTkSuQmCC
@@ -29,15 +30,15 @@
2930
const legacyColorScheme = 'tangerine';
3031

3132
/* colorScheme used for new (>= 4.3) instances */
32-
/* Either 'tangerine', 'purple' or 'cherry' */
33-
const newColorScheme = 'tangerine';
33+
/* Either 'tangerine', 'purple', 'cherry' or 'lagoon' */
34+
const colorScheme = 'tangerine';
3435

3536
/* Github tag to use for mastodon instance < 4.3 and >= 4.3
3637
/* To find tags name, go here : https://github.com/nileane/TangerineUI-for-Mastodon/releases
3738
/* and look at the tag name in the left sidebar of the release
3839
* */
3940
const tag_below_4_3_0 = "v1.9.5"
40-
const tag_above_or_equals_4_3_0 = "v2.0.0-pre6"
41+
const tag_above_or_equals_4_3_0 = "v2.0"
4142

4243
/* ----------------
4344
* HELPERS
@@ -63,8 +64,9 @@
6364
}
6465

6566
const isPurpleLegacy = legacyColorScheme.includes('purple') ? true : false;
66-
const isPurple = newColorScheme.includes('purple') ? true : false;
67-
const isCherry = newColorScheme.includes('cherry') ? true : false;
67+
const isPurple = colorScheme.includes('purple') ? true : false;
68+
const isCherry = colorScheme.includes('cherry') ? true : false;
69+
const isLagoon = colorScheme.includes('lagoon') ? true : false;
6870

6971
const onElemAvailable = async selector => {
7072
while (document.querySelector(selector) === null) {
@@ -105,6 +107,8 @@
105107
styleUrl = tangerine_above_or_equals_4_3_0 + "-purple.min.css"
106108
else if (isCherry)
107109
styleUrl = tangerine_above_or_equals_4_3_0 + "-cherry.min.css"
110+
else if (isLagoon)
111+
styleUrl = tangerine_above_or_equals_4_3_0 + "-lagoon.min.css"
108112
else
109113
styleUrl = tangerine_above_or_equals_4_3_0 + ".min.css"
110114
} else {

0 commit comments

Comments
 (0)