2017-04-03から1日間の記事一覧
今日のボカロ一曲。 いつの間にか月が変わってます。 メガネ協奏曲が奏でられてます。メガネメガネ。 メガネの注文が届く時期。 メガネを壊すのは問題です。 メガネ言い過ぎだね。 味付けの濃い文章、という言い方がある。 感情を余計に揺さぶる文章だ。 そ…
今日のボカロ一曲。 いつの間にか月が変わってます。 メガネ協奏曲が奏でられてます。メガネメガネ。 メガネの注文が届く時期。 メガネを壊すのは問題です。 メガネ言い過ぎだね。 味付けの濃い文章、という言い方がある。 感情を余計に揺さぶる文章だ。 そ…
** 注意
- Web Speech API非対応のブラウザでは音読できません
*/
(function () {
if (!window.speechSynthesis) return;
document.querySelectorAll('article').forEach(function (article) {
var button = document.createElement('button');
button.type = 'button';
button.className = 'btn';
button.textContent = '音読する';
button.style = 'float: right';
article.querySelector('header').appendChild(button);
button.addEventListener('click', function () {
var synth = window.speechSynthesis;
var body = article.querySelector('.entry-content').textContent;
var utter = new SpeechSynthesisUtterance(body);
synth.speak(utter);
});
});
})();