Update nightly.link buttons to version 1.2.2
- Guard getGithubJobsPath against an empty logsHeader
This commit is contained in:
parent
a0ffce4d6a
commit
a75a6f1d7c
|
@ -3,7 +3,7 @@
|
||||||
// @namespace blankie-scripts
|
// @namespace blankie-scripts
|
||||||
// @match http*://github.com/*
|
// @match http*://github.com/*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @version 1.2.1
|
// @version 1.2.2
|
||||||
// @author blankie
|
// @author blankie
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
// @description Show buttons to nightly.link on artifacts and build logs
|
// @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/EbookFoundation/free-programming-books/actions/runs/3213752190/jobs/5253657996
|
||||||
// https://github.com/kotatogram/kotatogram-desktop/actions/runs/3231502508/jobs/5291098845
|
// https://github.com/kotatogram/kotatogram-desktop/actions/runs/3231502508/jobs/5291098845
|
||||||
function getGithubJobsPath(logsHeader) {
|
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");
|
let timestampElement = logsHeader.querySelector(".CheckRun-header-timestamp");
|
||||||
if (timestampElement === null) {
|
if (timestampElement === null) {
|
||||||
return location.pathname;
|
return location.pathname;
|
||||||
|
|
Loading…
Reference in New Issue