Dianliang233(讨论 | 贡献) 无编辑摘要 |
Dianliang233(讨论 | 贡献) 无编辑摘要 |
||
第10行: | 第10行: | ||
}); | }); | ||
fetch('https://api.github.com/repos/Teahouse-Studios/bot/commits').then(async (res) => { | fetch('https://api.github.com/repos/Teahouse-Studios/bot/commits').then(async function (res) => { | ||
var response = await res.json() | |||
var hash = response[0].sha | |||
var shortHash = hash.slice(0, 6) | |||
$('.commit-hash:not(commit-hash-short)').text(hash) | $('.commit-hash:not(commit-hash-short)').text(hash) | ||
$('.commit-hash.commit-hash-short').text(shortHash) | $('.commit-hash.commit-hash-short').text(shortHash) |
2021年6月6日 (日) 07:52的版本
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */
document.getElementById('skin-citizen-search-trigger').addEventListener('click', function() {
var event = new Event('input',{
bubbles: !0,
composed: !0
})
, checkbox = document.getElementById('search-checkbox');
checkbox.checked = !0;
checkbox.dispatchEvent(event);
});
fetch('https://api.github.com/repos/Teahouse-Studios/bot/commits').then(async function (res) => {
var response = await res.json()
var hash = response[0].sha
var shortHash = hash.slice(0, 6)
$('.commit-hash:not(commit-hash-short)').text(hash)
$('.commit-hash.commit-hash-short').text(shortHash)
}).catch(() => {
$('.commit-hash').text('???')
})