tuan
6/30/2016 - 12:04 PM

Create brand name for atlassian.js

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();