坐等手搓大佬,略有偿(一杯咖啡
需求如下:想修改的是顺丰查件的页面,想全面显示物流路由信息(现在是有滚动条,不便打印)
工作原因不能接受第三方查询渠道
谢谢
2 个赞
给我个单号……
试试: SF1646993888694
https://www.sf-express.com/we/ow/chn/sc/waybill/waybill-detail/SF1646993888694
1 个赞
// ==UserScript==
// @name 展开顺丰查询结果
// @namespace Expand-sf-Express
// @version 0.1
// @description 展开顺丰查询结果
// @author dms
// @match https://www.sf-express.com/we/ow/chn/sc/waybill/waybill-detail/SF*
// @icon https://www.google.com/s2/favicons?sz=64&domain=sf-express.com
// @grant GM_addStyle
// ==/UserScript==
(function() {
'use strict';
GM_addStyle(`
.waybill-wrapper .routes-wrapper {
max-height: none !important;
`)
})();
牛啊,手搓大哥。
……不,我拒绝搓大哥!
// ==UserScript==
// @name 顺丰运单打印
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author HayDenGeng
// @match https://www.sf-express.com/we/ow/chn/sc/waybill/waybill-detail/SF*
// @icon https://www.google.com/s2/favicons?sz=64&domain=sf-express.com
// @grant none
// ==/UserScript==
(function() {
var Clean = function() {
var el = ["div.shipping-search","div.new-tencentCaptcha-tip","div.function-header","div.common-header","div.cookie-policy","div.bill-title","div.btn-box","div.common-footer","div.quick-enter","div.to-top","div.waybill-detail > div.empty-box"]
for(var i=0;i < el.length;i++){
try {
document.querySelector(el[i]).style.display="none"
document.querySelector("div.route-content.routes-wrapper").style.overflow = "visible"
document.querySelector("div.route-content.routes-wrapper").style.maxHeight = "none"
} catch (e) {
console.log("发生异常:" + e)
}
}
window.print();
for(var t=0;t < el.length;t++){
try {
document.querySelector(el[t]).style.display=""
} catch (e) {
console.log("发生异常:" + e)
}
}
}
var Intervalid = setInterval(
function wait_loading(){
var content = document.querySelector("div.content-wrapper")
if(content != null){
window.clearInterval(Intervalid)
var daying =document.createElement("div")
daying.innerHTML = '<div class="empty-box" style="width: 55px;margin-right: -70px;margin-left: 10px;"> <button type="button" id="daying" onclick="onclick_f()" class="empty-box-btn" data-v-4835de2e="">打印</button> </div>'
document.querySelector("div.map-model").appendChild(daying)
document.getElementById("daying").addEventListener("click",Clean);
}
},500);
})();
搓了个更复杂的
2 个赞