Skip to content

Commit 5dbcce0

Browse files
authored
Merge pull request #280 from rgantzos/main
Move button + minimized project credits
2 parents 421cc74 + 5d90841 commit 5dbcce0

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

features/features.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@
2121
"type": ["Website"],
2222
"tags": ["New"]
2323
},
24+
{
25+
"title": "Minimized Remix Credits",
26+
"description": "The remix credit boxes for projects take space from the project Instructions, so this makes the box smaller.",
27+
"credits": ["callumjt", "rgantzos"],
28+
"urls": [
29+
"https://scratch.mit.edu/users/callumjt/",
30+
"https://scratch.mit.edu/users/rgantzos/"
31+
],
32+
"file": "minimized-remix-credits",
33+
"tags": ["New"],
34+
"type": ["Website"]
35+
},
2436
{
2537
"title": "Leave Studio Button",
2638
"description": "Adds a button to the curators page of any studios you curate or manage that allows you to easily leave the studio. A confirmation shows first.",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ScratchTools.waitForElements(
2+
".flex-row.remix-credit",
3+
function (el) {
4+
el.querySelector("img").remove();
5+
var title = el.querySelector("[href^='/projects/']").textContent;
6+
var link = el.querySelector("[href^='/projects/']").href;
7+
var a = document.createElement("a");
8+
a.textContent = title;
9+
a.href = link;
10+
el.textContent = "Original project: ";
11+
a.style.marginLeft = ".25rem";
12+
el.appendChild(a);
13+
},
14+
"minimizedRemixCredits",
15+
false
16+
);

0 commit comments

Comments
 (0)