Created
June 22, 2023 11:00
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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