Skip to content

Commit 9ae53ff

Browse files
committed
Fix duplicating most popular project
1 parent 5db130f commit 9ae53ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

features/most-popular-project.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ function maximumViews(numArray) {
4646
}
4747

4848
function addBox(title, id, views, instructions) {
49+
if (document.querySelector(".ste-most-popular")) return;
4950
var a = document.createElement("a");
5051
a.href = `https://scratch.mit.edu/projects/${id}/`;
5152
var box = document.createElement("div");
52-
box.className = "box";
53+
box.className = "box ste-most-popular";
5354
var boxHead = document.createElement("div");
5455
boxHead.className = "box-head";
5556
var boxTitle = document.createElement("h4");

0 commit comments

Comments
 (0)