Skip to content

Commit 3f498d3

Browse files
committed
Add video note option
1 parent 8191458 commit 3f498d3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

js/resources.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ var trackOutboundLink = function(url) {
2020
});
2121
}
2222

23+
function create_optional_note(note, backup) {
24+
if (note === undefined || note === "#") {
25+
return backup;
26+
}
27+
28+
return ' (' + note + ')';
29+
}
30+
2331
function create_anchor(href, title, backup, tracker) {
2432
// No outgoing link, so just replace it with whatever the backup text is
2533
if (href === '#') {
@@ -110,7 +118,7 @@ function create_lecture_tr(lecture) {
110118
<tr>
111119
<th scope="row">Title</th>
112120
<td><a href=...>Slides</a></td>
113-
<td><a href=...>Video</a></td>
121+
<td><a href=...>Video</a> (Video Note)</td>
114122
</tr>
115123
*/
116124
if (!lecture.visible) return null;
@@ -127,6 +135,8 @@ function create_lecture_tr(lecture) {
127135
).append(
128136
$('<td>').append(
129137
create_anchor(lecture.video, "video", "Currently Unavailable", gtag_trackLectureVideo)
138+
).append(
139+
create_optional_note(lecture.video_note, '')
130140
)
131141
);
132142

res/lectures.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"condensed": "https://drive.google.com/open?id=1R-evFxkEfzMS20U-YuMzir5tr8Rb2M3A",
77
"full": "https://drive.google.com/open?id=1jmZUDeM34N3f4r4n62vkAljpQUeaO5Qy",
88
"video": "#",
9+
"video_note": "#",
910
"visible": true,
1011
"active": true
1112
}

0 commit comments

Comments
 (0)