您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
展示日志信息
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/20844/133182/%E6%97%A5%E5%BF%97%E5%B1%95%E7%A4%BA.js
function Logger () { this.container = document.createElement('div'); this.container.style.cssText = [ 'display: flex', 'flex-flow: column-reverse nowrap', 'position: fixed', 'left: 2em', 'bottom: 2em', 'margin-top: 5px' ].join(';'); document.body.appendChild(this.container); } Logger.prototype.createLogItem = function () { var el = document.createElement('div'); el.style.minWidth = '20em'; el.style.padding = '1em 2em'; el.style.borderRadius = '9px'; el.style.marginBottom = '60px'; el.style.marginTop = '10px'; el.style.opacity = 0; el.style.transition = 'margin-bottom 1s, opacity .7s, margin-left .5s'; setTimeout(function () { el.style.opacity = 1; el.style.marginBottom = '0px'; }, 20); return el; }; Logger.prototype.stick = function (text) { var el = this.createLogItem(); el.style.backgroundColor = '#5cb75c'; var textBlock = document.createTextNode(text); el.appendChild(textBlock); this.container.appendChild(el); return el; }; Logger.prototype.show = function (text) { var el = this.stick(text); setTimeout(function (self) { self.remove(el); }, 5000, this); }; Logger.prototype.remove = function (el) { el.style.marginLeft = '-60px'; el.style.opacity = 0; setTimeout(function () { if (el && el.parentNode) { el.parentNode.removeChild(el); } }, 700); };