New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github-url-detection

Package Overview
Dependencies
Maintainers
0
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-url-detection - npm Package Compare versions

Comparing version 9.0.2 to 9.0.3

29

distribution/index.js

@@ -51,20 +51,29 @@ // index.ts

var isQuickPR = (url = location) => isCompare(url) && /[?&]quick_pull=1(&|$)/.test(url.search);
var prStateSelector = [
var stateSelector = [
".State",
'[class^="StateLabel"]'
'[data-testid="header-state"]'
].join(",");
var isDraftPR = () => $(prStateSelector).textContent.trim() === "Draft";
var isDraftPR = () => $(stateSelector)?.textContent.trim() === "Draft";
var isOpenPR = () => {
const status = $(prStateSelector).textContent.trim();
if (!isPR()) {
return false;
}
const status = $(stateSelector).textContent.trim();
return status === "Open" || status === "Draft";
};
var isMergedPR = () => {
const status = $(prStateSelector).textContent.trim();
return status === "Merged";
};
var isMergedPR = () => $(stateSelector)?.textContent.trim() === "Merged";
var isClosedPR = () => {
const status = $(prStateSelector).textContent.trim();
if (!isPR()) {
return false;
}
const status = $(stateSelector).textContent.trim();
return status === "Closed" || status === "Merged";
};
var isClosedIssue = () => exists("#partial-discussion-header :is(.octicon-issue-closed, .octicon-skip)");
var isClosedIssue = () => {
if (!isIssue()) {
return false;
}
const status = $(stateSelector).textContent.trim();
return status === "Closed" || status === "Closed as not planned";
};
var isReleases = (url = location) => getRepo(url)?.path === "releases";

@@ -71,0 +80,0 @@ var isTags = (url = location) => getRepo(url)?.path === "tags";

{
"name": "github-url-detection",
"version": "9.0.2",
"version": "9.0.3",
"description": "Which GitHub page are you on? Is it an issue? Is it a list? Perfect for your WebExtension or userscript.",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc