summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 96a56a4241..ed3198594a 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -2160,6 +2160,14 @@ $(document).ready(function () {
break;
}
}
+
+ var $cloneAddr = $('#clone_addr');
+ $cloneAddr.change(function() {
+ var $repoName = $('#repo_name');
+ if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) { // Only modify if repo_name input is blank
+ $repoName.val($cloneAddr.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3]);
+ }
+ });
});
function changeHash(hash) {