Use correct Chinese quotes

This commit is contained in:
Mimi 2019-12-26 11:26:02 +08:00
parent e0720c8f80
commit 417f29519d
2 changed files with 5 additions and 5 deletions

View File

@ -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);
}); });
} }

View File

@ -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);