Last active
August 3, 2016 14:36
-
-
Save tuanphpvn/57ce9fd3803f85ab40d643d1f1c807ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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