diff --git a/html/options.html b/html/options.html index 81a7ab8..2de898c 100644 --- a/html/options.html +++ b/html/options.html @@ -62,17 +62,6 @@
This feature is automatically disabled if logged-out
-
diff --git a/js/content.js b/js/content.js index 035bd94..cdfe774 100644 --- a/js/content.js +++ b/js/content.js @@ -189,7 +189,7 @@ * Determines if the project do uses the Gitlab "pipeline" feature. */ isPipelineFeatureEnabled() { - return false;// document.querySelector('.nav-sidebar .shortcuts-pipelines') ? true : false; + return document.querySelector('.nav-sidebar .shortcuts-pipelines') ? true : false; } /** @@ -231,10 +231,6 @@ if (self.userAuthenticated && self.preferences.enable_button_to_toggle_wip_status) { self.attachClickEventToToggleWipStatusButtons(); } - - if (self.pipelineFeatureEnabled && self.preferences.enable_menu_to_hide_mrs_based_on_pipeline_status) { - self.addHideMrsByPipelineStatusMenu(); - } }); } @@ -579,27 +575,6 @@ return placeholders[placeholder]; }).trim(); } - - addHideMrsByPipelineStatusMenu() { - let menu = '
' + - '' + - '
'; - - this.parseHtmlAndAppend( - document.querySelector('.filtered-search-block'), - menu - ); - } } let cs = new ContentScript(); diff --git a/js/options.js b/js/options.js index 3c67a0e..0a7fd5e 100644 --- a/js/options.js +++ b/js/options.js @@ -37,8 +37,6 @@ this.jiraTicketLinkLabelTypeRadioButtons = Array.from(document.querySelectorAll('input[name="jira_ticket_link_label_type"]')); this.enableButtonToToggleWipStatusCheckbox = document.querySelector('input#enable_button_to_toggle_wip_status'); - - this.enableMenuToHideMrsBasedOnPipelineStatus = document.querySelector('input#enable_menu_to_hide_mrs_based_on_pipeline_status'); } /** @@ -69,9 +67,6 @@ self.enableButtonToToggleWipStatusCheckbox.checked = preferences.enable_button_to_toggle_wip_status; self.enableButtonToToggleWipStatusCheckbox.dispatchEvent(new CustomEvent('change')); - - self.enableMenuToHideMrsBasedOnPipelineStatus.checked = preferences.enable_menu_to_hide_mrs_based_on_pipeline_status; - self.enableMenuToHideMrsBasedOnPipelineStatus.dispatchEvent(new CustomEvent('change')); }); } @@ -122,10 +117,6 @@ this.enableButtonToToggleWipStatusCheckbox.addEventListener('change', function() { self.forceUserToEnableAtLeastOneFeatureIfNecessarily(); }); - - this.enableMenuToHideMrsBasedOnPipelineStatus.addEventListener('change', function() { - self.forceUserToEnableAtLeastOneFeatureIfNecessarily(); - }); } /** @@ -147,8 +138,7 @@ enable_jira_ticket_link: this.enableJiraTicketLinkCheckbox.checked, base_jira_url: this.baseJiraUrlInput.value, jira_ticket_link_label_type: jira_ticket_link_label_type, - enable_button_to_toggle_wip_status: this.enableButtonToToggleWipStatusCheckbox.checked, - enable_menu_to_hide_mrs_based_on_pipeline_status: this.enableMenuToHideMrsBasedOnPipelineStatus.checked + enable_button_to_toggle_wip_status: this.enableButtonToToggleWipStatusCheckbox.checked }, function() { self.setSuccessfulVisualFeedbackOnSubmitButton(); @@ -183,8 +173,7 @@ return !this.displaySourceAndTargetBranchesCheckbox.checked && !this.enableButtonToCopyMrInfoCheckbox.checked && !this.enableJiraTicketLinkCheckbox.checked - && !this.enableButtonToToggleWipStatusCheckbox.checked - && !this.enableMenuToHideMrsBasedOnPipelineStatus.checked; + && !this.enableButtonToToggleWipStatusCheckbox.checked; } /** diff --git a/js/preferences.js b/js/preferences.js index e7617ee..d3ce98e 100644 --- a/js/preferences.js +++ b/js/preferences.js @@ -13,8 +13,7 @@ enable_jira_ticket_link: false, base_jira_url: '', jira_ticket_link_label_type: 'ticket_id', - enable_button_to_toggle_wip_status: true, - enable_menu_to_hide_mrs_based_on_pipeline_status: true + enable_button_to_toggle_wip_status: true }; }