Skip to content

Commit

Permalink
feat: replace lgbbs with lglg.top
Browse files Browse the repository at this point in the history
  • Loading branch information
diyanqi authored Aug 19, 2023
1 parent d9d6294 commit f6e4d48
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@
<center>
<div id="container" class="box mdui-hoverable" style="transform: translateY(150px);">
<div class="left"></div>
<input class="search" id="inputBox" type="text" placeholder="OIso数据库正在全面升级,搜索结果或不全,重大更新敬请期待!"
<input class="search" id="inputBox" type="text" placeholder="有什么想搜的?"
onkeypress="getKey();" />
<div class="right">
<i class="mdui-icon material-icons topbar mdui-text-color-black" onclick="go();">search</i>
Expand All @@ -573,7 +573,7 @@
</center>
<center style="transform: translateY(180px);">
<button class="mdui-btn mdui-ripple mdui-color-blue-grey-100 mdui-btn-dense opcBt"
onclick="window.open('https://lg.oiso.cf/')">帖子保存</button>
onclick="window.open('https://lglg.top/')">帖子保存</button>
<button class="mdui-btn mdui-ripple mdui-color-blue-grey-100 mdui-btn-dense opcBt" id="randomBt"
onclick="getRandomItem();">手气不错</button>
</center>
Expand Down Expand Up @@ -1463,7 +1463,7 @@ <h5>设置显示文字(支持部分 Markdown 语法),<b>50个字符以内<
mdui.snackbar("出错了:" + data);
}
}).catch(function () {
mdui.snackbar("失败了:" + error);
mdui.snackbar("失败了:" + error);
});
return;
}
Expand Down Expand Up @@ -2119,6 +2119,7 @@ <h5>调用 OpenAI API,作图时间约为 7 秒,请耐心等待。</h5>
[632128, "niceeeeeeeeeeee"],
[874567, "WMH922"],
[609249, "__Walter_Fang__"],
[900528, "jdxbwsbf"],
];
var thx = document.getElementById("thx");
thx.innerHTML = "";
Expand Down
9 changes: 7 additions & 2 deletions search/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@
}
CHART3 = {
"luoguUser": "洛谷用户",
"luoguTeam": "洛谷团队"
"luoguTeam": "洛谷团队",
"luoguTheme": "洛谷主题"
}
if (index['_index'] == "pages") {
return CHART3[index['_source']['type']];
Expand Down Expand Up @@ -627,7 +628,11 @@
ret += `<span class="tag" style="color: rgb(255, 255, 255); background: rgb(13, 102, 171);">` + indexToName(info) + `</span>`;
ret += `<span class="tag" style="color: rgb(255, 255, 255); background: rgb(171, 13, 102);">` + String(info['_score']) + `</span>`;
if (info['_index'] == "lgbbs") {
ret += `<span onmouseleave="window['leave']=true;" onmouseover="view('https://lgbbs.oiso.cf/show.php?url=` + info['_source']['url'] + `');" class="tag" style="color: rgb(255, 255, 255); background: #d9b611; cursor: pointer;" onclick='window.open("https://lgbbs.oiso.cf/show.php?url=` + info['_source']['url'] + `");'>` + `点击查看备份` + `</span>`;
const url = info['_source']['url'];
const regex = /\/(\d+)/;
const match = url.match(regex);
const number = match ? match[1] : null;
ret += `<span onmouseleave="window['leave']=true;" onmouseover="view('https://lgbbs.oiso.cf/show.php?url=` + info['_source']['url'] + `');" class="tag" style="color: rgb(255, 255, 255); background: #d9b611; cursor: pointer;" onclick='window.open("https://lglg.top/` + number + `");'>` + `点击查看备份` + `</span>`;
}
if (info['_index'] == "problems" && (info['_id'].indexOf("UVA") != -1 || info['_id'].indexOf("CF") != -1) || info['_id'].indexOf("SP") != -1) {
ret += `<span onmouseleave="window['leave']=true;" onmouseover="view('https://www.luogu.com.cn/problem/` + info['_id'] + `');" class="tag" style="color: rgb(255, 255, 255); background: #d9b611; cursor: pointer;" onclick='window.open("https://www.luogu.com.cn/problem/` + info['_id'] + `");'>` + `查看洛谷翻译` + `</span>`;
Expand Down

0 comments on commit f6e4d48

Please sign in to comment.