// ==UserScript== // @name ds37自用油猴脚本 // @namespace http://tampermonkey.net/ // @version 0.116 // @description try to take over the world! // @author ds37 // @match mmbiz.qpic.cn/* // @match mp.weixin.qq.com/* // @match login.taobao.com/member/login.jhtml* // @match cn.bing.com/* // @match *.music.126.net/* // @match *.dribbble.com/* // @match *.jianshu.io/* // @match *.tmall.com/* // @match dl.zhutix.net/* // @match static.iyingdi.cn/* // @match wspic.iyingdi.cn/* // @match wsmedia.iyingdi.cn/* // @match static.iyingdi.com/* // @match tiebapic.baidu.com/* // @match *.zhimg.com/* // @grant none // @downloadURL none // ==/UserScript== //右键在新标签中打开图片时显示最优化图像质量 //增加的,控制台测试有效,但是放在原作者js里面无效 //有两个原因,1是不能放在最后面,2是需要在脚本注释里面也加上适配网站 /* var url = document.location.toString(); var m = null; m = url.match(/^(https?:\/\/.+\.dribbble\.com\/)([\w\-\/]+)_(?:\w+)(\.(jpg|jpeg|gif|png|bmp|webp))$/i); document.location = m[1] + m[2] + m[3]; 浏览器控制台调试用。 */ var url = document.location.toString(); var m = null; var img = null; //网易云音乐图片 if ((m = url.match(/^(https?:\/\/p\d?\.music\.126\.net\/.*==\/\d*(\.jpg)?)(\?param=\d*y\d*)$/i))) { document.location = m[1]; } //https://detail.tmall.com/item.htm?spm=a1z10.3-b.w4011-4576207802.89.3ffe6c283xuI7K&id=606339945843&rn=251790cc7fcc948982bedb0906114d7a&abbucket=10&skuId=4422763215508 //天猫链接净化 else if ((m = url.match(/^(https?:\/\/.+\.tmall\.com\/item\.htm\?)(?:[\w\-\.\=]+&)(id=\d+)(&.*)$/i))) { document.location = m[1] + m[2]; } //dribbble图片 //https://cdn.dribbble.com/users/729829/screenshots/8070547/dribbble_1x.png //https://cdn.dribbble.com/users/2811827/screenshots/7999487/black_squares.png else if ((m = url.match(/^(https?:\/\/.+\.dribbble\.com\/)([\w\-\/]+)(?:_\w{1,2})(\.(jpg|jpeg|gif|png|bmp|webp))$/i))) { document.location = m[1] + m[2] + m[3]; } //微信公众号网页图片 else if ((m = url.match(/^(https?:\/\/mmbiz.qpic.cn\/mmbiz_\w*\/.*\/640)(.+)$/i))) { document.location = m[1]; } //https://mp.weixin.qq.com/s?__biz=MzI3NzkzNDcxOA==&mid=2247544667&idx=1&sn=d041d4bca03fee9a6c0c6045a048a1ea&chksm=eb5cc84adc2b415c28a1a92b7314cacc7e79d5c40e29fa42ac5c1c083f4901b435129c0bfd28&scene=27&subscene=10000&clicktime=1589133397&enterid=1589133397&ascene=0&devicetype=android-29&version=27000a11&nettype=WIFI&abtest_cookie=AAACAA%3D%3D&lang=zh_CN&exportkey=A9yslC9du78Owb2jxmG5BxQ%3D&pass_ticket=V0k7CVUu2YqxifhjJyDxZc1KRlUK0lGVIPjDo1LF1UDQVcspE1OQCAyYVqyjNRB3&wx_header=1 //微信公众号网页链接净化 else if ((m = url.match(/^(https?:\/\/mp.weixin.qq.com\/s\?__biz=)(.+)(&chksm=.+)$/i))) { document.location = m[1] + m[2]; } //淘宝背景图片下载,如果是默认图的话就不打开需要手动刷新 else if ((m = url.match(/^(https:\/\/login\.taobao\.com\/member\/login\.jhtml)(.*)$/i))) { img = document.getElementsByClassName("login-newbg")[0].style.backgroundImage; img = img.match(/url\("(.*)"\)/)[1]; if (img != "https://gtms01.alicdn.com/tps/i1/TB1GTCYLXXXXXcHXpXXcoeQ2VXX-2500-600.jpg") { window.open(img); } } //必应背景图片下载 else if ((m = url.match(/^(https:\/\/cn\.bing\.com\/)(.*)$/i))) { img = document.getElementById("bgLink").href; window.open(img); } //简书图片 //https://upload.jianshu.io/users/upload_avatars/10369183/1be8866e-5d8c-4930-9825-58d13e436fc3.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/240/h/240 //https://upload-images.jianshu.io/upload_images/4219043-25c53c817bc61247.png?imageMogr2/auto-orient/strip|imageView2/2/w/768/format/webp else if ((m = url.match(/^(https?:\/\/.+\.jianshu\.io\/)([\w\-\/]+)(\.(jpg|jpeg|gif|png|bmp|webp))(?:\?imageMogr.*)$/i))) { document.location = m[1] + m[2] + m[3]; } //致美化-主题秀图片 //https://dl.zhutix.net/2020/05/457214a9be4b573bebb.jpg?x-oss-process=image/resize,w_500/format,jpg else if ((m = url.match(/^(https?:\/\/dl\.zhutix\.net\/)(.+)(\?.*)$/i))) { document.location = m[1] + m[2]; } //旅法师营地图片static //http://static.iyingdi.cn/common/2018/12/02/e96af9ff-7012-4fdb-94f2-a60899a1e43b.png?x-oss-process=image/resize,w_720/format,jpg/watermark,image_Y29tbW9uL3dhdGVybWFyay5wbmc_eC1vc3MtcHJvY2Vzcz1pbWFnZS9yZXNpemUsUF8yMw,t_70,g_se,x_20,y_15 else if ((m = url.match(/^(https?:\/\/static\.iyingdi\.cn\/)(.+)(\?.*)$/i))) { document.location = m[1] + m[2]; } //旅法师营地图片wspic //http://wspic.iyingdi.cn/common/2018/12/04/1a517bc4-92b0-4cfc-b4d6-4f6a40f9d7cf.png?x-oss-process=image/resize,w_720/format,jpg/watermark,image_Y29tbW9uL3dhdGVybWFyay5wbmc_eC1vc3MtcHJvY2Vzcz1pbWFnZS9yZXNpemUsUF8yMw,t_70,g_se,x_20,y_15 else if ((m = url.match(/^(https?:\/\/wspic\.iyingdi\.cn\/)(.+)(\?.*)$/i))) { document.location = m[1] + m[2]; } //旅法师营地图片wsmedia //https://wsmedia.iyingdi.cn/common/2018/12/13/83f424fc-7541-4f53-931b-dd1a8398ee83.png?x-oss-process=image/resize,w_720/format,jpg/watermark,image_Y29tbW9uL3dhdGVybWFyay5wbmc_eC1vc3MtcHJvY2Vzcz1pbWFnZS9yZXNpemUsUF8yMw,t_70,g_se,x_20,y_15 else if ((m = url.match(/^(https?:\/\/wsmedia\.iyingdi\.cn\/)(.+)(\?.*)$/i))) { document.location = m[1] + m[2]; } //旅法师营地图片static //https://static.iyingdi.com/common/2020/03/18/5aba1021-8f1f-44e6-9468-6800f0a4d245.png?x-oss-process=image/resize,w_720/format,jpg/watermark,image_Y29tbW9uL3dhdGVybWFyay5wbmc_eC1vc3MtcHJvY2Vzcz1pbWFnZS9yZXNpemUsUF8yMw,t_70,g_se,x_20,y_15 else if ((m = url.match(/^(https?:\/\/static\.iyingdi\.com\/)(.+)(\?.*)$/i))) { document.location = m[1] + m[2]; } //百度贴吧图片 //http://tiebapic.baidu.com/forum/w%3D580/sign=d3505db2d91b9d168ac79a69c3dfb4eb/559955084b36acaf8b4b59916bd98d1000e99ca8.jpg //https://imgsrc.baidu.com/forum/pic/item/559955084b36acaf8b4b59916bd98d1000e99ca8.jpg else if ((m = url.match(/^(https?:\/\/tiebapic\.baidu\.com\/)(.+sign=.+\/)(.+)$/i))) { document.location = "https://imgsrc.baidu.com/forum/pic/item/" + m[3]; //alert("https://imgsrc.baidu.com/forum/pic/item/" + m[3]); } //知乎图片 //https://pic4.zhimg.com/v2-209419022f1c20ea05381da3273f1c57_r.jpg //https://pic4.zhimg.com/v2-209419022f1c20ea05381da3273f1c57_xl.jpg //https://pic4.zhimg.com/80/v2-726fe7343ae6c2d2e0e26da3b9bdf4fd_720w.jpg /* 原作者的暂时停用了,图片会变成下载,而不是页面显示 //zhihu else if( (m = url.match(/^(https?:\/\/.+\.zhimg\.com\/)(?:\d+\/)?([\w\-]+_)(\w+)(\.(jpg|jpeg|gif|png|bmp|webp))(?:\?.+)?$/i)) ){ if(m[3]!="r") { document.location = m[1] + m[2] + "r" + m[4]; } } */ else if ((m = url.match(/^(https?:\/\/pic\d\.zhimg\.com\/)(.+_)(.+)(\..*)$/i))) { if (m[3] != "r") { document.location = m[1] + m[2] + "r" + m[4]; } }