mirror of
https://github.com/stevenjoezhang/live2d-widget.git
synced 2024-11-25 22:31:30 +08:00
Use correct Chinese quotes
This commit is contained in:
parent
e0720c8f80
commit
417f29519d
@ -213,7 +213,7 @@ $(function() {
|
|||||||
window.info = function() {
|
window.info = function() {
|
||||||
//Your code here...
|
//Your code here...
|
||||||
$.getJSON("https://v1.hitokoto.cn/", function(data) {
|
$.getJSON("https://v1.hitokoto.cn/", function(data) {
|
||||||
alert("『" + data.hitokoto + "』——" + data.from);
|
alert("「" + data.hitokoto + "」——" + data.from);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,13 +82,13 @@ function loadWidget(waifuPath, apiPath) {
|
|||||||
var referrer = document.createElement("a");
|
var referrer = document.createElement("a");
|
||||||
referrer.href = document.referrer;
|
referrer.href = document.referrer;
|
||||||
var domain = referrer.hostname.split(".")[1];
|
var domain = referrer.hostname.split(".")[1];
|
||||||
if (location.hostname == referrer.hostname) text = `欢迎阅读<span style="color:#0099cc;">『${document.title.split(" - ")[0]}』</span>`;
|
if (location.hostname == referrer.hostname) text = `欢迎阅读<span style="color:#0099cc;">「${document.title.split(" - ")[0]}」</span>`;
|
||||||
else if (domain == "baidu") text = `Hello!来自 百度搜索 的朋友<br>你是搜索 <span style="color:#0099cc;">${referrer.search.split("&wd=")[1].split("&")[0]}</span> 找到的我吗?`;
|
else if (domain == "baidu") text = `Hello!来自 百度搜索 的朋友<br>你是搜索 <span style="color:#0099cc;">${referrer.search.split("&wd=")[1].split("&")[0]}</span> 找到的我吗?`;
|
||||||
else if (domain == "so") text = `Hello!来自 360搜索 的朋友<br>你是搜索 <span style="color:#0099cc;">${referrer.search.split("&q=")[1].split("&")[0]}</span> 找到的我吗?`;
|
else if (domain == "so") text = `Hello!来自 360搜索 的朋友<br>你是搜索 <span style="color:#0099cc;">${referrer.search.split("&q=")[1].split("&")[0]}</span> 找到的我吗?`;
|
||||||
else if (domain == "google") text = `Hello!来自 谷歌搜索 的朋友<br>欢迎阅读<span style="color:#0099cc;">『${document.title.split(" - ")[0]}』</span>`;
|
else if (domain == "google") text = `Hello!来自 谷歌搜索 的朋友<br>欢迎阅读<span style="color:#0099cc;">「${document.title.split(" - ")[0]}」</span>`;
|
||||||
else text = `Hello!来自 <span style="color:#0099cc;">${referrer.hostname}</span> 的朋友`;
|
else text = `Hello!来自 <span style="color:#0099cc;">${referrer.hostname}</span> 的朋友`;
|
||||||
} else {
|
} else {
|
||||||
text = `欢迎阅读<span style="color:#0099cc;">『${document.title.split(" - ")[0]}』</span>`;
|
text = `欢迎阅读<span style="color:#0099cc;">「${document.title.split(" - ")[0]}」</span>`;
|
||||||
}
|
}
|
||||||
showMessage(text, 7000, 8);
|
showMessage(text, 7000, 8);
|
||||||
}
|
}
|
||||||
@ -120,7 +120,7 @@ function loadWidget(waifuPath, apiPath) {
|
|||||||
else fetch("https://v1.hitokoto.cn")
|
else fetch("https://v1.hitokoto.cn")
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(result => {
|
.then(result => {
|
||||||
var text = `这句一言来自 <span style="color:#0099cc;">『${result.from}』</span>,是 <span style="color:#0099cc;">${result.creator}</span> 在 hitokoto.cn 投稿的。`;
|
var text = `这句一言来自 <span style="color:#0099cc;">「${result.from}」</span>,是 <span style="color:#0099cc;">${result.creator}</span> 在 hitokoto.cn 投稿的。`;
|
||||||
showMessage(result.hitokoto, 6000, 9);
|
showMessage(result.hitokoto, 6000, 9);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
showMessage(text, 4000, 9);
|
showMessage(text, 4000, 9);
|
||||||
|
Loading…
Reference in New Issue
Block a user