File tree Expand file tree Collapse file tree 4 files changed +55
-1
lines changed
Expand file tree Collapse file tree 4 files changed +55
-1
lines changed Original file line number Diff line number Diff line change 1- # kotlin-playground-coursera-plugin
1+ # Kotlin Playground Coursera Plugin
2+
Original file line number Diff line number Diff line change 1+ function initiateApp ( configuration ) {
2+ let node = document . getElementById ( 'code' ) ;
3+ node . textContent = configuration [ "code" ] ;
4+ KotlinPlayground ( 'code' ) ;
5+ }
6+
7+ courseraApi . callMethod ( {
8+ type : "GET_SESSION_CONFIGURATION" ,
9+ onSuccess : initiateApp ,
10+ onError : console . log
11+ } ) ;
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < link rel ="stylesheet " href ="https://www.coursera.org/widget/coursera-connect.css ">
6+ </ head >
7+ < body >
8+ < code id ="code " theme ="idea "> </ code >
9+ < script src ="https://www.coursera.org/widget/coursera-widget-connect-v0.js "> </ script >
10+ < script src ="https://unpkg.com/kotlin-playground@1 "> </ script >
11+ < script src ="./app.js "> </ script >
12+ </ body >
13+ </ html >
Original file line number Diff line number Diff line change 1+ {
2+ "short_name" : " Kotlin" ,
3+ "name" : " Kotlin Playground" ,
4+ "description" : " Enable a Kotlin Playground" ,
5+ "maintainer" : {
6+ "name" : " Alexander Prendota" ,
7+ "email" : " alexander.prendotal@jetbrains.com"
8+ },
9+ "version" : " 0.0.0" ,
10+ "sandbox" : " allow-presentation allow-scripts allow-same-origin" ,
11+ "configurationExamples" : [
12+ {
13+ "name" : " Hello world!" ,
14+ "configuration" : {
15+ "code" : " fun main(args: Array<String>) {\n println(\" Hello world\" )\n }"
16+ }
17+ }
18+ ],
19+ "authorizations" : {},
20+ "actionTypes" : [" GET_SESSION_CONFIGURATION" , " SET_HEIGHT" ],
21+ "macros" : [],
22+ "accessibility" : {
23+ "mobileCompatibility" : {
24+ "supportsTouch" : true ,
25+ "minHeightPx" : 0 ,
26+ "minWidthPx" : 0
27+ }
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments