Skip to content

Commit fe3d4ce

Browse files
committed
fix
1 parent 7e7821a commit fe3d4ce

1 file changed

Lines changed: 33 additions & 2 deletions

File tree

HacgGodTurn.user.js

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
// @include http*://acgmoon.*
4747
// @include http*://www.moe-acg.cc/*
4848
// @include http*://htai.*
49-
// @version 3.20.26
49+
// @version 3.20.27
5050
// @grant GM_notification
5151
// @grant GM_xmlhttpRequest
5252
// @run-at document-end
@@ -56,6 +56,7 @@
5656
// @license MIT License
5757
// @compatible chrome
5858
// @compatible firefox
59+
// @connect tts.baidu.com
5960
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=rixixi@sina.com&item_name=Greasy+Fork+donation
6061
// @contributionAmount 1
6162
// ==/UserScript==
@@ -388,7 +389,7 @@
388389
}
389390
scrollMsg();
390391
}
391-
if(isHttps)changeUrl(true,[["a"],[['^http:','https:']]]);
392+
if(isHttps)changeUrl(true,[["a","iframe"],[['http:','https:']]]);
392393
break;
393394
case "sexacg":
394395
contentArea='article';
@@ -989,5 +990,35 @@
989990
}
990991
};
991992
GM_notification(notificationDetails);
993+
var context = new AudioContext();
994+
function playSound(buffer) {
995+
var source = context.createBufferSource();
996+
source.buffer = buffer;
997+
source.connect(context.destination);
998+
source.start(0);
999+
}
1000+
var ttss=["有家,有爱,有欧派","未被穿过的胖次是没有价值的","巨乳只有下垂的未来","男人变态有什么错","为什么你会这么熟练啊","在虚构的故事当中寻求真实感的人脑袋一定有问题"," 胸部什么的,明明只是装饰","无妹恨穹不是妹,有妹恨妹不成穹","有个能干的妹妹真好","玄不救非,氪不改命","只要可爱就算是男孩子也没关系","道歉時露出胸部是常識","我就是叫紫妈怎么了 有本事突然从我背后出现 把我的脸按在键盘上aqswdectfrvtghunijopioijohnuygbyfvtcdesxwedrfvtbguyhiumjiuyvftrssexrybtgnyuhm"];
1001+
var ttsRand=Math.floor(Math.random()*ttss.length);
1002+
var tts=ttss[ttsRand];
1003+
var soundUrl = `http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=5&text=${tts}`;
1004+
var p = new Promise(function(resolve, reject) {
1005+
var ret = GM_xmlhttpRequest({
1006+
method: "GET",
1007+
url: soundUrl,
1008+
responseType: 'arraybuffer',
1009+
onload: function(res) {
1010+
try {
1011+
context.decodeAudioData(res.response, function(buffer) {
1012+
resolve(buffer);
1013+
});
1014+
} catch(e) {
1015+
reject(e);
1016+
}
1017+
}
1018+
});
1019+
});
1020+
p.then(playSound, function(e) {
1021+
console.log(e);
1022+
});
9921023
}
9931024
})();

0 commit comments

Comments
 (0)