您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
支持安全课程、专题活动
当前为
// ==UserScript== // @name 安全教育平台自动答题 // @description 支持安全课程、专题活动 // @namespace https://greasyfork.org/users/197529 // @version 0.6 // @author kkocdko // @include *://*.xueanquan.com/* // ==/UserScript== 'use strict'; let addFloatButton = (() => { let buttonBarShadow = document.createElement('div').attachShadow({ mode: 'open' }); buttonBarShadow.innerHTML = '<style>:host{position:fixed;top:0;left:0;z-index:999999999}button{margin:7px 0 0 7px;padding:0 11px;min-width:5em;outline:0;border:0;border-radius:4px;background:#2196f3;box-shadow:0 1px 3px 0 #00000022;color:#fff;font-size:14px;line-height:2em;transition:.3s}button:active{background:#63b5f7;box-shadow:0 2px 5px 0 #00000033;transition:0s}</style>'; document.body.appendChild(buttonBarShadow.host); return (text, callBack) => { let button = document.createElement('button'); button.innerText = text; button.addEventListener('click', callBack); buttonBarShadow.appendChild(button); }; })(); addFloatButton('自动答题', () => { document.querySelectorAll('[type=radio], [type=checkbox]').forEach(el => { if (!el.checked) { el.value = 1; el.click(); } }); scrollTo(scrollX, document.documentElement.scrollHeight); });