Greasy Fork is available in English.

Global News: Unmute Videos

Unmutes videos on globalnews.ca, which are otherwise muted by default

// ==UserScript==
// @name         Global News: Unmute Videos
// @description  Unmutes videos on globalnews.ca, which are otherwise muted by default
// @match        https://globalnews.ca/*
// @version      0.1
// @author       mica
// @namespace    greasyfork.org/users/12559
// @license      MIT
// ==/UserScript==

const video = () => document.querySelector('iframe.c-video__embed');
const unmute = () => video().contentDocument.querySelector('div[aria-label="Unmute button"]').click();
const observer = new MutationObserver(() => {
    if (video()) {
        unmute();
    }
});
observer.observe(document.body, {
    childList: true,
    subtree: true
});