summaryrefslogtreecommitdiff
path: root/source/libs/utils.ts
diff options
context:
space:
mode:
authorGravatar Federico Brigante <github@bfred.it> 2020-02-19 05:01:33 +0800
committerGravatar GitHub <noreply@github.com> 2020-02-19 05:01:33 +0800
commit30788b1a85b6681ff38cf639d01432c6a59a2b3b (patch)
tree2c574ce7383f99f8124f6751171344b19c2183ba /source/libs/utils.ts
parent8099d791d3f21243e45a8c62b3effdc47cf02973 (diff)
downloadrefined-github-30788b1a85b6681ff38cf639d01432c6a59a2b3b.tar.gz
refined-github-30788b1a85b6681ff38cf639d01432c6a59a2b3b.tar.zst
refined-github-30788b1a85b6681ff38cf639d01432c6a59a2b3b.zip
Update linters (#2802)
Diffstat (limited to 'source/libs/utils.ts')
-rw-r--r--source/libs/utils.ts12
1 files changed, 2 insertions, 10 deletions
diff --git a/source/libs/utils.ts b/source/libs/utils.ts
index 5a0cc695..1cf5a1eb 100644
--- a/source/libs/utils.ts
+++ b/source/libs/utils.ts
@@ -8,10 +8,10 @@ export function logError(featureName: typeof __featureName__, error: Error | str
// Don't change this to `throw Error` because Firefox doesn't show extensions' errors in the console.
// Use `return` after calling this function.
console.error(`❌ Refined GitHub: feature \`${featureName}\`\n\n`, error, ...extras, stripIndent(`
-
+
Search for open issues:
https://github.com/sindresorhus/refined-github/issues?q=is%3Aissue+${encodeURIComponent(message)}
-
+
or open a new one:
https://github.com/sindresorhus/refined-github/issues/new?labels=bug&template=bug_report.md&title=${encodeURIComponent(`\`${featureName}\`: ${message}`)}
`));
@@ -122,14 +122,6 @@ export const flatZip = <T>(table: T[][], limit = Infinity): T[] => {
return zipped;
};
-export function getOP(): string {
- if (isPR()) {
- return /^(?:.+) by (\S+) · Pull Request #(?:\d+)/.exec(document.title)?.[1]!;
- }
-
- return select('.timeline-comment-header-text .author')!.textContent!;
-}
-
export function compareNames(username: string, realname: string): boolean {
return username.replace(/-/g, '').toLowerCase() === realname.normalize('NFD').replace(/[\u0300-\u036F\W.]/g, '').toLowerCase();
}