MiniblogImgPop - 微博浮图

微博浮图控件,鼠标移过小图弹出浮动大图的脚本

目前為 2016-04-26 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name MiniblogImgPop - 微博浮图
  3. // @namespace http://userscripts.org/users/83994
  4. // @icon https://addons.cdn.mozilla.net/img/uploads/addon_icons/337/337281-64.png?modified=1361080128
  5. // @description 微博浮图控件,鼠标移过小图弹出浮动大图的脚本
  6. // @version 3.4.0
  7. // @include http://*qing.weibo.com/*
  8. // @include http://*weibo.com/*
  9. // @include http://*t.163.com/*
  10. // @include http://*t.sohu.com/*
  11. // @include http://*t.qq.com/*
  12. // @include http://*t.ifeng.com/*
  13. // @include http://*t.titan24.com/*
  14. // @include http://*t.people.com.cn/*
  15. // @include http://*tianya.cn/*
  16. // @include http://*diandian.com/*
  17. // @include http://*.digu.com/*
  18. // @include http://i.taobao.com/*
  19. // @include http://*t.cntv.cn*
  20. // @include http://*tieba.baidu.com/f*
  21. // @include http://*tieba.baidu.com/i*
  22. // @include http://*xueqiu.com/*
  23. // @include https://*douban.com/*
  24. // @include https://*work.alibaba-inc.com/*
  25. // @grant none
  26. // ==/UserScript==
  27.  
  28. // @author afc163
  29. // @weibo http://weibo.com/afc163
  30. // @code https://github.com/afc163/MiniblogImgPop
  31. // @blog http://pianyou.me
  32. // @date 2010.8.12
  33.  
  34. // @modified 2010.9.14
  35. // @modified 2010.9.17 修改代码使其只多增加一个img标签,无论计算大图大小和显示大图都使用同一个img标签
  36. // @modified 2010.9.20 imgHeight等于10px,表示图片层的上下边框大小之和,其图片尚未载入
  37. // @modified 2010.10.14 1.扩展此功能至新浪微博,腾讯微博,搜狐微博,网易微博,人民微博,体坛微博,百度说吧等微博网站,并改名为miniblogImgPop;
  38. // 2.改进代码使之适应ajax载入新微博时的情况,在网速过慢(10秒内未能载入新微博)的情况下会失效;
  39. // 3.修改动画参数和代码结构以进一步优化代码性能;
  40. // 4.不处理iframe中的微博页面以避免某些性能问题;
  41. // 5.独立出miniblogsConfig,方便对大部分微博网站进行扩展。config格式如下:
  42. // {'微博域名':{
  43. // className:'feed_img', //需要注册(不可用)弹出事件的标签className
  44. // otherSrc:'dynamic-src', //延迟载入时用于保存图片地址的额外标签,有的网站不需要此项
  45. // sFrag:'thumbnail', //小图的图片地址中的特征段,用于替换
  46. // bFrag:'bmiddle', //大图的图片地址中的特征段,用于替换
  47. // newFeedBtns:['feed_msg_new'] //导致ajax载入新微博的按钮id列表
  48. // }}.
  49. // @modified 2010.10.15 增加cache存储上次的图片数据,用于提高效率和修复chrome下t.sohu.com的bug,但未能完全修复。。。
  50. // @modified 2010.11.17 修改top!=this为top!=window,使之和spidemonkey兼容
  51. // @modified 2010.11.17 增加对天涯微博的支持
  52. // @modified 2010.12.06 1.增加对凤凰微博的支持
  53. // 2.修改一个低网速下出现的图片载入错位的bug
  54. // @modified 2010.12.16 1.根据增加了一个z键固定图片功能,按住z键后所有图片浮出和消失功能会失效,
  55. // 改进后看大图片时,只需要按住z键便可以上下滚动页面
  56. // @modified 2011.1.6 修改了在腾讯微博和搜狐微博下,新feed载入时的init方式,改为每2.5秒绑定一次
  57. // @modified 2011.5.16 修复了网易微博下的一个bug
  58. // @modified 2011.6.22 1.增加了对新版新浪微群的支持
  59. // 2.将图片宽度固定为450px
  60. // @modified 2011.8.18 1.改进了轮询新feed的机制
  61. // @modified 2011.9.9 1.新增了对新版新浪微博的支持,同时支持新旧双版
  62. /// 2.移除了对百度说吧的支持
  63. // @modified 2011.9.30 大量重构和改动,效率更高,支持更多网站
  64. // 1.增加对QQ空间、嘀咕网、点点网、新浪轻博的支持!
  65. // 2.使用事件委托方法重构图片绑定事件,去除低效的轮询方法,根除不时丢失绑定的bug
  66. // 3.缓存机制提高效率
  67. // 4.去除对t.house.sina.com.cn和t.sina.com.cn的支持
  68. // 5.修正因部分微博网站改动而无法正确运行的bug
  69. // @modified 2011.10.11 修复一个新浪微博偶尔失去绑定的bug
  70. // @modified 2011.11.17 1.修复一个在chrome下图片透明度为0时仍然遮盖网页的bug
  71. // 2.修复在淘宝商城、京东商城等新浪企业微博下无效的问题
  72. // 3.修正新浪微博切换到提到我的微博等页面后绑定失效的问题
  73. // @modified 2012.03.02 1.修正chrome下图片定位不准的bug
  74. // 2.提高图片的zIndex使其覆盖头部导航
  75. // 3.超屏大图定位不居中,而是定位到可视范围顶部
  76. // 4.优化部分代码,提高效率
  77. // @modified 2012.03.03 1.使用new Image来获得图片高度,彻底修正chrome下图片定位不准的bug
  78. // 2.使用GM_addStyle,优化图片边框样式
  79. // @modified 2012.10.18 1.使用imgReady库来加载图片(http://www.planeart.cn/?p=1121),提高获取图片宽高的效率
  80. // 2.优化Z键看大图的使用体验,现在按Z键会出现遮罩层,滚动看大图,放掉Z键后复原
  81. // 3.优化图片的显示效果
  82. // 4.修复t.163.com失效的问题
  83. // @modified 2012.10.19 1.重大改动,优化看长图片的方式,不用点鼠标和键盘就能看大图。
  84. // @modified 2013.02.06 代码优化,修复人民微博失效的问题,并支持央视微博
  85. // @modified 2013.02.17 支持我的淘宝和百度贴吧
  86. // @modified 2013.04.19 支持新浪微博多图
  87. // @modified 2013.05.03 支持新版腾讯微博,并修复了在腾讯微博大图上也会浮出图片的问题
  88. // @3.0.6 2013.05.17 1.修复 Firefox 22 beta 失效的问题
  89. // 2.支持雪球网
  90. // 3.去掉Z键看大图的支持
  91. // @3.0.7 2013.06.02 1.添加图片预加载功能,减少等待大图的时间
  92. // @3.0.8 2013.06.04 1.修复 chrome 27 没有 GM_addStyle 方法的问题
  93.  
  94. (function() {
  95.  
  96. // 各微博站点的feed配置
  97. var MIPConfig = {
  98. 'qing.weibo.com':{
  99. feedSelector:'.imgZoomIn',
  100. sFrag :'',
  101. bFrag :''
  102. },
  103. 'q.weibo.com':{
  104. feedSelector:'.bigcursor',
  105. sFrag :'thumbnail',
  106. bFrag :'large'
  107. },
  108. 'weibo.com':{
  109. feedSelector:'.bigcursor, .feed_img, .media_list img',
  110. sFrag :['thumb180', 'orj480', 'thumbnail', 'square'],
  111. bFrag :['mw690', 'mw690', 'bmiddle', 'bmiddle']
  112. },
  113. 't.sohu.com':{
  114. feedSelector:'.pic',
  115. sFrag :['/f_','_1.jpg'],
  116. bFrag :['/m_','_0.jpg']
  117. },
  118. 't.163.com':{
  119. feedSelector:'.tweet-preview-pic',
  120. sFrag :['w=140&h=140', '&gif=1'],
  121. bFrag :['w=440', '&gif=0']
  122. },
  123. 't.qq.com':{
  124. feedSelector:'.pic img:not(.large)',
  125. sFrag :['/160', '/120'],
  126. bFrag :['/460', '/460']
  127. },
  128. 't.titan24.com':{
  129. feedSelector:'.imgBig',
  130. sFrag :'_thumbnail',
  131. bFrag :'_middle'
  132. },
  133. 't.people.com.cn':{
  134. feedSelector:'.list_s_pic img',
  135. sFrag:'/s_',
  136. bFrag:'/b_'
  137. },
  138. 't.ifeng.com':{
  139. feedSelector:'.zoom_in_image img',
  140. sFrag :'/128x160_',
  141. bFrag :'/520x0_'
  142. },
  143. 'www.tianya.cn':{
  144. feedSelector:'.pic-zoomin',
  145. bigSrc :'_middlepic',
  146. sFrag :'small',
  147. bFrag :'middle'
  148. },
  149. 'diandian.com':{
  150. feedSelector:'.feed-img',
  151. bigSrc :'imgsrc'
  152. },
  153. 'digu.com':{
  154. feedSelector:'.picture',
  155. sFrag :'_100x75',
  156. bFrag :'_640x480'
  157. },
  158. 't.cntv.cn':{
  159. feedSelector:'.zoom-move',
  160. sFrag :'/thumbnail',
  161. bFrag :'/bmiddle'
  162. },
  163. 'i.taobao.com':{
  164. feedSelector:'.thumb-image',
  165. sFrag :'_160x160',
  166. bFrag :'_450x10000'
  167. },
  168. 'tieba.baidu.com/f':{
  169. feedSelector:'.threadlist_media li',
  170. bigSrc: 'bpic'
  171. },
  172. 'tieba.baidu.com/i':{
  173. feedSelector:'.feat_img',
  174. bigSrc: 'data-field'
  175. },
  176. 'xueqiu.com':{
  177. feedSelector:'.expandable > img',
  178. sFrag :'!thumb',
  179. bFrag :'!custom'
  180. },
  181. 'douban.com':{
  182. feedSelector:'img',
  183. sFrag :'median',
  184. bFrag :'raw'
  185. },
  186. 'work.alibaba-inc.com':{
  187. feedSelector:'.uxcore-nw-message-wall-item-album-thumb li',
  188. sFrag :['240x240', '120x120'],
  189. bFrag :['620x10000', '620x10000']
  190. }
  191. };
  192.  
  193. // 居中显示的图片对象
  194. var PopImg = {
  195.  
  196. show: function(e) {
  197. this.allowMove = false;
  198. // fix firefox 22 beta 1
  199. this._hideTimer && window.clearTimeout(this._hideTimer);
  200.  
  201. var that = this;
  202. var smallImg = MiniblogImgPop.smallImg;
  203. var src = this.getBigImgsrc(smallImg);
  204. this.img.src = src;
  205. this.imgWidth = 500;
  206.  
  207. imgReady(src, function() {
  208. that.imgWidth = this.width;
  209. that.layoutImg(e);
  210.  
  211. that.img.style.opacity = 1;
  212. that.img.style.visibility = 'visible';
  213. that.img.style.marginTop = '-15px';
  214. Mask.show(e);
  215.  
  216. // 换算图片显示高度
  217. // 1. 宽度超过 500 时,高度要等比例压缩
  218. // 2. 加上边框高度
  219. var imgDisplayHeight;
  220. if (this.width > 500) {
  221. imgDisplayHeight = (this.height + 14) * 500 / this.width;
  222. } else {
  223. imgDisplayHeight = this.height + 14;
  224. }
  225.  
  226. if (window.innerHeight > imgDisplayHeight) {
  227. var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
  228. that.img.style.top = (scrollTop + (window.innerHeight - imgDisplayHeight)/2 + 15) + 'px';
  229. that.allowMove = false;
  230. } else {
  231. that.allowMove = true;
  232. that.move(e);
  233. }
  234. });
  235. },
  236.  
  237. // 设置大图的宽度与位置
  238. layoutImg: function(e) {
  239. var pos = offset(MiniblogImgPop.smallImg);
  240. var left = pos.x + pos.width + 30;
  241. var width = Math.min(this.imgWidth, 500);
  242. // 如果小图右边放不下
  243. if (left + width > window.innerWidth) {
  244. left = pos.x - width - 30;
  245. // 如果左边也放不下
  246. if (left < 0) {
  247. // 根据鼠标位置,选择空间大的一侧放置
  248. if (e.pageX > window.innerWidth / 2) {
  249. // 放置在左边
  250. width = Math.min(width, e.pageX - 30);
  251. left = 0;
  252. } else {
  253. // 放置在右边
  254. width = Math.min(width, window.innerWidth - e.pageX - 30);
  255. left = window.innerWidth - width;
  256. }
  257. }
  258. }
  259. this.img.style.width = width + 'px';
  260. this.img.style.left = left + 'px';
  261. },
  262.  
  263. hide: function() {
  264. var that = this;
  265. this.img.style.opacity = 0;
  266. this.img.style.marginTop = '0px';
  267.  
  268. Mask.hide();
  269. this.shown = false;
  270.  
  271. this._hideTimer = window.setTimeout(function() {
  272. that.img.src = '';
  273. that.img.style.visibility = 'hidden';
  274. }, 200);
  275. },
  276.  
  277. init: function() {
  278. var node = document.createElement('img');
  279. node.id = 'miniblogImgPop';
  280. document.body.appendChild(node);
  281. this.img = node;
  282.  
  283. Mask.init();
  284. },
  285.  
  286. move: function(e) {
  287. this.layoutImg(e); // 重新计算大图宽度与位置
  288. if (!this.allowMove) {
  289. return;
  290. }
  291. Mask.move(e);
  292. // 根据 Mask 的位置算出大图的位置
  293. var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
  294. this.img.style.top = (scrollTop - Mask.top * Mask.scale) + 14 + 'px';
  295. },
  296.  
  297. getBigImgsrc: function(obj) {
  298. var tempimgs, tempimg, imgsrc, i, l,
  299. sname = MiniblogImgPop.sitename,
  300. config = MiniblogImgPop.config;
  301. if (obj.tagName === 'IMG' || obj.tagName === 'img') {
  302. tempimg = obj;
  303. } else {
  304. tempimgs = obj.getElementsByTagName('IMG');
  305. if (!tempimgs || tempimgs.length === 0) {
  306. throw 'cant found the img node.';
  307. }
  308. else{
  309. tempimg = tempimgs[0];
  310. }
  311. }
  312.  
  313. //针对使用额外属性保存大图地址的网站
  314. if (config.bigSrc) {
  315. return tempimg.getAttribute(config.bigSrc) || 'javascript:;';
  316. }
  317.  
  318. //一般处理
  319. imgsrc = tempimg.getAttribute('src');
  320. //console.info(imgsrc);
  321. imgsrc = decodeURIComponent(imgsrc);
  322. if (typeof config.sFrag === 'object') {
  323. for(i=0, l=config.sFrag.length; i<l; i++) {
  324. imgsrc = imgsrc.replace(config.sFrag[i], config.bFrag[i]);
  325. }
  326. }
  327. else{
  328. imgsrc = imgsrc.replace(config.sFrag, config.bFrag);
  329. }
  330. return imgsrc;
  331. }
  332.  
  333. };
  334.  
  335. // 图片上遮罩的阴影
  336. var Mask = {
  337. show: function(e) {
  338. var smallImg = MiniblogImgPop.smallImg,
  339. bigImg = PopImg.img;
  340.  
  341. this.sOffset = offset(smallImg);
  342.  
  343. // 表示放大的倍数
  344. this.scale = (bigImg.height + 14) * 1.0 / this.sOffset.height;
  345.  
  346. // 计算出bar的高度
  347. if (window.innerHeight < bigImg.height) {
  348. this.height = parseInt(window.innerHeight/this.scale, 10);
  349. } else {
  350. this.height = this.sOffset.height;
  351. }
  352.  
  353. // 计算bar的Top值可以允许的范围
  354. this.range = this.sOffset.height - this.height;
  355.  
  356. // 计算 mask 的位置
  357. this.nodes[0].style.left = this.sOffset.x + 'px';
  358. this.nodes[0].style.width = this.sOffset.width + 'px';
  359. this.nodes[0].style.top = this.sOffset.y + 'px';
  360. this.nodes[1].style.left = this.sOffset.x + 'px';
  361. this.nodes[1].style.width = this.sOffset.width + 'px';
  362. this.nodes[1].style.bottom = (window.innerHeight - this.sOffset.y - this.sOffset.height) + 'px';
  363. this.move(e);
  364.  
  365. this.nodes[0].style.opacity = 0.7;
  366. this.nodes[1].style.opacity = 0.7;
  367. },
  368. hide: function() {
  369. this.nodes[0].style.opacity = 0;
  370. this.nodes[1].style.opacity = 0;
  371. this.nodes[0].style.height = 0;
  372. this.nodes[1].style.height = 0;
  373. },
  374. move: function(e) {
  375. // 计算鼠标相对于元素的位置
  376. var x = e.pageX - this.sOffset.x,
  377. y = e.pageY - this.sOffset.y;
  378.  
  379. // 计算bar的top值
  380. var top = y - this.height/2;
  381. top = top < 0 ? 0 : top;
  382. top = top > this.range ? this.range : top;
  383. this.top = top;
  384.  
  385. this.nodes[0].style.height = top + 'px';
  386. this.nodes[1].style.height = (this.sOffset.height - top - this.height) + 'px';
  387. },
  388. init: function() {
  389. var node1 = document.createElement('div');
  390. node1.className = 'miniblogImgPop-mask';
  391. document.body.appendChild(node1);
  392. var node2 = document.createElement('div');
  393. node2.className = 'miniblogImgPop-mask';
  394. document.body.appendChild(node2);
  395. this.nodes = [node1, node2];
  396. }
  397. };
  398.  
  399. var MiniblogImgPop = {
  400.  
  401. preloadImg: function() {
  402. var that = this;
  403. window.setTimeout(function() {
  404. var nodes = $(that.config.feedSelector);
  405. for (var i=0; i<nodes.length; i++) {
  406. var preloadImg = new Image();
  407. preloadImg.src = PopImg.getBigImgsrc(nodes[i]);
  408. }
  409. }, 1500);
  410. },
  411.  
  412. prepare: function() {
  413. this.sitename = this._getSiteName();
  414. this.config = MIPConfig[this.sitename];
  415. },
  416.  
  417. addImgsEventListener: function() {
  418. var that = this;
  419. delegate(document.body, 'mouseover', function(e, node) {
  420. that.smallImg = node;
  421. node.style.opacity = 0.84;
  422. PopImg.show(e);
  423. }, this.config.feedSelector);
  424. delegate(document.body, 'mouseout', function(e, node) {
  425. node.style.opacity = '';
  426. PopImg.hide();
  427. }, this.config.feedSelector);
  428. delegate(document.body, 'mousemove', function(e) {
  429. PopImg.move(e);
  430. }, this.config.feedSelector);
  431. },
  432.  
  433. // 获得当前站点名
  434. _getSiteName: function() {
  435. var i, each;
  436. for(each in MIPConfig) {
  437. if (location.href.indexOf(each) != -1) {
  438. return each;
  439. }
  440. }
  441. return '';
  442. },
  443.  
  444. init: function() {
  445. // 初始化两个节点
  446. PopImg.init();
  447. // 准备必要的数据
  448. this.prepare();
  449. // 绑定imgs hover事件
  450. this.addImgsEventListener();
  451. // 预加载大图
  452. this.preloadImg();
  453. }
  454.  
  455. };
  456.  
  457. // 启动
  458. MiniblogImgPop.init();
  459.  
  460.  
  461. // Helpers
  462. // ---
  463.  
  464. function $(selector) {
  465. return document.querySelectorAll(selector);
  466. }
  467.  
  468. function offset(source) {
  469. var pt = {
  470. x:0,
  471. y:0,
  472. width:source.offsetWidth,
  473. height:source.offsetHeight
  474. };
  475. do {
  476. pt.x += source.offsetLeft;
  477. pt.y += source.offsetTop;
  478. source = source.offsetParent;
  479. } while (source);
  480. return pt;
  481. }
  482.  
  483. function delegate(el, eventType, handler, selector) {
  484. el = el || document;
  485. el.addEventListener(eventType, function(e) {
  486. var node = getHandlerNode(e, selector, el);
  487. node && handler.call(el, e, node);
  488. }, false);
  489.  
  490. function getHandlerNode(e, selector, el) {
  491. //返回我们handler需要的参数
  492. var nodes;
  493. el = el || document;
  494. if (e && e.target && selector) {
  495. nodes = el.querySelectorAll(selector);
  496. for(i=0; i<nodes.length; i++) {
  497. if (e.target == nodes[i] || isInDomChain(e.target, nodes[i], el)) {
  498. return nodes[i];
  499. }
  500. }
  501. return false;
  502. }
  503. }
  504.  
  505. function isInDomChain(target, parent, ancestor, maxDepth) {
  506. ancestor = ancestor || null;
  507. maxDepth = maxDepth || 100;
  508.  
  509. if (target == ancestor) {
  510. return false;
  511. }
  512. if (target == parent) {
  513. return true;
  514. }
  515. var i = 0;//防止过多嵌套
  516. while (target != ancestor && target !== null && (i++ < maxDepth)) {
  517. target = target.parentNode;
  518. if (target == parent) {
  519. return true;
  520. }
  521. }
  522. return false;
  523. }
  524. }
  525.  
  526. /**
  527. * 图片头数据加载就绪事件 - 更快获取图片尺寸
  528. * @version 2011.05.27
  529. * @author TangBin
  530. * @see http://www.planeart.cn/?p=1121
  531. * @param {String} 图片路径
  532. * @param {Function} 尺寸就绪
  533. * @param {Function} 加载完毕 (可选)
  534. * @param {Function} 加载错误 (可选)
  535. * @example imgReady('http://www.google.com.hk/intl/zh-CN/images/logo_cn.png', function () {
  536. alert('size ready: width=' + this.width + '; height=' + this.height);
  537. });
  538. */
  539. var imgReady = (function () {
  540. var list = [], intervalId = null,
  541.  
  542. // 用来执行队列
  543. tick = function () {
  544. var i = 0;
  545. for (; i < list.length; i++) {
  546. list[i].end ? list.splice(i--, 1) : list[i]();
  547. }
  548. !list.length && stop();
  549. },
  550.  
  551. // 停止所有定时器队列
  552. stop = function () {
  553. window.clearInterval(intervalId);
  554. intervalId = null;
  555. };
  556.  
  557. return function (url, ready, load, error) {
  558. var onready, width, height, newWidth, newHeight,
  559. img = new Image();
  560.  
  561. img.src = url;
  562.  
  563. // 如果图片被缓存,则直接返回缓存数据
  564. if (img.complete) {
  565. ready.call(img);
  566. load && load.call(img);
  567. return;
  568. }
  569.  
  570. width = img.width;
  571. height = img.height;
  572.  
  573. // 加载错误后的事件
  574. img.onerror = function () {
  575. error && error.call(img);
  576. onready.end = true;
  577. img = img.onload = img.onerror = null;
  578. };
  579.  
  580. // 图片尺寸就绪
  581. onready = function () {
  582. newWidth = img.width;
  583. newHeight = img.height;
  584. if (newWidth !== width || newHeight !== height ||
  585. // 如果图片已经在其他地方加载可使用面积检测
  586. newWidth * newHeight > 1024
  587. ) {
  588. ready.call(img);
  589. onready.end = true;
  590. }
  591. };
  592. onready();
  593.  
  594. // 完全加载完毕的事件
  595. img.onload = function () {
  596. // onload在定时器时间差范围内可能比onready快
  597. // 这里进行检查并保证onready优先执行
  598. !onready.end && onready();
  599.  
  600. load && load.call(img);
  601.  
  602. // IE gif动画会循环执行onload,置空onload即可
  603. img = img.onload = img.onerror = null;
  604. };
  605.  
  606. // 加入队列中定期执行
  607. if (!onready.end) {
  608. list.push(onready);
  609. // 无论何时只允许出现一个定时器,减少浏览器性能损耗
  610. if (intervalId === null) intervalId = setInterval(tick, 40);
  611. }
  612. };
  613. })();
  614.  
  615. // GM_addStyle function is not existed in chrome 27
  616. var GM_addStyle = GM_addStyle || function(css) {
  617. var style = document.createElement("style");
  618. style.type = "text/css";
  619. style.appendChild(document.createTextNode(css));
  620. document.getElementsByTagName("head")[0].appendChild(style);
  621. };
  622.  
  623. // 增加自定义样式
  624. GM_addStyle("\
  625. #miniblogImgPop {\
  626. border: 7px solid rgba(255,255,255,1);\
  627. box-shadow: 0 1px 30px rgba(0, 0, 0, 0.75), 0 0 40px rgba(0, 0, 0, 0.25) inset;\
  628. z-index: 12345;\
  629. opacity: 0;\
  630. margin-top: 0;\
  631. position: absolute;\
  632. visibility: hidden;\
  633. max-width: 500px;\
  634. transition: opacity 0.2s ease-out 0s, margin-top 0.2s ease-out 0s;\
  635. }\
  636. ");
  637.  
  638. // 增加自定义样式
  639. GM_addStyle("\
  640. .miniblogImgPop-mask {\
  641. background: rgb(0, 0, 0);\
  642. z-index: 999;\
  643. position: absolute;\
  644. transition: opacity 0.4s ease-out 0;\
  645. }\
  646. ");
  647.  
  648. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址