File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,22 @@ async function fetchReservedDomains() {
1717 if ( ! reservedDomains ) {
1818 const res1 = await fetch ( "https://raw.githubusercontent.com/is-a-dev/register/main/util/reserved.json" ) ;
1919 if ( ! res1 . ok ) throw new Error ( `Failed to fetch reserved domains: ${ res1 . statusText } ` ) ;
20+
2021 const res2 = await fetch ( "https://raw.githubusercontent.com/is-a-dev/register/main/util/internal.json" ) ;
2122 if ( ! res2 . ok ) throw new Error ( `Failed to fetch internal domains: ${ res2 . statusText } ` ) ;
23+
2224 reservedDomains = [ ...await res1 . json ( ) , ...await res2 . json ( ) ] ;
2325 searchDomain . disabled = false ;
24- searchDomain . placeholder = "e.g. john" ;
26+
27+ const params = new URLSearchParams ( window . location . search ) ;
28+ const subdomain = params . get ( "d" ) ;
29+
30+ if ( subdomain ) {
31+ searchDomain . placeholder = `e.g. ${ subdomain } ` ;
32+ } else {
33+ searchDomain . placeholder = "e.g. william" ;
34+ }
35+
2536 }
2637 } catch ( error ) {
2738 console . error ( error . message ) ;
You can’t perform that action at this time.
0 commit comments