diff options
author | 2022-02-13 17:59:07 +0800 | |
---|---|---|
committer | 2022-02-13 17:59:07 +0800 | |
commit | 1f0b337176f6d929cefb8d1426f2372093a8812d (patch) | |
tree | ca05eab03f1e392790e7846855f898fbee30e1d0 | |
parent | 31027f0c451ca4131a81b9fdce7dff09a3d45461 (diff) | |
download | refined-github-1f0b337176f6d929cefb8d1426f2372093a8812d.tar.gz refined-github-1f0b337176f6d929cefb8d1426f2372093a8812d.tar.zst refined-github-1f0b337176f6d929cefb8d1426f2372093a8812d.zip |
Lint (#5304)
Co-authored-by: yakov116 <16872793+yakov116@users.noreply.github.com>
Co-authored-by: Federico Brigante <me@fregante.com>
-rw-r--r-- | readme.md | 2 | ||||
-rw-r--r-- | source/features/bugs-tab.tsx | 2 | ||||
-rw-r--r-- | source/features/download-folder-button.tsx | 2 | ||||
-rw-r--r-- | source/features/fork-source-link-same-view.tsx | 4 | ||||
-rw-r--r-- | source/features/github-bugs.css | 5 | ||||
-rw-r--r-- | source/features/html-preview-link.tsx | 1 | ||||
-rw-r--r-- | source/features/show-open-prs-of-forks.tsx | 3 | ||||
-rw-r--r-- | source/features/user-profile-follower-badge.css | 8 | ||||
-rw-r--r-- | source/features/user-profile-follower-badge.tsx | 1 | ||||
-rw-r--r-- | source/features/warning-for-disallow-edits.tsx | 1 | ||||
-rw-r--r-- | source/options.css | 5 |
11 files changed, 10 insertions, 24 deletions
@@ -188,7 +188,7 @@ Thanks for contributing! 🦋🙌 - [](# "toggle-files-button") [Adds a button to toggle the repo file list.](https://user-images.githubusercontent.com/1402241/35480123-68b9af1a-043a-11e8-8934-3ead3cff8328.gif) - [](# "quick-file-edit") [Adds a button to edit files from the repo file list.](https://user-images.githubusercontent.com/1402241/56370462-d51cde00-622d-11e9-8cd3-8a173bd3dc08.png) - [](# "edit-readme") [Ensures that the “Edit readme” button always appears (even when you have to make a fork) and works (GitHub’s link doesn’t work on git tags).](https://user-images.githubusercontent.com/1402241/62073307-a8378880-b26a-11e9-9e31-be6525d989d2.png) -- [](# "repo-wide-file-finder") Enables the File Finder keyboard shortcut (<kbd>t</kbd>) on Issues and Pull Request pages as well. +- [](# "repo-wide-file-finder") Enables the File Finder keyboard shortcut (<kbd>t</kbd>) on entire repository. - [](# "file-finder-buffer") [Lets you start typing your search immediately after invoking the File Finder (<kbd>t</kbd>), instead of having you wait for it to load first.](https://user-images.githubusercontent.com/1402241/75542106-1c811700-5a5a-11ea-8aa5-bea0472c59e2.gif) - [](# "show-associated-branch-prs-on-fork") [Shows the associated pull requests on branches for forked repositories.](https://user-images.githubusercontent.com/16872793/81504659-7e5ec800-92b8-11ea-9ee6-924110e8cca1.png) - [](# "html-preview-link") [Adds a link to preview HTML files.](https://user-images.githubusercontent.com/44045911/67634792-48995980-f8fb-11e9-8b6a-7b57d5b12a2f.png) diff --git a/source/features/bugs-tab.tsx b/source/features/bugs-tab.tsx index 00d21673..94aa0f99 100644 --- a/source/features/bugs-tab.tsx +++ b/source/features/bugs-tab.tsx @@ -89,7 +89,7 @@ async function addBugsTab(): Promise<void | false> { const issuesTab = await elementReady('a.UnderlineNav-item[data-hotkey="g i"]', {waitForChildren: false}); if (!issuesTab) { - // Repo is archived + // Issues are disabled return false; } diff --git a/source/features/download-folder-button.tsx b/source/features/download-folder-button.tsx index 437bb7dc..86f341e7 100644 --- a/source/features/download-folder-button.tsx +++ b/source/features/download-folder-button.tsx @@ -30,7 +30,7 @@ function init(): void { select('a.dropdown-item[data-hotkey="t"]')!.after(getDropdownItem(downloadUrl)); select('a.btn[data-hotkey="t"]')!.after( <a - className="btn d-none d-md-block tooltipped tooltipped-nw rgh-download-folder" + className="btn d-none d-md-block tooltipped tooltipped-ne rgh-download-folder" aria-label="Download directory" href={downloadUrl.href} > diff --git a/source/features/fork-source-link-same-view.tsx b/source/features/fork-source-link-same-view.tsx index bf0b1605..4a858da5 100644 --- a/source/features/fork-source-link-same-view.tsx +++ b/source/features/fork-source-link-same-view.tsx @@ -20,9 +20,7 @@ async function init(): Promise<void> { if (isFilePath()) { sameViewUrl.branch = await getDefaultBranch(forkedRepository); - } - - if (pageDetect.isIssue() || pageDetect.isPR()) { + } else if (pageDetect.isIssue() || pageDetect.isPR()) { sameViewUrl.assign({ route: '', branch: '', diff --git a/source/features/github-bugs.css b/source/features/github-bugs.css index 694a93c4..602c0363 100644 --- a/source/features/github-bugs.css +++ b/source/features/github-bugs.css @@ -45,6 +45,7 @@ #merge_title_field, #commit-summary-input, /* Restore monospace font in commit/merge title fields #5188 */ :is(.new_public_key, .new_gpg_key) textarea { /* Monospace textareas for new SSH/GPG keys #4917 */ + /* Same as GitHub style for `code` */ font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace !important; } @@ -63,7 +64,7 @@ flex-wrap: wrap; } -/* Restore margin between reactions on releases #5287 */ -[data-test-selector='release-card'] .social-reaction-summary-item:not(:first-child) { +/* Restore margin between reactions on PRs and releases #5287 */ +:is(#discussion_bucket.pull-request-tab-content, [data-test-selector='release-card']) .social-reaction-summary-item:not(:first-child) { margin-left: 8px !important; } diff --git a/source/features/html-preview-link.tsx b/source/features/html-preview-link.tsx index 901b2140..33ec626a 100644 --- a/source/features/html-preview-link.tsx +++ b/source/features/html-preview-link.tsx @@ -13,6 +13,7 @@ function init(): void { .prepend( <a className="btn btn-sm BtnGroup-item rgh-html-preview-link" + // #3305 href={`https://refined-github-html-preview.kidonng.workers.dev${rawButton.pathname}`} > Preview diff --git a/source/features/show-open-prs-of-forks.tsx b/source/features/show-open-prs-of-forks.tsx index b7da0e6d..09969f25 100644 --- a/source/features/show-open-prs-of-forks.tsx +++ b/source/features/show-open-prs-of-forks.tsx @@ -94,9 +94,6 @@ void features.add(import.meta.url, { asLongAs: [ pageDetect.isForkedRepo, ], - include: [ - pageDetect.isRepo, - ], awaitDomReady: false, init: initHeadHint, }, { diff --git a/source/features/user-profile-follower-badge.css b/source/features/user-profile-follower-badge.css deleted file mode 100644 index 0b7a0c82..00000000 --- a/source/features/user-profile-follower-badge.css +++ /dev/null @@ -1,8 +0,0 @@ -.rgh-follower-badge { - font-size: 10px; - display: block; - animation: fade-in 0.2s; - clear: both; - height: 0; /* Avoid content jump/relayout */ - transform: translateY(-1.8em); /* Reposition text in the available area */ -} diff --git a/source/features/user-profile-follower-badge.tsx b/source/features/user-profile-follower-badge.tsx index 3f86abba..37b88d8f 100644 --- a/source/features/user-profile-follower-badge.tsx +++ b/source/features/user-profile-follower-badge.tsx @@ -1,4 +1,3 @@ -import './user-profile-follower-badge.css'; import React from 'dom-chef'; import cache from 'webext-storage-cache'; import select from 'select-dom'; diff --git a/source/features/warning-for-disallow-edits.tsx b/source/features/warning-for-disallow-edits.tsx index 93cb8e9b..ae29fa2e 100644 --- a/source/features/warning-for-disallow-edits.tsx +++ b/source/features/warning-for-disallow-edits.tsx @@ -42,6 +42,7 @@ void features.add(import.meta.url, { pageDetect.isCompare, pageDetect.isPRConversation, ], + // No need to exclude `isClosedPR` as the checkbox won't be present deduplicate: 'has-rgh-inner', init, }); diff --git a/source/options.css b/source/options.css index 53b3c239..dd0611f1 100644 --- a/source/options.css +++ b/source/options.css @@ -53,6 +53,7 @@ li[data-validation] { :root [name='customCSS'], :root [name='personalToken'] { + /* Same as GitHub style for `code` */ font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace !important; font-size: 11px; line-height: 1.5; @@ -137,10 +138,6 @@ li[data-validation] { opacity: 50%; } -.sr-only { - display: none; -} - #debugging { --background: repeating-linear-gradient( |