Skip to content

Instantly share code, notes, and snippets.

@PrintNow
Last active December 4, 2025 07:15
Show Gist options
  • Select an option

  • Save PrintNow/f0e48f9c6ed964e8f0c59258cf1f8a66 to your computer and use it in GitHub Desktop.

Select an option

Save PrintNow/f0e48f9c6ed964e8f0c59258cf1f8a66 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name TrackingMore Admin Plus
// @namespace https://example.com/
// @version 1.0
// @description Inject custom grid CSS for .sp-table-body on admin.trackingmore.com
// @match https://admin.trackingmore.com/shipments/numbers*
// @run-at document-idle
// @grant GM_addStyle
// ==/UserScript==
(function () {
'use strict';
const url = new URL(window.location.href)
if (url.pathname === '/shipments/numbers') {
const searchParams = url.searchParams;
if (!searchParams.has("limit") || searchParams.get('limit') !== '200') {
searchParams.set("limit", "200");
window.location.href = url.toString();
}
}
/* language=CSS */
let css = `
#PFrame {
background-color: #F1F1F1 !important;
}
.sp-table-body {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
padding-top: 10px;
box-sizing: border-box;
}
.sp-table-body > * {
min-width: 0;
max-width: none;
box-sizing: border-box;
}
.sp-table-body-row {
margin: 0 !important;
height: auto !important;
}
.sp-table-body-row .cell-shipments {
min-width: 260px !important;
padding: 6px !important;
flex: unset !important;
}
.sp-table-body-row:hover {
box-shadow: 0 4px 7px rgba(0, 0, 0, 0.1), 0 0 0 0.5px #e9e9e9;
}
.shipments-page {
padding: 12px !important;
}
.shipments-page > div:nth-child(3) {
margin: 6px 0 !important;
}
.sp-table-body .tm-w-full {
width: 260px !important;
}
.cell-shipments.item-first {
padding: 2px 4px !important;
}
.cell-shipments + div {
transform: translateX(-32px) !important;
z-index: 10000000000000;
}
.item-first {
padding: 2px 4px !important;
}
.sp-table-body .cell-action {
position: absolute !important;
left: -106px !important;
top: 58px !important;
}
/*调整单号的字体大小*/
.sp-table-main .sp-table-body-row .nums-text {
font-size: 12px !important;
padding-bottom: 0 !important;
line-height: 20px !important;
padding-top: 4px !important;
}
/*运输商字体大小调整*/
.sp-table-main .sp-table-body-row .express-text {
font-size: 12px !important;
padding-bottom: 0 !important;
padding-top: 6px !important;
line-height: 12px !important;
}
/*隐藏删除按钮*/
.sp-table-body .cell-action > div > span:nth-child(2) {
display: none !important;
}
ul[dropdown-menu="dropdown-menu"] {
padding: 0 !important;
}
/* 搜索菜单栏 */
#sp-filter {
padding: 8px !important;
}
.sp-table .cell-status {
padding-top: 5px !important;
}
/*物流信息*/
.sp-table-main .sp-table-body-row .latest_event-text {
font-size: 12px !important;
line-height: 1 !important;
}
.sp-table-main .sp-table-body-row .source {
width: 1.4rem !important;
height: 1.4rem !important;
}
/*Banner 相关*/
.sp-top-bar + .Polaris-Banner--statusSuccess {
font-size: 12px !important;
margin-top: 0 !important;
padding: 8px 8px 0;
}
.sp-top-bar + .Polaris-Banner--statusSuccess .Polaris-Heading {
font-size: 14px !important;
}
/* Tag */
.sp-tag > span.sp-tag-item {
font-size: 13px !important;
margin-top: 8px !important;
}
.tm-col {
padding: 0 2px !important;
}
div.sp-operation-v1-box {
bottom: 3px !important;
justify-content: flex-end !important;
z-index: 1000000000000000000 !important;
}
#sp-operation-v1 {
background: #458fff;
}
.Polaris-ButtonGroup > div:nth-child(3) {
display: none;
}
`;
GM_addStyle(css);
})();
@PrintNow
Copy link
Author

PrintNow commented Dec 4, 2025

使用方法

  1. 安装 Tampermonkey:https://chromewebstore.google.com/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en

  2. 打开扩展开发者模式 - 访问 chrome://extensions/
    image

  3. 配置插件 Tampermonkey - 允许用户脚本
    image

  4. 重启浏览器 - 输入 chrome://restart 按回车
    image

  5. 安装增强脚本
    PixPin_2025-12-04_14-23-46

  6. 点击安装/更新/Overwrite
    PixPin_2025-12-04_14-24-07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment