Dianliang233(讨论 | 贡献) 无编辑摘要 |
Dianliang233(讨论 | 贡献) 无编辑摘要 |
||
第9行: | 第9行: | ||
checkbox.dispatchEvent(event); | checkbox.dispatchEvent(event); | ||
}); | }); | ||
fetch('https://api.github.com/repos/Teahouse-Studios/bot/commits').then(async (res) => { | |||
const response = await res.json() | |||
const hash = response[0].sha | |||
const shortHash = hash.slice(0, 6) | |||
$('.commit-hash:not(commit-hash-short)').text(hash) | |||
$('.commit-hash.commit-hash-short').text(shortHash) | |||
}).catch(() => { | |||
$('.commit-hash').text('???') | |||
}) |
2021年6月6日 (日) 07:45的版本
/* 这里的任何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 (res) => {
const response = await res.json()
const hash = response[0].sha
const shortHash = hash.slice(0, 6)
$('.commit-hash:not(commit-hash-short)').text(hash)
$('.commit-hash.commit-hash-short').text(shortHash)
}).catch(() => {
$('.commit-hash').text('???')
})