18 lines
729 B
JavaScript
18 lines
729 B
JavaScript
// Switch GitLab Profile
|
|
(
|
|
function() {
|
|
GitLabDomain = 'InputYourDomain';
|
|
user = prompt('Input Git User to switch to:');
|
|
if (window.location.href.toLowerCase().includes(GitLabDomain) && user !== '') {
|
|
link = window.location.href.split('/');
|
|
link[3] = user;
|
|
window.location.href = link.join('/');
|
|
}else {
|
|
alert('Not on a GitLab-Site or no user given');
|
|
}
|
|
}()
|
|
);
|
|
|
|
// Minified
|
|
(function(){GitLabDomain='InputYourDomain';user=prompt('Input Git User to switch to:');if(window.location.href.toLowerCase().includes(GitLabDomain)&&user!==''){link=window.location.href.split('/');link[3]=user;window.location.href=link.join('/');}else{alert('Not on a GitLab-Site or no user given');}}());
|