Skip to content

Instantly share code, notes, and snippets.

@dreygur
Created March 20, 2019 19:34
Show Gist options
  • Select an option

  • Save dreygur/31abd0b20b0eda58d4c4edca7d426be4 to your computer and use it in GitHub Desktop.

Select an option

Save dreygur/31abd0b20b0eda58d4c4edca7d426be4 to your computer and use it in GitHub Desktop.
function getUrl() {
var regex = /https:\/\/.{0,3}\.+([\w.,@?^=%&:/~+#-]*)?/g;
var html = document.body;
var url = regex.exec(html.toString);
return url;
}
function getUrl();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment