I installed TamperMonkey, and it turned out to be pretty trivial to add videos to the tutorial pages. I've appended my script. The video shown isn't mine (yet). I plan to add a dictionary to map from the level and task to the appropriate video.
// ==UserScript== // @name Ellen's experiment // @namespace http://example.com // @version 0.1 // @description show my videos // @author Ellen // @match https://play.kotlinlang.org/koans/* // @grant none // @require http://code.jquery.com/jquery-latest.js // ==/UserScript== (function() { 'use strict'; let re = new RegExp('https://play.kotlinlang.org/koans/([^/]+)/([^/]+)/Task.kt'); var url = window.location.href; var groups = re.exec(url); var level = groups[1]; var task = groups[2]; var d = $("div.editor-content"); var iframe = $('<iframe>', { width: 560, height: 315, src: "https://www.youtube.com/embed/NIVFgU5f2Rs", frameborder: 0 }); d.append(iframe); })(); On Thursday, December 24, 2020 at 1:34:39 PM UTC-8 Ellen Spertus wrote: > I am a CS professor and would like to embed my instructional videos on > pages of the Kotlin Koans > <https://play.kotlinlang.org/koans/Introduction/Hello,%20world!/Task.kt> > tutorial. Could you tell me if there is a script that would facilitate this > or if it would be easy to create one? > > All of my searches on embedding videos with GreaseMonkey have led to > scripts for downloading videos, improving the YouTube experience, etc. > > Thanks. > > Ellen > -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/greasemonkey-users/b4b77c75-eaaf-400c-996f-98445b325244n%40googlegroups.com.
