chrome_extension/js/infocollector.js
// Extract repo slug and commit hash from file URL.
Extract repo slug and commit hash from file URL.
Extract repo slug and commit hash from file URL .
function extractInfo(url) {
    url = url.substr(1); 
    var repoSlug = url.split('/blob/')[0];
    var commitHash = url.split('/blob/')[1];
    commitHash = commitHash.substr(0, 40);
    return {
      "repoSlug": repoSlug,
      "commitHash": commitHash
    };
  }
function extractInfo ( url ) { url = url . substr ( 1 ) ; var repoSlug = url . split ( '/blob/' ) [ 0 ] ; var commitHash = url . split ( '/blob/' ) [ 1 ] ; commitHash = commitHash . substr ( 0 , 40 ) ; return { "repoSlug" : repoSlug , "commitHash" : commitHash } ; }
Extract repo slug and commit hash from file URL.
Extract repo slug and commit hash from file URL .
// remove leading /