From 17d55029b7224038a2daaecf524ce5ec9f5c9ef6 Mon Sep 17 00:00:00 2001 From: Vedant K Date: Sun, 26 Sep 2021 10:38:53 +0530 Subject: Meta: Add an `asLongAs` option to `features.add()` (#4800) Co-authored-by: yakov116 <16872793+yakov116@users.noreply.github.com> Co-authored-by: Federico Brigante --- source/features/fork-source-link-same-view.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/features/fork-source-link-same-view.tsx') diff --git a/source/features/fork-source-link-same-view.tsx b/source/features/fork-source-link-same-view.tsx index 27697ecd..b74dc074 100644 --- a/source/features/fork-source-link-same-view.tsx +++ b/source/features/fork-source-link-same-view.tsx @@ -22,13 +22,15 @@ async function init(): Promise { } void features.add(__filebasename, { + asLongAs: [ + pageDetect.isForkedRepo, + ], include: [ pageDetect.isSingleFile, pageDetect.isRepoTree, pageDetect.isEditingFile, ], exclude: [ - () => !pageDetect.isForkedRepo(), pageDetect.isRepoRoot, ], deduplicate: false, -- cgit v1.2.3