// ==UserScript== // @name 扇贝单词增强 // @name:en Shanbay Enhance // @description 扇贝单词功能增强,带来更好的背单词体验。❤单词总结释义遮挡 // @description:en More function for Shanbay. // @version 0.1.1 // @author Ziu // @namespace https://greasyfork.org/zh-CN/users/605474 // @icon https://gitee.com/ziuc/utool-filebed/raw/master/20210514-231824-0795.png // @match https://web.shanbay.com/wordsweb/* // @require https://cdn.bootcdn.net/ajax/libs/toastr.js/latest/js/toastr.min.js // @grant GM_info // @license MIT // @downloadURL none // ==/UserScript== 'use strict'; const GreasyUrl = "https://greasyfork.org/zh-CN/scripts/437942" const version = GM_info.script.version const styleTag = /* CSS */ ` /* switch */ .switch { position: relative; display: inline-block; width: 50px; height: 34px; } .switch input {display:none;} .slider { position: absolute; cursor: pointer; height: 25px; width: 45px; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; -webkit-transition: .4s; transition: .4s; } .slider:before { position: absolute; content: ""; height: 19px; width: 19px; left: 3px; bottom: 3px; background-color: white; -webkit-transition: .3s; transition: .3s; } input:checked + .slider { background-color: #209e85; } input:focus + .slider { box-shadow: 0 0 1px #209e85; } input:checked + .slider:before { -webkit-transform: translateX(20px); -ms-transform: translateX(20px); transform: translateX(20px); } .slider.round { border-radius: 34px; } .slider.round:before { border-radius: 50%; } /* toastr position */ .toastr-center{ top: 50%; left: 50%; margin-top: -30px; margin-left: -150px; } `; log(`script loaded: ${version}`) function LoadUrl() { const cssUrl = [ { name: `toastr`, url: `https://cdn.bootcdn.net/ajax/libs/toastr.js/latest/toastr.min.css` } ] cssUrl.forEach(item => { $("head").append(``) }) $("head").append(`