diff --git a/GitLab/SwitchProfile.js b/GitLab/SwitchProfile.js index ab62fbe..63b6f85 100644 --- a/GitLab/SwitchProfile.js +++ b/GitLab/SwitchProfile.js @@ -1,12 +1,12 @@ // Switch GitLab Profile ( - GitLabDomain = 'InputYourDomain'; - function() { + 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('/'); + link = window.location.href.split('/'); + link[3] = user; + window.location.href = link.join('/'); }else { alert('Not on a GitLab-Site or no user given'); } @@ -14,4 +14,4 @@ ); // Minified -(GitLabDomain='InputYourDomain';function(){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');}}()); +(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');}}());