// ==UserScript== // @name 天猫 图片获取脚本 // @namespace https://www.tmall.com // @version 1.12 // @description 下载天猫缩略图,分类图以及详情图 // @author Richard He // @homepage https://www.greasyfork.org/users/89556 // @iconURL http://p8fvixyr8.bkt.clouddn.com/images/icon/tmallImageDown.ico // @match https://detail.tmall.com/* // @match https://detail.tmall.hk/* // @grant GM_log // @grant GM_setClipboard // @grant GM_notification // @grant GM_download // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue // @grant GM_addStyle // @downloadURL none // ==/UserScript== //match example url //1. https://detail.tmall.com/item.htm?id=559254305797 /*jshint multistr:true */ //CSS Style GM_addStyle('\ /* style for thumbs */\ .thumbUlOverride li{\ padding-top:0px!important;\ }\ .thumbUlOverride li a {\ border:2px solid #000;\ width:56px!important;\ height:56px!important;\ font-size:22px;\ font-family:Arial;\ font-weight:bold;\ color:#FE0335!important;\ line-height:56px!important;\ }\ .img-down li a{\ font-family:Arial;\ cursor:pointer;\ color:#FE0335;\ font-weight:bold;\ font-size:16px;\ }\ .cat-ul{\ \ }\ .cat-ul li{\ line-height:28px;\ float:left;\ position:relative;\ margin:0 4px 4px 0;\ vertical-align:middle;\ padding:1px;\ list-style:none;\ }\ .cat-ul li a{\ width:38px!important;\ height:38px;\ padding:0px;\ line-height:38px;\ outline:0;\ font-family:Arial;\ color:#FE0335;\ font-weight:bolder;\ }\ '); //Vars needed var paramsObj = {}; //store all the parameters in url var params = location.search.substr(1).split('&'); for(var i=0;i=0) { catWrapperDl = d.createElement('dl'); catWrapperDt = d.createElement('dt'); catWrapperUl = d.createElement('ul'); catWrapperLi = d.createElement('li'); jAmount.parentNode.parentNode.insertBefore(catWrapperDl,jAmount.parentNode); catWrapperDl.appendChild(catWrapperDt); catWrapperDd = d.createElement('dd'); catWrapperDl.appendChild(catWrapperDd); catWrapperDd.appendChild(catWrapperUl); catWrapperDl.className = 'tb-prop'; catWrapperDt.className = 'tb-metatit'; catWrapperDt.innerHTML = '天猫图片
分类下载'; catWrapperUl.className = 'cat-ul'; for(var i=0;i0) { for(var j=0;j0) { for(var j=0;j