// ==UserScript==
// @name ds37自用油猴脚本
// @namespace http://tampermonkey.net/
// @version 0.25
// @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 *.bing.com/*
// @match *.music.126.net/*
// @match *.dribbble.com/*
// @match *.jianshu.io/*
// @match *.tmall.com/*
// @match dl.zhutix.net/*
// @match static.iyingdi.cn/*
// @match static.iyingdi.com/*
// @match wspic.iyingdi.cn/*
// @match wspic.iyingdi.com/*
// @match wsmedia.iyingdi.cn/*
// @match tiebapic.baidu.com/*
// @match *.zhimg.com/*
// @match -images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/*
// @match img.bosszhipin.com/*
// @match img.yzcdn.cn/*
// @match *.doubanio.com/*
// @match img.xiaohongshu.com/*
// @match *.xpccdn.com/*
// @match www.deviantart.com/*
// @match hentaiporns.net/*
// @match *.wellcee.com/*
// @match www.lgstatic.com/*
// @grant none
// ==/UserScript==
//将同类别功能的代码进行了分类
var url = document.location.toString();
var m = null;
var img = null;
//---------类别一:添加下载按钮---------
//淘宝登录(不可用)页背景图片下载-更新*3,如果是默认图的话就自动刷新
if ((m = url.match(/^(https:\/\/login\.taobao\.com\/member\/login\.jhtml)(.*)$/i))) {
img = document.getElementsByClassName("login-newbg")[0].style.backgroundImage.match(/url\("(.*)"\)/)[1];
//Midnight Lizard夜间模式会将background里面的图片地址由png转成svg+xml格式
if (img != "https://gtms01.alicdn.com/tps/i1/TB1GTCYLXXXXXcHXpXXcoeQ2VXX-2500-600.jpg") {
window.open(img);
document.querySelectorAll('a')[0].target = "_blank";
document.querySelectorAll('a')[0].href = img;
document.querySelectorAll('a')[0].download = img;
}
else {
location.reload(); //重新加载当前页面,相当于F5刷新
}
}
//必应背景图片下载-更新*3
//地址由https://cn.bing.com/换成了https://www.bing.com/?mkt=zh-CN
else if ((m = url.match(/^(https:\/\/.+\.bing\.com\/)(.*)$/i))) {
//自动打开背景图片,或者点击左边LOGO打开 ✘ 不自动打开,点击左边LOGO改成更新当前背景信息
img = document.getElementById("bgLink").href;
var img_info = document.querySelectorAll('a#sh_cp.sc_light')[0].getAttribute("title");
//window.open(img);
//document.querySelectorAll('div.hp_sw_logo.hpcLogoWhite')[0].setAttribute("onclick", "window.open(\"" + img + "\")");
//document.querySelectorAll('div.hp_sw_logo.hpcLogoWhite')[0].setAttribute("onclick", "window.open(\"https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=zh-CN\")");
document.querySelectorAll('div.hp_sw_logo.hpcLogoWhite')[0].setAttribute("onclick", "g");
function img_info_show() {
document.querySelectorAll("input#sb_form_q.b_searchbox")[0].value = img_info;
alert('abc'); //这一步能成功,但是上一步失败
}
document.querySelectorAll('div.hp_sw_logo.hpcLogoWhite')[0].onclick = img_info_show;
//在搜索框上方添加下载当前背景图片的按钮,并在搜索框内显示图片描述
//只有将id改成est_cn或者est_en才跟原来的按钮样式一样,就算class一样但是自定义id的话会以普通的文字显示到下一行
document.querySelectorAll('div#est_en.est_unselected')[0].insertAdjacentHTML('afterend', '<a id="est_en" class="est_unselected">下载背景</a>');
//文件名用正则表达式提取英文名称再加上中文描述,就不会是默认保存的th.jpg了,https://cn.bing.com/th?id=OHR.FrederickSound_ZH-CN1838908749_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp
document.querySelectorAll("input#sb_form_q.b_searchbox")[0].value = img_info;
document.querySelectorAll("a.est_unselected")[0].href = img;
document.querySelectorAll("a.est_unselected")[0].download = img.match(/^.*th\?id=OHR\.(.+?_1920x1080).+$/i)[1] + "_" + img_info;
}
//deviantart图片添加下载按钮,未解决
if ((m = url.match(/^(https:\/\/www\.deviantart\.com\/)(.+)(\/art\/)(.+)$/i))) {
var title_name = document.querySelectorAll('h1._2p6cd._1H4oq')[0].textContent;
img_info = m[2] + "-" + m[4];
//document.querySelectorAll('h1._2p6cd._1H4oq')[0].value = "<a id=\"img_download\">" + title_name + "<\/a>";
document.querySelectorAll('h1._2p6cd._1H4oq')[0].insertAdjacentHTML('afterend', '<a id="img_download" class="_3USIK _1nd-h">∞download∞</a>');
document.querySelectorAll("a#img_download")[0].href = document.querySelectorAll('img._1izoQ.vbgSM')[0].src;
//[浅析 HTML5 中的 download 属性 - 知乎](https://zhuanlan.zhihu.com/p/58888918)
//download属性目前仅适用于同源 URL,即如果需要下载的资源地址是跨域的,download属性就会失效,点击链接会变成导航预览。
document.querySelectorAll("a#img_download")[0].download = img_info; //不会直接下载,而是在当前标签页打开图片,而且图片质量有时候不是最高
//https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/fe7ab27f-7530-4252-99ef-2baaf81b36fd/dcb28ug-3db9e14c-858d-4ceb-99ec-776fbb764742.png/v1/fill/w_1131,h_707,q_70,strp/a2_by_raikoart_dcb28ug-pre.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3siaGVpZ2h0IjoiPD04MDAiLCJwYXRoIjoiXC9mXC9mZTdhYjI3Zi03NTMwLTQyNTItOTllZi0yYmFhZjgxYjM2ZmRcL2RjYjI4dWctM2RiOWUxNGMtODU4ZC00Y2ViLTk5ZWMtNzc2ZmJiNzY0NzQyLnBuZyIsIndpZHRoIjoiPD0xMjgwIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmltYWdlLm9wZXJhdGlvbnMiXX0.eTK6Ekelzrub20gN60SgE4DsJR2X3RrfcykWQHKG2io
//https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/fe7ab27f-7530-4252-99ef-2baaf81b36fd/dcb28ug-3db9e14c-858d-4ceb-99ec-776fbb764742.png?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3sicGF0aCI6IlwvZlwvZmU3YWIyN2YtNzUzMC00MjUyLTk5ZWYtMmJhYWY4MWIzNmZkXC9kY2IyOHVnLTNkYjllMTRjLTg1OGQtNGNlYi05OWVjLTc3NmZiYjc2NDc0Mi5wbmcifV1dLCJhdWQiOlsidXJuOnNlcnZpY2U6ZmlsZS5kb3dubG9hZCJdfQ.g2WCQP4U1o6XabpDP2BA9xOEVWj0rsrBQcUNtdeAzXQ
}
//---------类别二:长链接净化---------
//天猫链接净化
//https://detail.tmall.com/item.htm?spm=a1z10.3-b.w4011-4576207802.89.3ffe6c283xuI7K&id=606339945843&rn=251790cc7fcc948982bedb0906114d7a&abbucket=10&skuId=4422763215508
//https://detail.tmall.com/item.htm?id=606339945843
else if ((m = url.match(/^(https?:\/\/.+\.tmall\.com\/item\.htm\?)(?:[\w\-\.\=]+&)(id=\d+)(&.*)$/i))) {
document.location = m[1] + m[2];
}
//微信公众号网页链接净化
//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
//https://mp.weixin.qq.com/s?__biz=MzI3NzkzNDcxOA==&mid=2247544667&idx=1&sn=d041d4bca03fee9a6c0c6045a048a1ea
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?:\/\/p\d?\.music\.126\.net\/.*==\/\d*(\.(jpg|jpeg|gif|png|bmp|webp))?)(\?param=\d*y\d*)$/i))) {
document.location = m[1];
}
//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://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.iyingdi.cn、wspic.iyingdi.cn、wspic.iyingdi.com、wsmedia.iyingdi.cn、static.iyingdi.com
//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
//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
//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
//https://wspic.iyingdi.com/common/2020/02/21/b763c900-53cb-459c-882f-4a633b58653b.jpeg?x-oss-process=image/resize,w_720/format,jpg/watermark,image_Y29tbW9uL3dhdGVybWFyay5wbmc_eC1vc3MtcHJvY2Vzcz1pbWFnZS9yZXNpemUsUF8yMw,t_70,g_se,x_20,y_15
//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?:\/\/(static|wspic|wsmedia)\.iyingdi\.(cn|com)\/)(.+)(\?.*)$/i))) {
document.location = m[1] + m[4];
}
//百度贴吧图片
//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];
}
}
//deviantart图片,有两种情况不好协调,未成功
//https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/004e5896-6d51-4da0-aed6-09f167eb80b5/dantbho-2e4f7309-851a-4383-8a46-3ff064cf2306.jpg/v1/fill/w_375,h_250,q_70,strp/the_witcher___triss_merigold_cosplay_by_dzikan_dantbho-250t.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3siaGVpZ2h0IjoiPD02ODMiLCJwYXRoIjoiXC9mXC8wMDRlNTg5Ni02ZDUxLTRkYTAtYWVkNi0wOWYxNjdlYjgwYjVcL2RhbnRiaG8tMmU0ZjczMDktODUxYS00MzgzLThhNDYtM2ZmMDY0Y2YyMzA2LmpwZyIsIndpZHRoIjoiPD0xMDI0In1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmltYWdlLm9wZXJhdGlvbnMiXX0.UhK98dZFq07hRCAshoG03LwDYSsZoSBaE9Ln-Ss4-Ik
//https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/004e5896-6d51-4da0-aed6-09f167eb80b5/dantbho-2e4f7309-851a-4383-8a46-3ff064cf2306.jpg/v1/fill/w_1024,h_683,q_75,strp/the_witcher___triss_merigold_cosplay_by_dzikan_dantbho-fullview.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3siaGVpZ2h0IjoiPD02ODMiLCJwYXRoIjoiXC9mXC8wMDRlNTg5Ni02ZDUxLTRkYTAtYWVkNi0wOWYxNjdlYjgwYjVcL2RhbnRiaG8tMmU0ZjczMDktODUxYS00MzgzLThhNDYtM2ZmMDY0Y2YyMzA2LmpwZyIsIndpZHRoIjoiPD0xMDI0In1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmltYWdlLm9wZXJhdGlvbnMiXX0.UhK98dZFq07hRCAshoG03LwDYSsZoSBaE9Ln-Ss4-Ik
//https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/004e5896-6d51-4da0-aed6-09f167eb80b5/dar0zoy-03ef51d4-a2d9-4dcd-84d9-061f670b745f.jpg/v1/fill/w_233,h_350,q_70,strp/the_witcher_3__triss_merigold_cosplay_by_dzikan_dar0zoy-350t.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3siaGVpZ2h0IjoiPD0xMzUwIiwicGF0aCI6IlwvZlwvMDA0ZTU4OTYtNmQ1MS00ZGEwLWFlZDYtMDlmMTY3ZWI4MGI1XC9kYXIwem95LTAzZWY1MWQ0LWEyZDktNGRjZC04NGQ5LTA2MWY2NzBiNzQ1Zi5qcGciLCJ3aWR0aCI6Ijw9OTAwIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmltYWdlLm9wZXJhdGlvbnMiXX0.FOMqMc3h_DTPc4ns8F-Eo4zM5RVZ_CAMRj5HUKCOPtc
//https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/004e5896-6d51-4da0-aed6-09f167eb80b5/dar0zoy-03ef51d4-a2d9-4dcd-84d9-061f670b745f.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3sicGF0aCI6IlwvZlwvMDA0ZTU4OTYtNmQ1MS00ZGEwLWFlZDYtMDlmMTY3ZWI4MGI1XC9kYXIwem95LTAzZWY1MWQ0LWEyZDktNGRjZC04NGQ5LTA2MWY2NzBiNzQ1Zi5qcGcifV1dLCJhdWQiOlsidXJuOnNlcnZpY2U6ZmlsZS5kb3dubG9hZCJdfQ.M0Nc1hyH7rDAbi1bE_uVmjgUexl78yMT6G-veE3I5vE
/*
else if ((m = url.match(/^(https?:\/\/images-wixmp-ed30a86b8c4ca887773594c2\.wixmp\.com\/)(.+?\.(jpg|jpeg|gif|png|bmp|webp))(.*)(\?token=.*)$/i))) {
document.location = m[1] + m[2] + m[5];
}
*/
//boss直聘头像图片
//https://img.bosszhipin.com/beijin/upload/tmp/20200708/d39703b13c1c72ccd3520a338afb1144add2f893c84edf383baaf2eb7466f4ca_s.jpg?x-oss-process=image/resize,w_100,limit_0
//https://img.bosszhipin.com/beijin/upload/tmp/20200708/d39703b13c1c72ccd3520a338afb1144add2f893c84edf383baaf2eb7466f4ca.jpg
else if ((m = url.match(/^(https?:\/\/img\.bosszhipin\.com\/)(.+)(_\w)(\.(jpg|jpeg|gif|png|bmp|webp))(.*)$/i))) {
document.location = m[1] + m[2] + m[4];
}
//有赞图片
//https://img.yzcdn.cn/upload_files/2020/07/13/Fjxbgw7kjl7z3LZOZouSiWS9hCLk.png!large.webp
//https://img.yzcdn.cn/upload_files/2020/07/13/Fjxbgw7kjl7z3LZOZouSiWS9hCLk.png!
else if ((m = url.match(/^(https?:\/\/img\.yzcdn\.cn\/)(.+\.(jpg|jpeg|gif|png|bmp|webp))(!.*)$/i))) {
document.location = m[1] + m[2];
}
//豆瓣头像图片
//https://img9.doubanio.com/icon/u196757893-1.jpg
//https://img9.doubanio.com/icon/ul196757893-1.jpg
else if ((m = url.match(/^(https?:\/\/img\d*\.doubanio\.com\/)(icon\/u[a-z]?)(.+\.(jpg|jpeg|gif|png|bmp|webp))$/i))) {
//else if ((m = url.match(/^(https?:\/\/img\d*\.doubanio\.com\/)(icon\/u[a-z])(.+\.(jpg|jpeg|gif|png|bmp|webp))$/i))) {
if (m[2] != "icon/ul") {
document.location = m[1] + "icon/ul" + m[3];
}
}
//小红书头像图片
//https://img.xiaohongshu.com/avatar/5c7763eaac05f80001807561.jpg@80w_80h_90q_1e_1c_1x.jpg
//https://img9.doubanio.com/icon/ul196757893-1.jpg
else if ((m = url.match(/^(https?:\/\/img\.xiaohongshu\.com\/)(.+\.(jpg|jpeg|gif|png|bmp|webp))(@.*)$/i))) {
document.location = m[1] + m[2];
}
//新片场头像图片
//https://oss-xpc0.xpccdn.com/Upload/user/2018/07/105b44512457775.jpeg@290w_290h_1e_1c?id=618829641
//https://oss-xpc0.xpccdn.com/Upload/user/2018/07/105b44512457775.jpeg
else if ((m = url.match(/^(https?:\/\/oss-xpc\d\.xpccdn\.com\/)(.+\.(jpg|jpeg|gif|png|bmp|webp))(@.*)$/i))) {
document.location = m[1] + m[2];
}
//hentaiporns图片
//https://hentaiporns.net/kaya1028-zero-two-cosplay-darling-in-the-franxx/
//https://hentaiporns.net/wp-content/uploads/2018/03/1195297-85e3be5agy1fon8r22xqsj20y41f4haj_1-150x150.jpg
//https://hentaiporns.net/wp-content/uploads/2018/03/1195297-85e3be5agy1fon8r22xqsj20y41f4haj_1.jpg
else if ((m = url.match(/^(https?:\/\/hentaiporns\.net\/)(.+)(-\d+x\d+)(\.(jpg|jpeg|gif|png|bmp|webp))$/i))) {
document.location = m[1] + m[2] + m[4];
}
//wellcee唯心所寓图片
//https://qnimg1.wellcee.com/data/2020/03/17/15844511231538714?imageView2/1/w/200/h/200
//https://qnimg1.wellcee.com/data/2020/03/17/15844511231538714
else if ((m = url.match(/^(https?:\/\/qnimg\d*\.wellcee\.com\/)(.+)(\?.*)$/i))) {
document.location = m[1] + m[2];
}
//拉勾网图床头像图片
//https://www.lgstatic.com/thumbnail_120x120/i/image/M00/1D/C0/Ciqc1F7i19GAcs6wAABIQfC6xZE425.png
//https://www.lgstatic.com/i/image/M00/1D/C0/Ciqc1F7i19GAcs6wAABIQfC6xZE425.png
else if ((m = url.match(/^(https?:\/\/www\.lgstatic\.com\/)(thumbnail_.+?\/)(.*)$/i))) {
document.location = m[1] + m[3];
}