Skip to content

Commit d44049b

Browse files
committed
Open new window/tab
1 parent dd22720 commit d44049b

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

javascripts/Google Maps to SunCalc.org.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ if (coordinates === undefined || coordinates === null) {
1313
window.alert('Current Google Maps URL does not contain coordinates.');
1414
} else {
1515
var now = new Date();
16-
location.href = 'https://www.suncalc.org/#/' + coordinates + '/' + now.getFullYear() + '.' + (now.getMonth() + 1) + '.' + now.getDate() + '/' + now.getHours() + ':' + now.getMinutes() + '/1/3';
16+
window.open('https://www.suncalc.org/#/' + coordinates + '/' + now.getFullYear() + '.' + (now.getMonth() + 1) + '.' + now.getDate() + '/' + now.getHours() + ':' + now.getMinutes() + '/1/3', '_blank').focus();
1717
}

javascripts/Google Translate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (window.getSelection) {
66
selection = document.selection.createRange().text;
77
}
88
if (selection === undefined || selection.length === 0) {
9-
location.href = 'https://translate.google.com/?op=websites&langpair=auto%7Cauto&u=' + encodeURIComponent(location.href);
9+
window.open('https://translate.google.com/?op=websites&langpair=auto%7Cauto&u=' + encodeURIComponent(location.href), '_blank').focus();
1010
} else {
11-
location.href = 'https://translate.google.com/?op=translate&langpair=auto%7Cauto&ie=' + encodeURIComponent(document.characterSet) + '&text=' + encodeURIComponent(selection);
11+
window.open('https://translate.google.com/?op=translate&langpair=auto%7Cauto&ie=' + encodeURIComponent(document.characterSet) + '&text=' + encodeURIComponent(selection), '_blank').focus();
1212
}

javascripts/SSL server test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"use strict";
2-
location.href = 'https://www.ssllabs.com/ssltest/analyze.html?d=' + encodeURIComponent(location.hostname);
2+
window.open('https://www.ssllabs.com/ssltest/analyze.html?d=' + encodeURIComponent(location.hostname), '_blank').focus();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"use strict";
2-
location.href = 'https://web.archive.org/web/%2A/' + location.href;
2+
window.open('https://web.archive.org/web/%2A/' + location.href, '_blank').focus();

javascripts/Search site.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"use strict";
2-
location.href = 'https://www.google.com/search?udm=14&q=site%3A' + encodeURIComponent(location.hostname);
2+
window.open('https://www.google.com/search?udm=14&q=site%3A' + encodeURIComponent(location.hostname), '_blank').focus();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"use strict";
2-
location.href = 'https://archive.today/submit/?url=' + encodeURIComponent(location.href);
2+
window.open('https://archive.today/submit/?url=' + encodeURIComponent(location.href), '_blank').focus();

javascripts/Whois.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"use strict";
2-
location.href = 'https://whois.domaintools.com/' + encodeURIComponent(location.hostname);
2+
window.open('https://whois.domaintools.com/' + encodeURIComponent(location.hostname), '_blank').focus();

0 commit comments

Comments
 (0)