mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Stop media playback when the main window is closed. Issue #1646
This commit is contained in:
@@ -358,6 +358,17 @@ private extension ArticleRenderer {
|
||||
window.webkit.messageHandlers.mouseDidExit.postMessage(anchor.href);
|
||||
}
|
||||
|
||||
function stopMediaPlayback() {
|
||||
document.querySelectorAll("iframe").forEach(element => {
|
||||
var iframeSrc = element.src;
|
||||
element.src = iframeSrc;
|
||||
});
|
||||
|
||||
document.querySelectorAll("video, audio").forEach(element => {
|
||||
element.pause();
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user