From a75a6f1d7cc629d23c82d5f5bf8cfcc7a1a0f56f Mon Sep 17 00:00:00 2001 From: blankie Date: Wed, 12 Oct 2022 16:20:22 +0700 Subject: [PATCH] Update nightly.link buttons to version 1.2.2 - Guard getGithubJobsPath against an empty logsHeader --- nightly.link buttons.user.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nightly.link buttons.user.js b/nightly.link buttons.user.js index 858e3de..f570e64 100644 --- a/nightly.link buttons.user.js +++ b/nightly.link buttons.user.js @@ -3,7 +3,7 @@ // @namespace blankie-scripts // @match http*://github.com/* // @grant none -// @version 1.2.1 +// @version 1.2.2 // @author blankie // @run-at document-end // @description Show buttons to nightly.link on artifacts and build logs @@ -60,6 +60,10 @@ function addArtifactsButtonAndLinks(artifactsDiv) { // https://github.com/EbookFoundation/free-programming-books/actions/runs/3213752190/jobs/5253657996 // https://github.com/kotatogram/kotatogram-desktop/actions/runs/3231502508/jobs/5291098845 function getGithubJobsPath(logsHeader) { + if (logsHeader === null) { + // https://github.com/the-blank-x/furry-guide/actions/runs/2613813876 + return location.pathname; + } let timestampElement = logsHeader.querySelector(".CheckRun-header-timestamp"); if (timestampElement === null) { return location.pathname;