// ==UserScript== // @name 金山文档增加查看原图按钮 // @namespace http://tampermonkey.net/ // @version 2024-04-19 // @description 在思维导图预览图片时增加查看原图按钮 // @author AN drew // @match https://www.kdocs.cn/view/* // @match https://wps.processon.com/diagrams/* // @grant none // @license MIT // @downloadURL https://update.greasyfork.icu/scripts/492771/%E9%87%91%E5%B1%B1%E6%96%87%E6%A1%A3%E5%A2%9E%E5%8A%A0%E6%9F%A5%E7%9C%8B%E5%8E%9F%E5%9B%BE%E6%8C%89%E9%92%AE.user.js // @updateURL https://update.greasyfork.icu/scripts/492771/%E9%87%91%E5%B1%B1%E6%96%87%E6%A1%A3%E5%A2%9E%E5%8A%A0%E6%9F%A5%E7%9C%8B%E5%8E%9F%E5%9B%BE%E6%8C%89%E9%92%AE.meta.js // ==/UserScript== (function() { 'use strict'; if(window.location.href.indexOf('wps.processon.com') > -1) { setInterval(function(){ if($('#img-preview .bottom-tool').length>0) { if($('#img-preview .tool-item.orgin').length==0) { let url=$('#img-preview .current-image').attr('src'); $('#img-preview .bottom-tool').append('
查看原图
') } else { if($('#img-preview .current-image').attr('src')!=$('#img-preview .tool-item.orgin a').attr('href')) { $('#img-preview .tool-item.orgin a').attr('href', $('#img-preview .current-image').attr('src')) } } } },1000); } })();