Skip to content

Instantly share code, notes, and snippets.

@sunnz
Last active January 5, 2026 03:04
Show Gist options
  • Select an option

  • Save sunnz/89846356fccf1e16a9ae6982d2f6e3cf to your computer and use it in GitHub Desktop.

Select an option

Save sunnz/89846356fccf1e16a9ae6982d2f6e3cf to your computer and use it in GitHub Desktop.
reloads auspost.com.au/mypost/track/details after about ~1 hour and auto-clicks the Journey tab; works as a Brave scriptlet or in userscript managers
// @description On auspost.com.au mypost track details page, reloads after ~1 hour (with random 5-min window) and clicks the Journey tab. Developed for Brave scriptlet.
// @author https://github.com/sunnz
// @match *://auspost.com.au/mypost/track/details*
/*
🚗 Auto Reload & "Journey" Tab Click for AusPost Track Details
- Runs on auspost.com.au/mypost/track/details*
- Reloads page in 57–63 minutes (adds randomness for "human" touch)
- Automatically clicks the "Journey" tab if present (OptionJourney element)
- Written for Brave scriptlets, eg auspost.com.au##+js(user-click-journey.js)
- Might work with ViolentMonkey
*/
const factor = 0.95 + Math.random() * 0.10 // 0.95..1.05
window.addEventListener('DOMContentLoaded', () => {
const intervalId = setInterval(() => {
console.debug('looking for journey')
const target = document.getElementById('OptionJourney')
if (target) {
target.click()
clearInterval(intervalId) // Stop checking once done
console.debug('found and clicked the journey')
}
}, 400);
if (window.location.pathname.includes('mypost/track/details')) {
setTimeout(() => {
location.reload()
}, 3600000 * factor) // 1 hour x 0.95..1.05
console.debug('will reload in one hour')
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment