{"version":"1.0.1","templatekey":"ruffle","name":"Ruffle SWF","instructions":"Add the widget to the page, and between the filter tags embed a SWF file (add link -> upload repository). When the page is displayed the SWF file should play.","content":"<script src=\"https://unpkg.com/@ruffle-rs/ruffle\"></script>\n<!-- responsive container -->\n<div style=\"width: 100%; max-width: {{maxwidth}}px;\">\n<div  id=\"{{AUTOID}}_content\" style=\"width: 100%;  padding-bottom: {{height_ratio}};position:relative;display:block;\"></div>\n</div>\n<div id=\"{{AUTOID}}_link\" style=\"display: none\">","templateend":"</div>\n","variabledefaults":"maxwidth=\"1000\",height_ratio=75%|67%|53%","jscontent":"require(['jquery','core/log'], function($,log) {\n    var link = $(\"#{{AUTOID}}_link a\").first();\n    var container=$(\"#{{AUTOID}}_content\");\n    var swfurl= link.attr('href');\n    const ruffle = window.RufflePlayer.newest();\n    const player = ruffle.createPlayer();\n    player.style.width=\"100%\";\n    player.style.height=\"100%\";\n    player.style.position=\"absolute\";\n    player.style.left=0;\n    player.style.top=0;\n    container.append(player);\n    log.debug('SWFURL');\n    log.debug(swfurl);\n    player.load(swfurl);\n});","importcss":"","customcss":"","dataset":"","datasetvars":"","allowedcontexts":"","allowedcontextids":""}