有没有过SXE11.7的脚本精灵/?

查看: 399|回复: 6
有没有用过tsinaMore这个脚本?
个人觉得十分不错,刷微博看图看原评用,但是也好久没更新了,ff更新后也出现了bug,现在USO关了也不知道怎么样子,不知道有木有大神知道这个脚本?
【】火狐扩展 Thumbnail Zoom Plus 2.7 汉化版,鼠标悬浮预览大图!
水中月镜中花
大图预览脚本:
【】火狐扩展 Thumbnail Zoom Plus 2.7 汉化版,鼠标悬浮预览大图!
/threa ...
对于微博组图就无法查看了额
大图预览脚本:http://userscripts.org:8080/scripts/show/468191
现在加了8080也打不开 了
水中月镜中花
现在加了8080也打不开 了
我直接给你贴上吧:
[JavaScript] 纯文本查看 / 双击代码区域 Ctrl+A快速复制// ==UserScript==
// [url=home.php?mod=space&uid=467097]@Name[/url]
大图速览 JAE
// @namespace
[url]http://userscripts.org/scripts/show/468191[/url]
// [url=home.php?mod=space&uid=720421]@icon[/url]
[url]https://addons.cdn.mozilla.net/img/uploads/addon_icons/337/.png?modified=[/url]
// @description
微博浮图控件,鼠标移过小图弹出浮动大图的脚本
// [url=home.php?mod=space&uid=570682]@version[/url]
// @modified
修改 BY JAE 交流群:
// [url=home.php?mod=space&uid=713796]@include[/url]
http://*/*
// @include
http://*./*
// @exclude
[url]/[/url]*
// @include
http://*.jd.com/*
// @exclude
[url]/[/url]*
// @include
http://*./*
// @exclude
[url]/[/url]*
// @include
http://*./*
// @exclude
[url]/[/url]*
// @include
http://*/*
// @include
[url]http://www.haha.mx/[/url]*
// @include
[url]http://my.oschina.net/[/url]*
// @include
[url]http://www.oschina.net/tweets[/url]*
// @include
http://*/*
// @include
http://*/*
// @include
http://*/*
// @include
http://*/*
// @include
http://*/*
// @include
http://*/*
// @include
http://*/*
// @include
http://*.cn/*
// @include
http://*/*
// @include
http://*/*
// @include
http://*./*
// @include
[url]/[/url]*
// @include
// @include
http://*/f*
// @include
http://*/i*
// @include
http://*/*
// [url=home.php?mod=space&uid=47731]@Grant[/url]
// ==/UserScript==
// [url=home.php?mod=space&uid=321866]@author[/url]
[url]/afc163[/url]
[url]/afc163/MiniblogImgPop[/url]
[url]http://pianyou.me[/url]
// @modified
// @modified
修改代码使其只多增加一个img标签,无论计算大图大小和显示大图都使用同一个img标签
// @modified
imgHeight等于10px,表示图片层的上下边框大小之和,其图片尚未载入
// @modified
1.扩展此功能至新浪微博,腾讯微博,搜狐微博,网易微博,人民微博,体坛微博,百度说吧等微博网站,并改名为miniblogImgP
2.改进代码使之适应ajax载入新微博时的情况,在网速过慢(10秒内未能载入新微博)的情况下会失效;
3.修改动画参数和代码结构以进一步优化代码性能;
4.不处理iframe中的微博页面以避免某些性能问题;
5.独立出miniblogsConfig,方便对大部分微博网站进行扩展。config格式如下:
{'微博域名':{
className:'feed_img',
//需要注册弹出事件的标签className
otherSrc:'dynamic-src',
//延迟载入时用于保存图片地址的额外标签,有的网站不需要此项
sFrag:'thumbnail',
//小图的图片地址中的特征段,用于替换
bFrag:'bmiddle',
//大图的图片地址中的特征段,用于替换
newFeedBtns:['feed_msg_new']
//导致ajax载入新微博的按钮id列表
// @modified
增加cache存储上次的图片数据,用于提高效率和修复chrome下的bug,但未能完全修复。。。
// @modified
修改top!=this为top!=window,使之和spidemonkey兼容
// @modified
增加对天涯微博的支持
// @modified
1.增加对凤凰微博的支持
2.修改一个低网速下出现的图片载入错位的bug
// @modified
1.根据增加了一个z键固定图片功能,按住z键后所有图片浮出和消失功能会失效,
改进后看大图片时,只需要按住z键便可以上下滚动页面
// @modified
修改了在腾讯微博和搜狐微博下,新feed载入时的init方式,改为每2.5秒绑定一次
// @modified
修复了网易微博下的一个bug
// @modified
1.增加了对新版新浪微群的支持
2.将图片宽度固定为450px
// @modified
1.改进了轮询新feed的机制
// @modified
1.新增了对新版新浪微博的支持,同时支持新旧双版
2.移除了对百度说吧的支持
// @modified
大量重构和改动,效率更高,支持更多网站
1.增加对QQ空间、嘀咕网、点点网、新浪轻博的支持!
2.使用事件委托方法重构图片绑定事件,去除低效的轮询方法,根除不时丢失绑定的bug
3.缓存机制提高效率
4.去除对t..cn和.cn的支持
5.修正因部分微博网站改动而无法正确运行的bug
// @modified
修复一个新浪微博偶尔失去绑定的bug
// @modified
1.修复一个在chrome下图片透明度为0时仍然遮盖网页的bug
2.修复在淘宝商城、京东商城等新浪企业微博下无效的问题
3.修正新浪微博切换到提到我的微博等页面后绑定失效的问题
// @modified
1.修正chrome下图片定位不准的bug
2.提高图片的zIndex使其覆盖头部导航
3.超屏大图定位不居中,而是定位到可视范围顶部
4.优化部分代码,提高效率
// @modified
1.使用new Image来获得图片高度,彻底修正chrome下图片定位不准的bug
2.使用GM_addStyle,优化图片边框样式
// @modified
1.使用imgReady库来加载图片([url]/?p=1121[/url]),提高获取图片宽高的效率
2.优化Z键看大图的使用体验,现在按Z键会出现遮罩层,滚动看大图,放掉Z键后复原
3.优化图片的显示效果
4.修复失效的问题
// @modified
1.重大改动,优化看长图片的方式,不用点鼠标和键盘就能看大图。
// @modified
代码优化,修复人民微博失效的问题,并支持央视微博
// @modified
支持我的淘宝和百度贴吧
// @modified
支持新浪微博多图
// @modified
支持新版腾讯微博,并修复了在腾讯微博大图上也会浮出图片的问题
1.修复 Firefox 22 beta 失效的问题
2.支持雪球网
3.去掉Z键看大图的支持
1.添加图片预加载功能,减少等待大图的时间
1.修复 chrome 27 没有 GM_addStyle 方法的问题
(function() {
// 各微博站点的feed配置
var MIPConfig = {
feedSelector:'a&img',
:['/c/','/m/'],
:['/b/','/b/']
feedSelector:'a&img',
:['/200?','/160?','/120?'],
:['/600?','/600?','/600?']
'jd.com':{
feedSelector:'a&img',
:['/n8/','/n3/','/n5/','/n7/','/n4/','/n2/','/n6/'],
:['/n0/','/n0/','/n0/','/n0/','/n0/','/n0/','/n0/']
feedSelector:'a&img',
:['.jpg_b'],
feedSelector:'a&img,a&span&img',
:['.jpg_160x160','.png_160x160','.jpg_250x250','.png_250x250','.jpg_200x200','.png_200x200','.jpg_210x210','.png_210x210','.jpg_230x230','.png_230x230','.jpg_320x320','.png_320x320','.jpg_180x180','.png_180x180','.jpg_400x400','.png_400x400','.jpg_460x460','.png_460x460'],
:['','','','','','','','','','','','','','','','','','']
feedSelector:'a&img',
:['/c/','/m/'],
:['/b/','/b/']
'www.haha.mx':{
feedSelector:'.clearfix&a&img,.clearfix&img,.img-container',
:['small','normal'],
:['big','big']
'oschina.net':{
feedSelector:'.img,.photo',
:'_thumb',
feedSelector:'.imgZoomIn',
feedSelector:'.bigcursor',
:'thumbnail',
feedSelector:'.bigcursor, .feed_img, .media_list img',
:['thumbnail', 'square'],
:['bmiddle', 'bmiddle']
feedSelector:'.pic',
:['/f_','_1.jpg'],
:['/m_','_0.jpg']
feedSelector:'.tweet-preview-pic',
:['w=140&h=140', '&gif=1'],
:['w=440', '&gif=0']
feedSelector:'a&img',
:['/160', '/120'],
:['/460', '/460']
feedSelector:'.imgBig',
:'_thumbnail',
:'_middle'
feedSelector:'.list_s_pic img',
sFrag:'/s_',
bFrag:'/b_'
feedSelector:'.zoom_in_image img',
:'/128x160_',
:'/520x0_'
feedSelector:'.pic-zoomin',
:'_middlepic',
feedSelector:'.feed-img',
feedSelector:'a&img',
:['/236/'],
:['/736/']
feedSelector:'.zoom-move',
:'/thumbnail',
:'/bmiddle'
feedSelector:'.thumb-image',
:'_160x160',
:'_450x10000'
feedSelector:'.threadlist_media li',
bigSrc: 'bpic'
feedSelector:'.feat_img',
bigSrc: 'data-field'
feedSelector:'.expandable & img',
:'!thumb',
:'!custom'
// 居中显示的图片对象
var PopImg = {
show: function(e) {
this.allowMove =
// fix firefox 22 beta 1
this._hideTimer && window.clearTimeout(this._hideTimer);
var that =
var smallImg = MiniblogImgPop.smallI
var src = this.getBigImgsrc(smallImg);
this.img.src =
imgReady(src, function() {
var pos = offset(smallImg);
that.img.style.left = pos.x + 180 + 'px';
that.img.style.opacity = 1;
that.img.style.visibility = 'visible';
that.img.style.marginTop = '-15px';
PopBar.show(e);
if (window.innerHeight & this.height) {
var scrollTop = document.documentElement.scrollTop || document.body.scrollT
that.img.style.top = (scrollTop + (window.innerHeight - this.height)/2) + 10 + 'px';
that.allowMove =
that.allowMove =
that.move(e);
hide: function() {
var that =
this.img.style.opacity = 0;
this.img.style.marginTop = '0px';
PopBar.hide();
this.shown =
this._hideTimer = window.setTimeout(function() {
that.img.src = '';
that.img.style.visibility = 'hidden';
init: function() {
var node = document.createElement('img');
node.id = 'miniblogImgPop';
document.body.appendChild(node);
this.img =
PopBar.init();
move: function(e) {
if (!this.allowMove) {
PopBar.move(e);
// 根据PopBar的位置算出大图的位置
var scrollTop = document.documentElement.scrollTop || document.body.scrollT
this.img.style.top = (scrollTop - PopBar.top * PopBar.scale) + 14 + 'px';
getBigImgsrc: function(obj) {
var tempimgs, tempimg, imgsrc, i, l,
sname = MiniblogImgPop.sitename,
config = MiniblogImgPop.
if (obj.tagName === 'IMG' || obj.tagName === 'img') {
tempimgs = obj.getElementsByTagName('IMG');
if (!tempimgs || tempimgs.length === 0) {
throw 'cant found the img node.';
tempimg = tempimgs[0];
//针对使用额外属性保存大图地址的网站
if (config.bigSrc) {
return tempimg.getAttribute(config.bigSrc) || 'javascript:;';
//一般处理
imgsrc = tempimg.getAttribute('src');
//(imgsrc);
imgsrc = decodeURIComponent(imgsrc);
if (typeof config.sFrag === 'object') {
for(i=0, l=config.sFrag. i&l; i++) {
imgsrc = imgsrc.replace(config.sFrag[i], config.bFrag[i]);
imgsrc = imgsrc.replace(config.sFrag, config.bFrag);
// 指示当前可视区域的Bar
var PopBar = {
show: function(e) {
var smallImg = MiniblogImgPop.smallImg,
bigImg = PopImg.
this.sOffset = offset(smallImg);
// 表示放大的倍数
this.scale = (bigImg.height + 14) * 1.0 / this.sOffset.
// 计算出bar的高度
if (window.innerHeight & bigImg.height) {
this.bar.style.height = parseInt(window.innerHeight/this.scale, 10) + 'px';
this.bar.style.height = this.sOffset.height + 'px';
// 计算bar的Top值可以允许的范围
this.range = this.sOffset.height - this.bar.offsetH
// 计算bar的位置
this.bar.style.left = this.sOffset.x + this.sOffset.width + 'px';
this.move(e);
// 显示bar
this.bar.style.opacity = 1;
// 主要是计算bar的top位置
move: function(e) {
// 计算鼠标相对于元素的位置
var x = e.pageX - this.sOffset.x,
y = e.pageY - this.sOffset.y;
// 计算bar的top值
var top = y - this.bar.offsetHeight/2;
top = top & 0 ? 0 :
top = top & this.range ? this.range :
this.top =
this.bar.style.top = top + this.sOffset.y + 'px';
hide: function() {
this.bar.style.opacity = 0;
this.bar.style.height = '0px';
init: function() {
var node = document.createElement('div');
node.id = 'miniblogImgPop-bar';
document.body.appendChild(node);
this.bar =
var MiniblogImgPop = {
preloadImg: function() {
var that =
window.setTimeout(function() {
var nodes = $(that.config.feedSelector);
for (var i=0; i&nodes. i++) {
var preloadImg = new Image();
preloadImg.src = PopImg.getBigImgsrc(nodes[i]);
prepare: function() {
this.sitename = this._getSiteName();
this.config = MIPConfig[this.sitename];
addImgsEventListener: function() {
var that =
delegate(document.body, 'mouseover', function(e, node) {
that.smallImg =
node.style.opacity = 0.84;
PopImg.show(e);
}, this.config.feedSelector);
delegate(document.body, 'mouseout', function(e, node) {
node.style.opacity = '';
PopImg.hide();
}, this.config.feedSelector);
delegate(document.body, 'mousemove', function(e) {
PopImg.move(e);
}, this.config.feedSelector);
// 获得当前站点名
_getSiteName: function() {
for(each in MIPConfig) {
if (location.href.indexOf(each) != -1) {
return '';
init: function() {
// 初始化两个节点
PopImg.init();
// 准备必要的数据
this.prepare();
// 绑定imgs hover事件
this.addImgsEventListener();
// 预加载大图
this.preloadImg();
MiniblogImgPop.init();
// Helpers
function $(selector) {
return document.querySelectorAll(selector);
function offset(source) {
var pt = {x:0,y:0,width:source.offsetWidth,height:source.offsetHeight};
pt.x += source.offsetL
pt.y += source.offsetT
source = source.offsetP
} while (source);
function delegate(el, eventType, handler, selector) {
el = el ||
el.addEventListener(eventType, function(e) {
var node = getHandlerNode(e, selector, el);
node && handler.call(el, e, node);
}, false);
function getHandlerNode(e, selector, el) {
//返回我们handler需要的参数
el = el ||
if (e && e.target && selector) {
nodes = el.querySelectorAll(selector);
for(i=0; i&nodes. i++) {
if (e.target == nodes[i] || isInDomChain(e.target, nodes[i], el)) {
return nodes[i];
function isInDomChain(target, parent, ancestor, maxDepth) {
ancestor = ancestor ||
maxDepth = maxDepth || 100;
if (target == ancestor) {
if (target == parent) {
var i = 0;//防止过多嵌套
while (target != ancestor && target !== null && (i++ & maxDepth)) {
target = target.parentN
if (target == parent) {
* 图片头数据加载就绪事件 - 更快获取图片尺寸
* @version
[url]/?p=1121[/url]
{Function}
{Function}
加载完毕 (可选)
{Function}
加载错误 (可选)
* @example imgReady('.hk/intl/zh-CN/images/logo_cn.png', function () {
alert('size ready: width=' + this.width + '; height=' + this.height);
var imgReady = (function () {
var list = [], intervalId = null,
// 用来执行队列
tick = function () {
var i = 0;
for (; i & list. i++) {
list[i].end ? list.splice(i--, 1) : list[i]();
!list.length && stop();
// 停止所有定时器队列
stop = function () {
window.clearInterval(intervalId);
intervalId =
return function (url, ready, load, error) {
var onready, width, height, newWidth, newHeight,
img = new Image();
// 如果图片被缓存,则直接返回缓存数据
if (plete) {
ready.call(img);
load && load.call(img);
width = img.
height = img.
// 加载错误后的事件
img.onerror = function () {
error && error.call(img);
onready.end =
img = img.onload = img.onerror =
// 图片尺寸就绪
onready = function () {
newWidth = img.
newHeight = img.
if (newWidth !== width || newHeight !== height ||
// 如果图片已经在其他地方加载可使用面积检测
newWidth * newHeight & 1024
ready.call(img);
onready.end =
onready();
// 完全加载完毕的事件
img.onload = function () {
// onload在定时器时间差范围内可能比onready快
// 这里进行检查并保证onready优先执行
!onready.end && onready();
load && load.call(img);
// IE gif动画会循环执行onload,置空onload即可
img = img.onload = img.onerror =
// 加入队列中定期执行
if (!onready.end) {
list.push(onready);
// 无论何时只允许出现一个定时器,减少浏览器性能损耗
if (intervalId === null) intervalId = setInterval(tick, 40);
// GM_addStyle function is not existed in chrome 27
var GM_addStyle = GM_addStyle || function(css) {
var style = document.createElement(&style&);
style.type = &text/css&;
style.appendChild(document.createTextNode(css));
document.getElementsByTagName(&head&)[0].appendChild(style);
// 增加自定义样式
GM_addStyle(&\
#miniblogImgPop {\
border: 7px solid rgba(255,255,255,0.8);\
box-shadow: 0 1px 15px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 0, 0, 0.25)\
z-index: 123459;\
opacity: 0;\
margin-top: 0;\
position:\
visibility:\
transition: opacity 0.2s ease-out 0s, margin-top 0.2s ease-out 0s;\
// 增加自定义样式
GM_addStyle(&\
#miniblogImgPop-bar {\
border-right: 4px solid rgb(255, 154, 26);\
border-left: 2px solid rgb(255, 242, 171);\
border-radius: 0 3px 3px 0;\
z-index: 99999;\
opacity: 0;\
position:\
transition: opacity 0.2s ease-out 0s, margin-top 0.2s ease-out 0s;\
我直接给你贴上吧:
[mw_shl_code=javascript,true]// ==UserScript==
// @Name& && && && &大图速览 J ...
thx,用上 了
Copyright & KaFan & All Rights Reserved.
Powered by Discuz! X3.1(

我要回帖

更多关于 1540578 的文章

 

随机推荐