Skip to content

Commit 9284978

Browse files
authored
Merge branch 'main' into MaterArc-patch-16
2 parents d89f614 + 3f7af91 commit 9284978

143 files changed

Lines changed: 8178 additions & 793 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
{
44
"fileMatch": ["/features/*/data.json"],
55
"url": "https://raw.githubusercontent.com/STForScratch/schema/main/feature.json"
6+
},
7+
{
8+
"fileMatch": ["/manifest.json"],
9+
"url": "https://json.schemastore.org/chrome-manifest.json"
610
}
711
]
812
}

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<br />
1414
<a href="https://youtu.be/xXuZAWTmXng">Feature Showcase</a>
1515
·
16-
<a href="https://github.com/STForScratch/ScratchTools/issues/new?assignees=&labels=feature&template=bug_report.md&title=">Report a Bug</a>
16+
<a href="https://github.com/STForScratch/ScratchTools/issues/new?assignees=&labels=bug&projects=&template=--bug.yml">Report a Bug</a>
1717
·
1818
<a href="https://github.com/STForScratch/ScratchTools/issues/new?assignees=&labels=feature&template=feature_request.md&title=">Request feature</a>
1919
</p>
@@ -28,7 +28,7 @@
2828
- [Scratch APIs](#scratch-apis)
2929
- [Basics](#basics)
3030
- [Blockly Context Menus](#blockly-context-menus)
31-
- [Sound , GUI and Paint-Mode](#sound-gui-and-paint-mode)
31+
- [Sound, GUI and Paint-Mode](#sound--gui-and-paint-mode)
3232
- [Logging](#logging)
3333
- [How to Support without Code](#how-to-support-without-code)
3434

@@ -37,11 +37,27 @@ We're a browser extension for the Scratch website that makes Scratch look, work,
3737

3838
### Installing
3939
There are multiple ways of installing.
40-
- Chrome: You can download from Chrome [here](https://chrome.google.com/webstore/detail/scratchtools/jjnpbalpllpfdpgplpbcbadkgdmleopm). Then just press the Add to Chrome button, and you've downloaded ScratchTools!
41-
- Firefox/Mozilla: You can download for Firefox [here](https://addons.mozilla.org/en-US/firefox/addon/scratchtools/). You can then just add it to Firefox, and then you have ScratchTools!
42-
- Microsoft edge: You can download for Edge [here](https://microsoftedge.microsoft.com/addons/detail/scratchtools/aaidjeidbnhpjhblbianjeghjopbimmk). You can then just add it to Edge, and then you have ScratchTools!
43-
- Safari (macOS, iPadOS and iOS): You can build the extension by typing `make` for macOS, and `make ios` for the iOS app (you will have to sign it on Xcode), make sure you have enabled Developer mode and allowed unsigned extensions.
44-
- GitHub: Download from GitHub [here](https://github.com/STForScratch/ScratchTools/zipball/master). If it downloads a `.zip` file, unpack it. Then, with the folder, go to `chrome://extensions`, make sure you have developer mode enabled (switch in the top right corner), and drag the downloaded folder onto the page. Make sure you've disabled other versions of ScratchTools.
40+
- Chrome: You can download from Chrome's Extension Webstore [here](https://chrome.google.com/webstore/detail/scratchtools/jjnpbalpllpfdpgplpbcbadkgdmleopm). Then just press the Add to Chrome button, and you've downloaded ScratchTools!
41+
42+
> [!NOTE]
43+
> If you are using a browser based on Chromium (eg. Brave), then this is your way of installing unless your browser has it's own extension store.
44+
45+
- Firefox/Mozilla: You can download from Firefox Addons (Works on Firefox forks) [here](https://addons.mozilla.org/en-US/firefox/addon/scratchtools/). You can then just add it to Firefox, and then you have ScratchTools!
46+
47+
> [!NOTE]
48+
> The Firefox version of Scratchtools is behind compared to the chrome version of Scratchtools due to technical difficulties. Until a solution is found, the Firefox version will remain behind.
49+
50+
- Microsoft Edge: You can download from Edge's addon webstore [here](https://microsoftedge.microsoft.com/addons/detail/scratchtools/aaidjeidbnhpjhblbianjeghjopbimmk). You can then just add it to Edge, and then you have ScratchTools!
51+
- Safari (macOS, iPadOS and iOS): You can build the extension by typing `make` for macOS, and `make ios` for the iOS app (you will have to sign it on Xcode), make sure you have enabled Developer mode and allowed unsigned extensions.
52+
53+
- GitHub (For Chrome/Chromium): Download the zipball from the GitHub repository [here](https://github.com/STForScratch/ScratchTools/zipball/master). After the `.zip` file is downloaded, unpack it. Then, with the folder, go to `chrome://extensions` (On Chromium forks, you will often need to replace "chrome" with your browser's name. (eg. `brave://extensions`)), make sure you have developer mode enabled (switch in the top right corner), and drag the downloaded folder onto the page. Make sure you've disabled other versions of ScratchTools.
54+
55+
- GitHub (For Firefox & Firefox Forks): Download from the GitHub repository [here](https://github.com/STForScratch/ScratchTools/zipball/master). After the `.zip` file is downloaded, unpack it. Then, with the folder, go to `about:debugging`, click "This Firefox" and click "Load temporary extension", go into the extension folder and select the `manifest.json`.
56+
57+
> [!WARNING]
58+
> Extensions loaded this way onto Safari indeed temporary. Once you close the window, it will be gone. In addition, ScratchTools is still outdated on Firefox at the time of writing this.
59+
60+
- Installing with Git: Open the code dropdown on the extension's repository, copy the HTTPS url and then execute `git clone https://github.com/STForScratch/ScratchTools.git -b main` in Git, and you have installed ScratchTools! To pull changes instead of cloning the repository, enter the folder and execute `git remote add upstream https://github.com/STForScratch/ScratchTools.git -b main`. When a commit is made to the repository, you can just run `git pull upstream master` to pull the changes, note that sometimes you may need to refresh ScratchTools.
4561

4662
### Building a Feature
4763
It's not very hard to build a feature, and if you're ever having trouble, our developers are always here to help you! For ideas, code help, beta testing for your features, and more, you can [join our Discord server](https://discord.gg/5AkUsCbEsy). Now, here's how to build a feature!
@@ -69,9 +85,9 @@ Logging can be very important, especially when testing. You can use `ScratchTool
6985

7086
### How to Support without Code
7187
Not only do you have to be a developer to code for ScratchTools (technically, we would teach you if you wanted help), but you can also be a beta tester, suggest ideas, design our website, create art, and more! Here are some common things people like to help with:
72-
- **Beta testing.** You can search for bugs and then report them [here](https://scratchtools.app/bugs/). Just [download](https://github.com/STForScratch/ScratchTools/zipball/master) the newest changes from GitHub, and add them to your browser! [Here's how to add Chrome Extensions without the Chrome Webstore.](https://www.labnol.org/internet/install-chrome-extensions/25817/)
88+
- **Beta testing.** You can search for bugs and then report them [here](https://www.scratchtools.app/feedback/). Just [download](https://github.com/STForScratch/ScratchTools/zipball/master) the newest changes from GitHub, and add them to your browser! [Here's how to add Chrome Extensions without the Chrome Webstore.](https://www.labnol.org/internet/install-chrome-extensions/25817/)
7389
- **Website.** If you know HTML or CSS, we could really use your help on our website! We aren't looking for big changes, but we'd love your help with it anyways! Let us know by creating an issue or contacting a developer!
7490
- **Graphic Designer.** If you're an artist or designer, you can help us! We need banners, cool art, and more! We love all kinds of styles, you can contact us by creating an issue or contacting a developer!
75-
- **Brainstorming.** If you have ideas, you can suggest them on our [feedback section](https://scratchtools.app/feedback/)!
91+
- **Brainstorming.** If you have ideas, you can suggest them on our [feedback page](https://scratchtools.app/feedback/), [Community Discord](https://server.scratchtools.app/) or [create an issue suggesting it](https://github.com/STForScratch/ScratchTools/issues/new?assignees=&labels=new+feature&projects=&template=--feature.yml)!
7692
- **Posting.** Feel free to post about us on social media! We'd love to help as many Scratchers as possible, so every post helps!
7793

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ We only support security issues from versions currently hosted on either Chrome,
1111

1212
## Reporting a Vulnerability
1313

14-
Please do not report any vulnerabilities publicly. Please only report them at https://scratchtools.app/bugs - our official bugs site. There are links to bug and security bug forms.
14+
Please do not report any vulnerabilities publicly. Please only report them at https://scratchtools.app/feedback - our official bugs site. There are links to bug and security bug forms.

_locales/es/messages.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"extName": {
3+
"message": "ScratchTools para Scratch"
4+
},
5+
"extDescription": {
6+
"message": "ScratchTools es completamente personalizable con muchas funciones, ¡todo para hacer el sitio web de Scratch mejor y más fácil de utilizar!"
7+
},
8+
"supportButton": {
9+
"message": "Soporte"
10+
},
11+
"feedbackButton": {
12+
"message": "Danos tu opinión"
13+
},
14+
"settingsButton": {
15+
"message": "Ajustes adicionales"
16+
},
17+
"featuresFilterAll": {
18+
"message": "Todos"
19+
},
20+
"featuresFilterWebsite": {
21+
"message": "Sitio Web"
22+
},
23+
"featuresFilterEditor": {
24+
"message": "Editor"
25+
},
26+
"featuresFilterForums": {
27+
"message": "Foros"
28+
},
29+
"allFeaturesHeader": {
30+
"message": "Todas las funciones"
31+
},
32+
"forYouHeader": {
33+
"message": "Para tí"
34+
},
35+
"searchPlaceholder": {
36+
"message": "Buscar"
37+
},
38+
"creditsText": {
39+
"message": "Créditos"
40+
},
41+
"viewFeature": {
42+
"message": "Haga click para ver la función."
43+
},
44+
"themeStore": {
45+
"message": "Tienda de temas"
46+
}
47+
}

api/april/clap/script.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
export default function () {
2+
ScratchTools.waitForElements(".flex-row.stats", function (row) {
3+
if (row.querySelector(".ste-clap")) return;
4+
5+
let div = document.createElement("div");
6+
div.className = "project-claps";
7+
div.textContent = Math.ceil(
8+
Number(row.querySelector(".project-views").textContent) / 3
9+
).toString();
10+
div.addEventListener("click", function() {
11+
var snd = new Audio("https://assets.scratch.mit.edu/83c36d806dc92327b9e7049a565c6bff.wav");
12+
snd.play();
13+
})
14+
15+
row.insertBefore(div, row.querySelector(".project-remixes"));
16+
17+
insertStyles();
18+
});
19+
20+
function insertStyles() {
21+
let text =
22+
'.project-claps {cursor: pointer;display: flex;padding-right: 2rem;font-size: 1rem;font-weight: bold;align-items: center;}.project-claps:before {display: inline-block;margin-right: .5rem;background-repeat: no-repeat;background-position: center center;background-size: contain;width: 1.75rem;height: 1.75rem;content: "";filter: grayscale(1);background-image: url(https://assets.scratch.mit.edu/get_image/.%2E/f2a6327725fe174fae9f40bad1439b67.png);}';
23+
let style = document.createElement("style");
24+
style.textContent = text;
25+
document.body.appendChild(style);
26+
}
27+
}

api/april/index.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
export default async function () {
2+
if (!(new Date().getMonth() === 3 && new Date().getDate() === 1)) return;
3+
4+
if (window.location.pathname.toLowerCase().startsWith("/users/")) {
5+
let pong = await import("./pong/profile.js");
6+
pong.default();
7+
}
8+
9+
if (
10+
window.location.pathname.toLowerCase().startsWith("/explore/") ||
11+
window.location.pathname.toLowerCase().startsWith("/search/")
12+
) {
13+
let jokes = await import("./jokes/script.js");
14+
jokes.default();
15+
}
16+
17+
if (window.location.pathname.toLowerCase().startsWith("/projects/")) {
18+
let clap = await import("./clap/script.js");
19+
clap.default();
20+
}
21+
}

api/april/jokes/data.js

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
export default function () {
2+
return [
3+
"Why couldn't the bicycle stand up by itself? It was two-tired.",
4+
"What do you call fake spaghetti? An impasta.",
5+
"Why did the tomato turn red? Because it saw the salad dressing!",
6+
"What do you call cheese that isn't yours? Nacho cheese!",
7+
"Why did the scarecrow win an award? Because he was outstanding in his field.",
8+
"What did one plate say to the other plate? Dinner's on me!",
9+
"Why don't skeletons fight each other? They don't have the guts.",
10+
"Why did the golfer bring two pairs of pants? In case he got a hole in one!",
11+
"What did the janitor say when he jumped out of the closet? Supplies!",
12+
"Why don't scientists trust atoms? Because they make up everything!",
13+
"What did one ocean say to the other ocean? Nothing, they just waved.",
14+
"Why did the math book look sad? Because it had too many problems.",
15+
"What did one hat say to the other hat? You stay here, I'll go on ahead.",
16+
"Why don't eggs tell jokes? Because they might crack up!",
17+
"What did one wall say to the other wall? I'll meet you at the corner!",
18+
"Why did the cookie go to the doctor? Because it was feeling crumbly.",
19+
"What do you get when you cross a snowman and a vampire? Frostbite!",
20+
"Why was the belt arrested? For holding up a pair of pants!",
21+
"What do you call a bear with no teeth? A gummy bear!",
22+
"What do you call an alligator in a vest? An investigator!",
23+
"Why did the banana go to the doctor? It wasn't peeling well.",
24+
"What's orange and sounds like a parrot? A carrot!",
25+
"Why did the picture go to jail? Because it was framed!",
26+
"What do you call a fake noodle? An impasta!",
27+
"Why was the math book sad? It had too many problems.",
28+
"What did one strawberry say to the other strawberry? If you weren't so sweet, we wouldn't be in this jam!",
29+
"Why couldn't the leopard play hide and seek? Because he was always spotted!",
30+
"Why was the broom late? It swept in!",
31+
"What do you call a bear with no ears? B!",
32+
"Why did the tomato turn red? Because it saw the salad dressing!",
33+
"What do you get when you cross a snowman and a dog? Frostbite!",
34+
"What do you get when you cross a snowman and a vampire? Frostbite!",
35+
"What's brown and sticky? A stick!",
36+
"What do you call cheese that isn't yours? Nacho cheese!",
37+
"Why did the golfer bring two pairs of pants? In case he got a hole in one!",
38+
"What did one hat say to the other hat? You stay here, I'll go on ahead!",
39+
"Why don't skeletons fight each other? They don't have the guts!",
40+
"What do you call a cow with no legs? Ground beef!",
41+
"Why don't eggs tell jokes? They might crack up!",
42+
"Why was the computer cold? It left its Windows open!",
43+
"What do you call a sleeping bull? A bulldozer!",
44+
"Why did the bicycle fall over? Because it was two-tired!",
45+
"Why was the belt arrested? For holding up a pair of pants!",
46+
"What did one plate say to the other plate? Dinner's on me!",
47+
"What's red and smells like blue paint? Red paint!",
48+
"What do you call a fish with no eyes? Fsh!",
49+
"Why couldn't the bicycle stand up by itself? It was two-tired!",
50+
"What do you call a bear with no teeth? A gummy bear!",
51+
"Why did the scarecrow win an award? Because he was outstanding in his field!",
52+
"What did the janitor say when he jumped out of the closet? Supplies!",
53+
"What do you get when you cross a snowman and a dog? Frostbite!",
54+
"Why did the tomato turn red? Because it saw the salad dressing!",
55+
"Why did the golfer bring two pairs of pants? In case he got a hole in one!",
56+
"Why did the scarecrow win an award? Because he was outstanding in his field!",
57+
"Why don't skeletons fight each other? They don't have the guts!",
58+
"What did one hat say to the other hat? You stay here, I'll go on ahead!",
59+
"Why was the broom late? It swept in!",
60+
"What do you call a bear with no ears? B!",
61+
"Why did the tomato turn red? Because it saw the salad dressing!",
62+
"What do you get when you cross a snowman and a dog? Frostbite!",
63+
"What's brown and sticky? A stick!",
64+
"What do you call cheese that isn't yours? Nacho cheese!",
65+
"Why did the golfer bring two pairs of pants? In case he got a hole in one!",
66+
"What did one hat say to the other hat? You stay here, I'll go on ahead!",
67+
"Why don't skeletons fight each other? They don't have the guts!",
68+
"What do you call a cow with no legs? Ground beef!",
69+
"Why don't eggs tell jokes? They might crack up!",
70+
"Why was the computer cold? It left its Windows open!",
71+
"What do you call a sleeping bull? A bulldozer!",
72+
"Why did the bicycle fall over? Because it was two-tired!",
73+
"Why was the belt arrested? For holding up a pair of pants!",
74+
"What did one plate say to the other plate? Dinner's on me!",
75+
"What's red and smells like blue paint? Red paint!",
76+
"What do you call a fish with no eyes? Fsh!",
77+
"Why couldn't the bicycle stand up by itself? It was two-tired!",
78+
"What do you call a bear with no teeth? A gummy bear!",
79+
"Why did the scarecrow win an award? Because he was outstanding in his field!",
80+
"What did the janitor say when he jumped out of the closet? Supplies!",
81+
"What do you get when you cross a snowman and a dog? Frostbite!",
82+
];
83+
}

api/april/jokes/script.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
export default async function () {
2+
let jokes = (await import("./data.js")).default();
3+
let outer = await ScratchTools.waitForElement(".outer")
4+
5+
let joke = jokes[Math.floor(Math.random() * jokes.length)];
6+
7+
let div = document.createElement("div");
8+
div.textContent = joke;
9+
div.classList.add("ste-joke-banner");
10+
outer.prepend(div);
11+
12+
div.style.backgroundColor = "#eb506a"
13+
div.style.color = "white"
14+
div.style.fontSize = "1.2rem"
15+
div.style.fontWeight = "500"
16+
div.style.textAlign = "center"
17+
div.style.padding = "1rem"
18+
}

0 commit comments

Comments
 (0)