Skip to content

Commit

Permalink
Merge pull request #48 from dbaron/avoid-location-tostring
Browse files Browse the repository at this point in the history
Use window.location rather than window.location.toString()
  • Loading branch information
ewilligers committed Jul 22, 2018
2 parents 29ae575 + 931749b commit e7d464d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ <h2>
&lt;body&gt;
&lt;script&gt;
window.addEventListener('load', () =&gt; {
var parsedUrl = new URL(window.location.toString());
var parsedUrl = new URL(window.location);
console.log('Title shared: ' + parsedUrl.searchParams.get('name'));
console.log('Text shared: ' + parsedUrl.searchParams.get('description'));
console.log('URL shared: ' + parsedUrl.searchParams.get('link'));
Expand Down

0 comments on commit e7d464d

Please sign in to comment.