-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathredirect.html
More file actions
183 lines (157 loc) · 4.33 KB
/
redirect.html
File metadata and controls
183 lines (157 loc) · 4.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Opening in External Browser - IO Switch</title>
<style>
* {
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
max-width: 600px;
margin: 80px auto;
padding: 20px;
text-align: center;
background: #f5f5f5;
}
.container {
background: white;
padding: 40px;
border-radius: 12px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
color: #333;
margin-bottom: 10px;
}
.icon {
font-size: 64px;
margin-bottom: 20px;
}
.url-box {
background: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 8px;
padding: 15px;
margin: 20px 0;
word-break: break-all;
font-family: 'Consolas', 'Monaco', monospace;
font-size: 14px;
color: #495057;
}
.btn {
display: inline-block;
padding: 12px 24px;
margin: 10px 5px;
border: none;
border-radius: 6px;
font-size: 16px;
cursor: pointer;
text-decoration: none;
transition: all 0.2s;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-primary:hover {
background: #0056b3;
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #545b62;
}
.btn-success {
background: #28a745;
color: white;
}
.btn-success:hover {
background: #1e7e34;
}
.info {
margin-top: 30px;
padding: 15px;
background: #fff3cd;
border: 1px solid #ffc107;
border-radius: 8px;
color: #856404;
font-size: 14px;
}
.instructions {
margin-top: 30px;
text-align: left;
background: #e7f3fe;
border: 1px solid #b6d4fe;
border-radius: 8px;
padding: 20px;
}
.instructions h3 {
margin-top: 0;
color: #0c5460;
}
.instructions ol {
color: #0c5460;
padding-left: 20px;
}
.instructions li {
margin-bottom: 8px;
}
.copied {
color: #28a745;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<div class="icon">🔀</div>
<h1>Opening in External Browser</h1>
<p>This website is configured to open in your default browser.</p>
<div class="url-box" id="urlDisplay">Loading...</div>
<div>
<button class="btn btn-primary" id="copyBtn">📋 Copy URL</button>
<button class="btn btn-secondary" id="closeBtn">Close Tab</button>
</div>
<div class="info">
<strong>Native messaging not configured.</strong><br>
Please copy the URL above and paste it in your preferred browser.
</div>
<div class="instructions">
<h3>🔧 Want automatic redirects?</h3>
<p>To automatically open links in another browser, you need to set up the native messaging host:</p>
<ol>
<li>Go to the extension folder</li>
<li>Run the <code>install_host.bat</code> script as Administrator</li>
<li>Restart Firefox</li>
</ol>
<p>After setup, links will automatically open in your default browser!</p>
</div>
</div>
<script>
// Get the URL from query parameter
const urlParams = new URLSearchParams(window.location.search);
const targetUrl = urlParams.get('url') || 'No URL provided';
// Display the URL
document.getElementById('urlDisplay').textContent = targetUrl;
// Copy button
document.getElementById('copyBtn').addEventListener('click', function() {
navigator.clipboard.writeText(targetUrl).then(() => {
this.innerHTML = '✅ Copied!';
this.classList.add('btn-success');
setTimeout(() => {
this.innerHTML = '📋 Copy URL';
this.classList.remove('btn-success');
}, 2000);
});
});
// Close button
document.getElementById('closeBtn').addEventListener('click', function() {
window.close();
});
</script>
</body>
</html>