Disable find-owners if code-owners is enabled
Change-Id: Ibaa0f3df0f1e97332e090c84e89e51e74dfa82c3
diff --git a/src/main/resources/static/find-owners.js b/src/main/resources/static/find-owners.js
index 720a424..437a50b 100644
--- a/src/main/resources/static/find-owners.js
+++ b/src/main/resources/static/find-owners.js
@@ -13,6 +13,12 @@
// limitations under the License.
Gerrit.install(function(self) {
+ const ENABLED_EXPERIMENTS = window.ENABLED_EXPERIMENTS || [];
+ if (ENABLED_EXPERIMENTS.includes('UiFeature__plugin_code_owners')) {
+ // Disable if experiment UiFeature__plugin_code_owners is enabled
+ return;
+ }
+
// If context.popup API exists and popup content is small,
// use the API and set useContextPopup,
// otherwise, use pageDiv and set its visibility.