Skip to content

Commit f7b6ce6

Browse files
Scratch Potatoes (ScratchAddons#8205)
* Scratch Potatoes Based on Scratch Avocados from 2022. Co-authored-by: World_Languages <[email protected]> * dirt header * Rename recommended category to potato board * Fix typo * Fix timestamps --------- Co-authored-by: World_Languages <[email protected]>
1 parent cb0061b commit f7b6ce6

File tree

8 files changed

+22
-2
lines changed

8 files changed

+22
-2
lines changed

images/dirt.jpg

4.33 KB
Loading

libraries/common/global-theme.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ export default function () {
66
const favicon = document.getElementById("favicon");
77
if (favicon) favicon.href = chrome.runtime.getURL("/images/icon-blue.png");
88
}
9+
const now = Date.now() / 1000;
10+
if (now < 1743595200 && now > 1743422400 && ["settings", "popup"].includes(location.pathname.split("/")[2])) {
11+
// March 31, 2025 12:00:00 GMT to April 2, 2025 12:00:00 GMT
12+
document.documentElement.style.setProperty("--brand-orange", "#6c503c");
13+
// https://www.deviantart.com/fabooguy/art/Dirt-Ground-Texture-Tileable-2048x2048-441212191
14+
document.documentElement.style.setProperty("--dirt-background", "url('../../images/dirt.jpg')");
15+
}
916
const lightThemeLink = document.createElement("link");
1017
lightThemeLink.setAttribute("rel", "stylesheet");
1118
lightThemeLink.setAttribute("href", chrome.runtime.getURL("/webpages/styles/colors-light.css"));

webpages/popup/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const vue = new Vue({
2525
},
2626
methods: {
2727
msg(message, ...params) {
28+
const now = Date.now() / 1000;
29+
if (message === "extensionName" && now < 1743595200 && now > 1743422400) return "Scratch Potatoes 🥔";
2830
return chrome.i18n.getMessage(message, ...params);
2931
},
3032
direction() {

webpages/popup/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ body {
1919
#header {
2020
display: flex;
2121
height: 60px;
22+
background-image: var(--dirt-background, none);
2223
}
2324
.header-button {
2425
cursor: pointer;

webpages/settings/data/addon-groups.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ export default [
5454
},
5555
{
5656
id: "recommended",
57-
name: chrome.i18n.getMessage("recommended"),
57+
name: (() => {
58+
const now = Date.now() / 1000;
59+
if (now < 1743595200 && now > 1743422400) return "Potato Board 🥔";
60+
return chrome.i18n.getMessage("recommended");
61+
})(),
5862
addonIds: [],
5963
expanded: true,
6064
iframeShow: false,

webpages/settings/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
draggable="false"
177177
/>
178178
<img src="../../images/icon-transparent.svg" class="logo" alt="Logo" draggable="false" />
179-
<h1 v-cloak>{{ msg("settings") }}</h1>
179+
<h1 v-cloak>{{ msg("settings") }}{{ aprilFoolsPotato }}</h1>
180180
</div>
181181
<div v-cloak class="search-box" :class="{smallMode: smallMode === true}">
182182
<input type="text" id="searchBox" :placeholder="searchMsg" v-model="searchInputReal" autofocus />

webpages/settings/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ let fuse;
114114
changelog: `https://scratchaddons.com/${localeSlash}changelog?${utm}`,
115115
};
116116
})(),
117+
aprilFoolsPotato: (() => {
118+
const now = Date.now() / 1000;
119+
if (now < 1743595200 && now > 1743422400) return " 🥔";
120+
else return "";
121+
})(),
117122
};
118123
},
119124
computed: {

webpages/settings/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ body {
2626
user-select: none;
2727
position: relative;
2828
z-index: 10;
29+
background-image: var(--dirt-background, none);
2930
}
3031

3132
.navbar-start {

0 commit comments

Comments
 (0)