From 82b7b835bab624345b6c588f20b8b4e6702efce8 Mon Sep 17 00:00:00 2001 From: WhatTheMike Date: Fri, 12 Feb 2021 14:40:28 -0500 Subject: [PATCH] Added USPS tracking page fix --- README.md | 5 +++++ javascript/USPS-CollapseTracking.js | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 javascript/USPS-CollapseTracking.js diff --git a/README.md b/README.md index 67aee07..cacccdd 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,11 @@ This isn't so much a script as some small quality of life improvements I've made This script will replace the Windows Key + E shortcut for explorer and the Windows Key + S shortcut for search with Explorer++ and Everything (this does require you to have these programs already installed on your system). Also added is the Windows key + T to launch Windows Terminal (taken from launching terminal this way on XUbuntu). Edit the script to point to the executables for each program and create a shortcut to your shell:startup folder to run on launch. +### Javascript + +**USPS-CollapseTracking.js** +This is a tampermonkey script that collapses the 'see more' portion of the USPS tracking page and scrolls to the top. + ### AppTweaks These items aren't really scripts but they are useful little changes I've made to various programs I use that I wanted to consolidate in to one place. Hopefully the comments explain what they all do well enough. diff --git a/javascript/USPS-CollapseTracking.js b/javascript/USPS-CollapseTracking.js new file mode 100644 index 0000000..1dc8c39 --- /dev/null +++ b/javascript/USPS-CollapseTracking.js @@ -0,0 +1,17 @@ +// ==UserScript== +// @name Collapse USPS Tracking +// @namespace https://usps.com +// @version 1.0 +// @description Collapses the tracking options on the USPS tracking page +// @author WTMike24 +// @match https://tools.usps.com/go/TrackConfirmAction?tRef=fullpage* +// @grant none +// ==/UserScript== + +(function() { + 'use strict'; + + // Your code here... + $(".see-all.show-less.tracking-result-collapser")[0].click(); + $('html, body').animate({scrollTop: 0}, 'slow'); +})();