Back to scripts
高亮正确答案
game在游戏中高亮显示正确答案,不自动点击
2024-03-21v1.0.0Community
使用风险自负。此脚本可能违反 Blooket 的服务条款。
Usage
Steps
- 进入答题界面
- 运行脚本
- 正确答案会被高亮显示
Notes
- 仅在答题模式下有效
- 高亮效果可能因游戏更新而失效
- 建议谨慎使用此功能
Requirements
- 必须在答题界面使用
- 需要最新版本的浏览器
Code
function highlightAnswers() {
const gameFrame = document.querySelector('#gameFrame');
if (!gameFrame) {
alert('Game frame not found!');
return;
}
const style = document.createElement('style');
style.textContent = `
.correct-answer {
border: 3px solid #4CAF50 !important;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}
`;
document.head.appendChild(style);
setInterval(() => {
const answers = gameFrame.contentWindow.document.querySelectorAll('.styles__answerContainer___3WuiW-camelCase');
answers.forEach(answer => {
if (answer.getAttribute('data-correct') === 'true') {
answer.classList.add('correct-answer');
}
});
}, 100);
}
highlightAnswers();
Changelog
Version 1.0.0
2024-03-21- 初始版本发布
- 实现答案高亮功能
- 添加视觉提示效果