diff --git a/ez-package-tracker.js b/ez-package-tracker.js index 07cc2c4..b575739 100644 --- a/ez-package-tracker.js +++ b/ez-package-tracker.js @@ -11,10 +11,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge // ==UserScript== // @name StarRez EZ Package Tracking // @namespace http://tampermonkey.net/ -// @version 1.1.1 +// @version 1.1.2 // @description Adds an easy-to-use form to the Quick Information page of StarRez // @author Joshua Tag Howard -// @match https://starport.uky.edu/StarRezWeb/main/directory +// @match https://starport.uky.edu // @icon https://www.google.com/s2/favicons?sz=64&domain=uky.edu // @grant none // ==/UserScript== @@ -678,9 +678,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge const newUrl = window.location.href; if (newUrl !== oldUrl) { const entryId = getEntryId(); - if (newUrl.endsWith(":quick%20information") && - newUrl.startsWith("https://starport.uky.edu/StarRezWeb/main/directory#") && - newUrl.indexOf("entry") > -1 && + if (newUrl.match(/https:\/\/starport\.uky\.edu.*!entry:[0-9]+quick%20information/) && entryId != null) { if (document.getElementById(`entry${entryId}-detail-screen`) != null) { console.log("Resident entry page opened, adding EZ Package Tracking form"); diff --git a/ez-package-tracker.ts b/ez-package-tracker.ts index 03151de..7145b31 100644 --- a/ez-package-tracker.ts +++ b/ez-package-tracker.ts @@ -1,10 +1,10 @@ // ==UserScript== // @name StarRez EZ Package Tracking // @namespace http://tampermonkey.net/ -// @version 1.1.1 +// @version 1.1.2 // @description Adds an easy-to-use form to the Quick Information page of StarRez // @author Joshua Tag Howard -// @match https://starport.uky.edu/StarRezWeb/main/directory +// @match https://starport.uky.edu // @icon https://www.google.com/s2/favicons?sz=64&domain=uky.edu // @grant none // ==/UserScript== @@ -912,11 +912,7 @@ if (newUrl !== oldUrl) { const entryId = getEntryId(); if ( - newUrl.endsWith(":quick%20information") && - newUrl.startsWith( - "https://starport.uky.edu/StarRezWeb/main/directory#" - ) && - newUrl.indexOf("entry") > -1 && + newUrl.match(/https:\/\/starport\.uky\.edu.*!entry:[0-9]+quick%20information/) && entryId != null ) { if (