Skip to content

Commit

Permalink
make sure the pr number does not include #... (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: Aolin <aolinz@outlook.com>
  • Loading branch information
ran-huang and Oreoxmt authored May 25, 2023
1 parent e303659 commit d9db0c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gh-util.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name Octopus GitHub
// @version 0.4
// @version 0.5
// @description A userscript for GitHub
// @author Oreo
// @homepage https://github.com/Oreoxmt/octopus-github
Expand Down Expand Up @@ -127,7 +127,7 @@
}
// First, find the "table-list-header-toggle" div
var headerActions = document.querySelector(".gh-header-actions");

if (!headerActions) {
return;
}
Expand All @@ -147,7 +147,7 @@
EnsureToken();

// get the pr number
const url = window.location.href;
const url = window.location.pathname;
const urlSplit = url.split("/");
const index = urlSplit.indexOf("pull");
const pr = urlSplit[index + 1];
Expand Down

0 comments on commit d9db0c1

Please sign in to comment.