1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-14 03:15:49 +02:00

Rewrite sound notification hook to be hopefully more reliable

This commit is contained in:
chylex 2017-08-28 20:05:49 +02:00
parent d5c3ea0862
commit 8c0d306823

View File

@ -426,13 +426,9 @@
//
// Block: Hook into the notification sound effect.
//
(function(){
let soundEle = document.getElementById("update-sound");
soundEle.play = prependToFunction(soundEle.play, function(){
return $TDX.muteNotifications || $TDX.hasCustomNotificationSound;
});
})();
HTMLAudioElement.prototype.play = prependToFunction(HTMLAudioElement.prototype.play, function(){
return $TDX.muteNotifications || $TDX.hasCustomNotificationSound;
});
//
// Block: Update highlighted column and tweet for context menu and other functionality.