@@ -3,158 +3,149 @@ const adress = document.getElementById('uv-address');
33window . onload = function ( ) {
44 if ( window . location . hash === '#discord' ) {
55 if ( localStorage . getItem ( 'reloaded' ) !== 'true' )
6- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
7- window . location . replace ( '/tabs#discord' )
8- }
9- else {
6+ if (
7+ localStorage . getItem ( 'tabs' ) === 'true' &&
8+ window === window . top
9+ ) {
10+ window . location . replace ( '/tabs#discord' ) ;
11+ } else {
1012 adress . value = 'https://discord.com/login' ;
1113 form . dispatchEvent ( new Event ( 'submit' ) ) ;
1214 }
13- }
14- }
15- if ( window . location . hash === '#youtube' ) {
16- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
17- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
18- window . location . replace ( '/tabs#youtube' )
19- }
20- else {
21- adress . value = 'https://youtube.com' ;
22- form . dispatchEvent ( new Event ( 'submit' ) ) ;
23- }
24- }
2515 }
26- if ( window . location . hash === '#twitter' ) {
27- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
28- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
29- window . location . replace ( '/tabs#twitter' )
30- }
31- else {
32- adress . value = 'https://twitter.com/' ;
33- form . dispatchEvent ( new Event ( 'submit' ) ) ;
34- }
16+ } ;
17+ if ( window . location . hash === '#youtube' ) {
18+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
19+ if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
20+ window . location . replace ( '/tabs#youtube' ) ;
21+ } else {
22+ adress . value = 'https://youtube.com' ;
23+ form . dispatchEvent ( new Event ( 'submit' ) ) ;
3524 }
3625 }
37- if ( window . location . hash === '#google' ) {
38- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
39- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
40- window . location . replace ( '/tabs#google' )
41- }
42- else {
43- adress . value = 'https://google.com/' ;
44- form . dispatchEvent ( new Event ( 'submit' ) ) ;
45- }
26+ }
27+ if ( window . location . hash === '#twitter' ) {
28+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
29+ if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
30+ window . location . replace ( '/tabs#twitter' ) ;
31+ } else {
32+ adress . value = 'https://twitter.com/' ;
33+ form . dispatchEvent ( new Event ( 'submit' ) ) ;
4634 }
4735 }
48- if ( window . location . hash === '#twitch' ) {
49- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
50- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
51- window . location . replace ( '/tabs#twitch' )
52- }
53- else {
54- adress . value = 'https://twitch.tv/' ;
55- form . dispatchEvent ( new Event ( 'submit' ) ) ;
56- }
36+ }
37+ if ( window . location . hash === '#google' ) {
38+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
39+ if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
40+ window . location . replace ( '/tabs#google' ) ;
41+ } else {
42+ adress . value = 'https://google.com/' ;
43+ form . dispatchEvent ( new Event ( 'submit' ) ) ;
5744 }
5845 }
59- if ( window . location . hash === '#reddit' ) {
60- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
61- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
62- window . location . replace ( '/tabs#reddit' )
63- }
64- else {
65- adress . value = 'https://reddit.com/' ;
66- form . dispatchEvent ( new Event ( 'submit' ) ) ;
67- }
46+ }
47+ if ( window . location . hash === '#twitch' ) {
48+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
49+ if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
50+ window . location . replace ( '/tabs#twitch' ) ;
51+ } else {
52+ adress . value = 'https://twitch.tv/' ;
53+ form . dispatchEvent ( new Event ( 'submit' ) ) ;
6854 }
6955 }
70- if ( window . location . hash === '#spotify' ) {
71- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
72- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
73- window . location . replace ( '/tabs#spotify' )
74- }
75- else {
76- adress . value = 'https://open.spotify.com/' ;
77- form . dispatchEvent ( new Event ( 'submit' ) ) ;
78- }
56+ }
57+ if ( window . location . hash === '#reddit' ) {
58+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
59+ if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
60+ window . location . replace ( '/tabs#reddit' ) ;
61+ } else {
62+ adress . value = 'https://reddit.com/' ;
63+ form . dispatchEvent ( new Event ( 'submit' ) ) ;
7964 }
8065 }
81- if ( window . location . hash === '#geforce' ) {
82- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
83- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
84- window . location . replace ( '/tabs#geforce' )
85- }
86- else {
87- adress . value = 'https://www.nvidia.com/en-us/geforce-now/' ;
88- form . dispatchEvent ( new Event ( 'submit' ) ) ;
89- }
66+ }
67+ if ( window . location . hash === '#spotify' ) {
68+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
69+ if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
70+ window . location . replace ( '/tabs#spotify' ) ;
71+ } else {
72+ adress . value = 'https://open.spotify.com/' ;
73+ form . dispatchEvent ( new Event ( 'submit' ) ) ;
9074 }
9175 }
92- if ( window . location . hash === '#haikei' ) {
93- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
94- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
95- window . location . replace ( '/tabs#haikei' )
96- }
97- else {
98- adress . value = 'https://haikei.xyz' ;
99- form . dispatchEvent ( new Event ( 'submit' ) ) ;
100- }
76+ }
77+ if ( window . location . hash === '#geforce' ) {
78+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
79+ if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
80+ window . location . replace ( '/tabs#geforce' ) ;
81+ } else {
82+ adress . value = 'https://www.nvidia.com/en-us/geforce-now/' ;
83+ form . dispatchEvent ( new Event ( 'submit' ) ) ;
10184 }
10285 }
103- if ( window . location . hash === '#pinterest' ) {
104- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
105- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
106- window . location . replace ( '/tabs#pinterest' )
107- }
108- else {
109- adress . value = 'https://pinterest.com/' ;
110- form . dispatchEvent ( new Event ( 'submit' ) ) ;
111- }
86+ }
87+ if ( window . location . hash === '#haikei' ) {
88+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
89+ if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
90+ window . location . replace ( '/tabs#haikei' ) ;
91+ } else {
92+ adress . value = 'https://haikei.xyz' ;
93+ form . dispatchEvent ( new Event ( 'submit' ) ) ;
11294 }
11395 }
114- if ( window . location . hash === '#github' ) {
115- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
116- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
117- window . location . replace ( '/tabs#github' )
118- }
119- else {
120- adress . value = 'https://github.com/' ;
121- form . dispatchEvent ( new Event ( 'submit' ) ) ;
122- }
96+ }
97+ if ( window . location . hash === '#pinterest' ) {
98+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
99+ if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
100+ window . location . replace ( '/tabs#pinterest' ) ;
101+ } else {
102+ adress . value = 'https://pinterest.com/' ;
103+ form . dispatchEvent ( new Event ( 'submit' ) ) ;
123104 }
124105 }
125- if ( window . location . hash . includes ( '#custom' ) ) {
126- // Get the custom URL after the = sign
127- let customURL = window . location . hash . split ( '=' ) [ 1 ] ;
128- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
129- if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
130- window . location . replace ( '/tabs#custom=' + customURL )
131- }
132- else {
133- adress . value = customURL ;
134- form . dispatchEvent ( new Event ( 'submit' ) ) ;
135- }
106+ }
107+ if ( window . location . hash === '#github' ) {
108+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
109+ if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
110+ window . location . replace ( '/tabs#github' ) ;
111+ } else {
112+ adress . value = 'https://github.com/' ;
113+ form . dispatchEvent ( new Event ( 'submit' ) ) ;
136114 }
137115 }
138- if ( window . location . hash . includes ( '#g' ) ) {
139- // Get the custom URL after the = sign
140- let customURL = window . location . hash . split ( '=' ) [ 1 ] ;
141- if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
116+ }
117+ if ( window . location . hash . includes ( '#custom' ) ) {
118+ // Get the custom URL after the = sign
119+ let customURL = window . location . hash . split ( '=' ) [ 1 ] ;
120+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
121+ if ( localStorage . getItem ( 'tabs' ) === 'true' && window === window . top ) {
122+ window . location . replace ( '/tabs#custom=' + customURL ) ;
123+ } else {
142124 adress . value = customURL ;
143125 form . dispatchEvent ( new Event ( 'submit' ) ) ;
144126 }
145127 }
146- if ( window . location . hash . includes ( '#link' ) ) {
147- let link = window . location . hash . split ( '=' ) [ 1 ] ;
148- let iframe = document . getElementById ( 'uv-iframe' ) ;
149- iframe . classList . remove ( 'dnone' ) ;
150- iframe . style . display = 'absolute' ;
151- iframe . style . width = '100%' ;
152- iframe . style . height = '100%' ;
153- iframe . style . border = 'none' ;
154- iframe . style . left = '0' ;
155- iframe . style . top = '0' ;
156- iframe . style . right = '0' ;
157- iframe . style . zIndex = '9999' ;
158- adress . value = link ;
128+ }
129+ if ( window . location . hash . includes ( '#g' ) ) {
130+ // Get the custom URL after the = sign
131+ let customURL = window . location . hash . split ( '=' ) [ 1 ] ;
132+ if ( localStorage . getItem ( 'reloaded' ) !== 'true' ) {
133+ adress . value = customURL ;
159134 form . dispatchEvent ( new Event ( 'submit' ) ) ;
160- } ;
135+ }
136+ }
137+ if ( window . location . hash . includes ( '#link' ) ) {
138+ let link = window . location . hash . split ( '=' ) [ 1 ] ;
139+ let iframe = document . getElementById ( 'uv-iframe' ) ;
140+ iframe . classList . remove ( 'dnone' ) ;
141+ iframe . style . display = 'absolute' ;
142+ iframe . style . width = '100%' ;
143+ iframe . style . height = '100%' ;
144+ iframe . style . border = 'none' ;
145+ iframe . style . left = '0' ;
146+ iframe . style . top = '0' ;
147+ iframe . style . right = '0' ;
148+ iframe . style . zIndex = '9999' ;
149+ adress . value = link ;
150+ form . dispatchEvent ( new Event ( 'submit' ) ) ;
151+ }
0 commit comments