Skip to content

Commit

Permalink
Fix oops
Browse files Browse the repository at this point in the history
  • Loading branch information
Lartsch authored Nov 16, 2022
1 parent 1bfc6bf commit 1ad9e78
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ function processButton() {
$(found).text("Redirecting...");
// timeout 1000ms to make it possible to notice the redirection indication
setTimeout(function() {
// build the new url from home instance, user handle and current domain name
var request;
// if more than 1 @, we have a domain
if ((handle.match(/@/g) || []).length > 1) {
// but if its our own...
Expand All @@ -67,10 +65,10 @@ function processButton() {
handle = "@"+ handle.split("@")[1];
}
// request string
request = 'https://'+instance+'/'+handle, '_blank';
var request = 'https://'+instance+'/'+handle;
} else {
// with only 1 @, we have a local handle and need to append to domain
request = 'https://'+instance+'/'+handle+'@'+document.domain, '_blank';
var request = 'https://'+instance+'/'+handle+'@'+document.domain;
}
// open the window
var win = window.open(request, '_blank');
Expand Down

0 comments on commit 1ad9e78

Please sign in to comment.