Last active
March 17, 2022 22:00
-
-
Save allysonsouza/afa589cb4dc6c9a6cb9e20db4b81cd28 to your computer and use it in GitHub Desktop.
UserScript: GitLab - Add Board Link
This file contains 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 - Add Board Link | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://gitlab.com/*/projetos | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=gitlab.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
setTimeout(() => { | |
document.querySelectorAll('a[data-testid="group-name"').forEach(function (project) { | |
let boardLink = project.cloneNode(true); | |
boardLink.setAttribute('href', boardLink.getAttribute('href') + '/-/boards'); | |
boardLink.classList.add('badge', 'badge-pill'); | |
boardLink.innerHTML = 'Board'; | |
project.after(boardLink); | |
}); | |
}, 1500); | |
// Your code here... | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment