// ==UserScript==
// @name 扇贝单词增强
// @name:en Shanbay Enhance
// @description 扇贝单词功能增强,带来更好的背单词体验。❤单词总结释义遮挡❤隐藏例句翻译❤自定义单词例句字体❤自定义功能快捷键❤专注模式/深色模式
// @description:en More function for Shanbay.
// @version 0.1.4
// @author ZiuChen
// @namespace https://greasyfork.org/zh-CN/users/605474
// @icon https://gitee.com/ziuc/utool-filebed/raw/master/20210514-231824-0795.png
// @source git+https://github.com/ZiuChen/Shanbay-Enhance.git
// @match https://www.shanbay.com/*
// @match https://web.shanbay.com/wordsweb/*
// @require https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js
// @require https://cdn.bootcdn.net/ajax/libs/toastr.js/latest/js/toastr.min.js
// @license MIT
// @downloadURL none
// ==/UserScript==
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./package.json":
/***/ ((module) => {
module.exports = JSON.parse('{"name":"shanbay-enhance","version":"0.1.4","description":"More function for Shanbay.","main":"userscript.js","scripts":{"dev":"webpack --mode development --config config/webpack.config.dev.js","build":"webpack --mode production --config config/webpack.config.prod.js"},"repository":{"type":"git","url":"git+https://github.com/ZiuChen/Shanbay-Enhance.git"},"author":"ZiuChen","license":"MIT","bugs":{"url":"https://github.com/ZiuChen/Shanbay-Enhance/issues"},"homepage":"https://github.com/ZiuChen/Shanbay-Enhance#readme","devDependencies":{"@babel/core":"^7.16.7","babel-loader":"^8.2.3","userscript-metadata-webpack-plugin":"^0.1.1","webpack":"^5.65.0","webpack-cli":"^4.9.1","webpack-livereload-plugin":"^3.0.2","webpack-merge":"^5.8.0"},"dependencies":{}}');
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
;// CONCATENATED MODULE: ./src/style/CommonStyle.js
const style =
/* 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;
}
/* config input text */
input[type=text] {
width: 220px;
margin-left: 10px;
border: 1px solid #ccc;
background-color: #fff;
height: 30px;
margin-top: 4px;
line-height: 30px;
}
button[class~=short-keys] {
height: 25px;
padding-right: 5px;
padding-left: 5px;
margin-top: 5px;
margin-right: 10px;
cursor: pointer;
border: 1px solid #ccc;
}
button[class~=short-keys]:focus {
background-color: #ccc;
}
button[class=restore-setting] {
height: 25px;
padding-right: 5px;
padding-left: 5px;
margin-top: 5px;
margin-right: 10px;
cursor: pointer;
border: 1px solid #ccc;
}
`;
/* harmony default export */ const CommonStyle = (style);
;// CONCATENATED MODULE: ./src/common/LoadUrl.js
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(`