Skip to content

Commit e81d050

Browse files
Change title and message for search redirect
1 parent 8ec4444 commit e81d050

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

webapps/auto_searcher/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
<title>Search Redirect</title>
5+
<title>Search in New Tab</title>
66
</head>
77
<body>
8-
<p>Redirecting</p>
8+
<p>Opening search in a new tab</p>
99
<script>
10-
if (!sessionStorage.getItem('redirected')) {
11-
sessionStorage.setItem('redirected', '1');
10+
if (!sessionStorage.getItem('opened')) {
11+
sessionStorage.setItem('opened', '1');
1212

1313
const keywords = [
1414
'javascript', 'python', 'algorithm', 'database', 'cloud',
@@ -23,8 +23,8 @@
2323
const selected = shuffled.slice(0, count);
2424
const query = selected.join(' ');
2525

26-
window.location.href =
27-
'https://www.bing.com/search?q=' + encodeURIComponent(query);
26+
const url = 'https://www.bing.com/search?q=' + encodeURIComponent(query);
27+
window.open(url, '_blank');
2828
}
2929
</script>
3030
</body>

0 commit comments

Comments
 (0)