Hide GitLab "Migrate from Jenkins" Widget

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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();
    }
}