您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Common JS for Baidu scripts by Gerald
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/144/35452/Tieba%20Common.js
- // ==UserScript==
- // @name Tieba Common
- // @namespace http://geraldl.net/
- // @author Gerald <gera2ld@163.com>
- // @description Common JS for Baidu scripts by Gerald
- // @version 1.0
- // ==/UserScript==
- if(typeof unsafeWindow=='undefined') unsafeWindow=window;
- var $=unsafeWindow.$,PageData=unsafeWindow.PageData,utils=null,
- gkey='__ge_firefox';
- (function(){
- function getObj(key,def){
- var v=ff[key];
- if(v==null&&def!=null) setObj(key,v=def);
- return v;
- }
- function setObj(key,val){ff[key]=val;}
- function notice(title,msg){
- var n=getObj('msg',{});
- if(!n[title]) {
- n[title]=1;
- var d=document.createElement('div');
- d.setAttribute('style','position:fixed;z-index:999999;background:white;border:1px solid;border-radius:3px;padding:10px;top:50px;left:50px;');
- d.innerHTML='<a href=# style="float:right">关闭</a><h3 style="margin-right:2.5em;">'+title+'</h3>'+msg;
- document.body.appendChild(d);
- d.firstChild.onclick=function(e){
- e.preventDefault();d.parentNode.removeChild(d);
- };
- return d;
- }
- }
- var ff=unsafeWindow[gkey];
- if(!ff) ff=unsafeWindow[gkey]={};
- utils=getObj('utils');
- if(!utils)
- notice('未检测到依赖脚本!','请确认已安装并启用:<br><a target=_blank href=https://greasyfork.org/scripts/118>Tieba Utilities</a><br><p align=right>——寂寞的原子</p>');
- })();