diff --git a/plugins/af_zz_noautoplay/init.js b/plugins/af_zz_noautoplay/init.js deleted file mode 100644 index 28e7ec787..000000000 --- a/plugins/af_zz_noautoplay/init.js +++ /dev/null @@ -1,41 +0,0 @@ -require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) { - ready(function () { - PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED_CDM, function (row) { - if (row) { - console.log("af_zz_noautoplay!"); - console.log(row); - - const videos = row.getElementsByTagName("video"); - console.log(row.innerHTML); - - for (i = 0; i < videos.length; i++) { - - videos[i].removeAttribute("autoplay"); - videos[i].pause(); - videos[i].onclick = function () { - this.paused ? this.play() : this.pause(); - } - } - } - - return true; - }); - - PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED, function (row) { - if (row) { - const videos = row.getElementsByTagName("video"); - - for (i = 0; i < videos.length; i++) { - videos[i].removeAttribute("autoplay"); - videos[i].pause(); - videos[i].onclick = function () { - this.paused ? this.play() : this.pause(); - } - } - - } - - return true; - }); - }); -}); diff --git a/plugins/af_zz_noautoplay/init.php b/plugins/af_zz_noautoplay/init.php deleted file mode 100644 index 505f9fcd9..000000000 --- a/plugins/af_zz_noautoplay/init.php +++ /dev/null @@ -1,23 +0,0 @@ -host = $host; - } - - function get_js() { - return file_get_contents(__DIR__ . "/init.js"); - } - - function api_version() { - return 2; - } - -} \ No newline at end of file