You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tt-rss/plugins/af_zz_vidmute/init.js

20 lines
462 B
JavaScript

/* global require, PluginHost */
require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
function mute(row) {
[...row.querySelectorAll("video")].forEach((vid) => { vid.muted = true; });
}
ready(function () {
PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED_CDM, function (row) {
mute(row);
return true;
});
PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED, function (row) {
mute(row);
return true;
});
});
});