Skip to content

Instantly share code, notes, and snippets.

@tuanphpvn
Last active August 3, 2016 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuanphpvn/57ce9fd3803f85ab40d643d1f1c807ef to your computer and use it in GitHub Desktop.
Save tuanphpvn/57ce9fd3803f85ab40d643d1f1c807ef to your computer and use it in GitHub Desktop.
function getBrandName() {
var location = window.location.href,
taskNumber = location.substr(location.lastIndexOf('/')+1)
taskName = document.getElementById("summary-val").innerText.toLowerCase().replace(/\s+\|\s+/g, '|').replace(/[^a-z0-9]/g, '-').replace(/:/g, '').replace(/\|/g, '').replace(/-+/g, '-')
;
console.log(taskNumber +'-'+ taskName);
}
getBrandName();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment