/*! // ==UserScript== // @name 慕课小助手 // @namespace https://github.com/maomao1996/tampermonkey-scripts // @version 0.3.10 // @description 慕课网问答区快速查看问答详情、自动播放下一节视频 // @icon https://coding.m.imooc.com/static/wap/static/favicon.ico // @author maomao1996 // @include *://coding.imooc.com/learn/qa/* // @include *://coding.imooc.com/lesson/* // @grant GM_addStyle // @downloadURL https://update.greasyfork.icu/scripts/396378/%E6%85%95%E8%AF%BE%E5%B0%8F%E5%8A%A9%E6%89%8B.user.js // @updateURL https://update.greasyfork.icu/scripts/396378/%E6%85%95%E8%AF%BE%E5%B0%8F%E5%8A%A9%E6%89%8B.meta.js // ==/UserScript== */ ; (function () { 'use strict'; var STYLE_MAP = { 'learn/qa': ".mm-modal {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1996;\n display: none;\n overflow-y: auto;\n }\n .mm-mask {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n background-color: rgba(0, 0, 0, 0.5);\n }\n .mm-modal-x {\n overflow: hidden;\n position: absolute;\n top: 10%;\n bottom: 5%;\n left: 50%;\n z-index: 2;\n border-radius: 20px;\n padding: 25px;\n width: 836px;\n min-height: 480px;\n background: #fff;\n transform: translateX(-50%);\n }\n .mm-modal-x::before {\n position: absolute;\n top: 0;\n left: 0;\n z-index: -1;\n width: 100%;\n content: '\u6570\u636E\u52A0\u8F7D\u4E2D...';\n font-size: 24px;\n text-align: center;\n line-height: 480px;\n }" }; function addStyle(type) { var rules = STYLE_MAP[type]; if (!rules) { return; } GM_addStyle(rules); } function getBntHtml(link) { return "\u5F39\u7A97\u67E5\u770B"); } function appendModal() { var modalHtml = '