Skip to content

Commit e7d464d

Browse files
authored
Merge pull request #48 from dbaron/avoid-location-tostring
Use window.location rather than window.location.toString()
2 parents 29ae575 + 931749b commit e7d464d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ <h2>
135135
&lt;body&gt;
136136
&lt;script&gt;
137137
window.addEventListener('load', () =&gt; {
138-
var parsedUrl = new URL(window.location.toString());
138+
var parsedUrl = new URL(window.location);
139139
console.log('Title shared: ' + parsedUrl.searchParams.get('name'));
140140
console.log('Text shared: ' + parsedUrl.searchParams.get('description'));
141141
console.log('URL shared: ' + parsedUrl.searchParams.get('link'));

0 commit comments

Comments
 (0)