Hide GitLab "Migrate from Jenkins" Widget

Hides the GitLab "Migrate from Jenkins" widget on the pipelines page.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        Hide GitLab "Migrate from Jenkins" Widget
// @namespace   Violentmonkey Scripts
// @match       https://gitlab.*/*/merge_requests/*
// @grant       none
// @version     1.0.0
// @author      joshmcorreia
// @license     MIT
// @description Hides the GitLab "Migrate from Jenkins" widget on the pipelines page.
// ==/UserScript==

// GitHub repo can be found at https://github.com/joshmcorreia/userscript_hide_gitlab_migrate_from_jenkins

const pipeline_suggest_selector = ".mr-pipeline-suggest";

function remove_migrate_widget() {
    var pipeline_suggest_element = document.querySelector(pipeline_suggest_selector);
    pipeline_suggest_element.remove();
}

(new MutationObserver(check)).observe(document, {childList: true, subtree: true});

function check(changes, observer) {
    if(document.querySelector(pipeline_suggest_selector)) {
        observer.disconnect();
        remove_migrate_widget();
    }
}