Skip to content

Commit

Permalink
Be less specific about allowed URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
jthoward64 committed Aug 15, 2023
1 parent 3db5dd6 commit 75a177e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
8 changes: 3 additions & 5 deletions ez-package-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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==
Expand Down Expand Up @@ -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");
Expand Down
10 changes: 3 additions & 7 deletions ez-package-tracker.ts
Original file line number Diff line number Diff line change
@@ -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==
Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit 75a177e

Please sign in to comment.