Last active
January 8, 2017 11:58
-
-
Save Ajido/5fc7a5d0894eb3162c8d19a9652b4b66 to your computer and use it in GitHub Desktop.
TweetDeckにデスクトップ通知の内容を喋らせる + 通知音変更
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Notification.prototype.__defineSetter__('onshow', function(callback) { | |
setTimeout(() => this.close(), 8000); | |
var speech = new SpeechSynthesisUtterance(this.body.replace(/@[a-z_]+\s?/gi, '')); | |
speech.lang = 'ja-JP'; | |
speech.voice = 'Kyoko'; | |
speechSynthesis.speak(speech); | |
}); | |
$$('#update-sound source').forEach((audio) => { | |
// https://notificationsounds.com/terms-of-use | |
audio.setAttribute('src', 'https://notificationsounds.com/message-tones/all-eyes-on-me-465/download/mp3'); | |
}); | |
$("#update-sound").load(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO