Skip to content

Instantly share code, notes, and snippets.

@wolfposd
Created June 22, 2023 11:00
Show Gist options
  • Save wolfposd/d30a7242e5dbf16f762e9a75c289fa8c to your computer and use it in GitHub Desktop.
Save wolfposd/d30a7242e5dbf16f762e9a75c289fa8c to your computer and use it in GitHub Desktop.
Always show full path on gitlab instead of breadcrump button, need to adjust your gitlab instance
// ==UserScript==
// @name GitLab Always Show Path Remove Breadcrumbs
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Click on the Show Path Breadcrumb button to always display the full path
// @author wolfposd
// @match https://gitlab.com/*
// @icon https://about.gitlab.com/ico/favicon.ico?cache=2022041
// @grant none
// @run-at document-end
// ==/UserScript==
var buttonIntervalID = 0;
(function() {
'use strict';
buttonIntervalID = setInterval(function() {
clickButton();
}, 200);
})();
function clickButton() {
var classes = document.getElementsByClassName("js-breadcrumbs-collapsed-expander");
if(classes.length == 1) {
classes[0].click();
}
else {
clearInterval(buttonIntervalID);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment