Skip to content

Commit 48b9d83

Browse files
authored
Merge pull request #950 from rgantzos/main
Add How-To video links
2 parents c8a7d08 + e2909dc commit 48b9d83

File tree

9 files changed

+81
-5
lines changed

9 files changed

+81
-5
lines changed

extras/icons/external.svg

Lines changed: 1 addition & 0 deletions
Loading

extras/popup/popup.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,4 +508,27 @@ span.new-feature-tag.beta {
508508

509509
.option-selection span:last-child {
510510
border-inline-end: none;
511+
}
512+
513+
/* Support */
514+
515+
.support-vid {
516+
color: #ff9f00 !important;
517+
opacity: .5;
518+
cursor: pointer;
519+
position: relative;
520+
top: -.25rem;
521+
margin-bottom: .25rem;
522+
display: block;
523+
}
524+
525+
.support-vid:hover {
526+
opacity: 1;
527+
}
528+
529+
.support-vid img {
530+
height: 1rem;
531+
margin-left: .25rem;
532+
position: relative;
533+
top: .3rem;
511534
}

extras/popup/popup.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,23 @@ async function getFeatures() {
679679
languageData[feature.id + "/description"]?.message || feature.description;
680680
div.appendChild(p);
681681

682+
if (feature.support?.yt) {
683+
let span = document.createElement("span")
684+
span.textContent = "How-To Video"
685+
span.className = "support-vid"
686+
span.dataset.url = feature.support.yt
687+
span.addEventListener("click", function() {
688+
let url = this.dataset.url
689+
chrome.tabs.create({
690+
url,
691+
})
692+
})
693+
span.appendChild(Object.assign(document.createElement("img"), {
694+
src: "/extras/icons/external.svg"
695+
}))
696+
div.appendChild(span)
697+
}
698+
682699
if (feature.options) {
683700
for (var optionPlace in feature.options) {
684701
var option = feature.options[optionPlace];

extras/style.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,4 +887,24 @@ body {
887887

888888
.option-selection span:last-child {
889889
border-inline-end: none;
890+
}
891+
/* Support */
892+
893+
.support-vid {
894+
color: #ff9f00 !important;
895+
opacity: .5;
896+
cursor: pointer;
897+
position: relative;
898+
top: -.25rem;
899+
}
900+
901+
.support-vid:hover {
902+
opacity: 1;
903+
}
904+
905+
.support-vid img {
906+
height: 1rem;
907+
margin-left: .25rem;
908+
position: relative;
909+
top: .3rem;
890910
}

features/asset-size/data.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
],
1010
"type": ["Editor"],
1111
"dynamic": true,
12-
"scripts": [{ "file": "script.js", "runOn": "/projects/*" }]
12+
"scripts": [{ "file": "script.js", "runOn": "/projects/*" }],
13+
"support": {
14+
"yt": "https://youtu.be/gpH3VJvDTkc"
15+
}
1316
}
1417

features/chomp-blocks/data.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
"tags": [],
1111
"scripts": [{ "file": "script.js", "runOn": "/projects/*" }],
1212
"dynamic": true,
13-
"type": ["Editor"]
13+
"type": ["Editor"],
14+
"support": {
15+
"yt": "https://youtu.be/6sl-Q0ZYYyQ"
16+
}
1417
}

features/custom-explore/data.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,8 @@
6161
}
6262
]
6363
}
64-
]
64+
],
65+
"support": {
66+
"yt": "https://youtu.be/QIWxCXrD2-M"
67+
}
6568
}

features/more-editor-fonts/data.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@
1212
"tags": ["New", "Featured"],
1313
"scripts": [{ "file": "script.js", "runOn": "/projects/*" }],
1414
"styles": [{ "file": "style.css", "runOn": "/projects/*" }],
15-
"resources": [{ "name": "more-text-icon", "path": "/text.svg" }]
15+
"resources": [{ "name": "more-text-icon", "path": "/text.svg" }],
16+
"support": {
17+
"yt": "https://youtu.be/zh3zsjBcz_M"
18+
}
1619
}

features/rotate-gradient/data.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
"type": ["Editor"],
1111
"dynamic": true,
1212
"scripts": [{ "file": "script.js", "runOn": "/projects/*" }],
13-
"styles": [{ "file": "style.css", "runOn": "/projects/*" }]
13+
"styles": [{ "file": "style.css", "runOn": "/projects/*" }],
14+
"support": {
15+
"yt": "https://youtu.be/5S032vWPvd0"
16+
}
1417
}

0 commit comments

Comments
 (0)