|
@ -437,12 +437,14 @@ function initRepository() { |
|
|
$('#repo-clone-url').val($(this).data('link')); |
|
|
$('#repo-clone-url').val($(this).data('link')); |
|
|
$(this).addClass('blue'); |
|
|
$(this).addClass('blue'); |
|
|
$('#repo-clone-https').removeClass('blue'); |
|
|
$('#repo-clone-https').removeClass('blue'); |
|
|
|
|
|
localStorage.setItem('repo-clone-protocol', 'ssh'); |
|
|
}); |
|
|
}); |
|
|
$('#repo-clone-https').click(function () { |
|
|
$('#repo-clone-https').click(function () { |
|
|
$('.clone-url').text($(this).data('link')); |
|
|
$('.clone-url').text($(this).data('link')); |
|
|
$('#repo-clone-url').val($(this).data('link')); |
|
|
$('#repo-clone-url').val($(this).data('link')); |
|
|
$(this).addClass('blue'); |
|
|
$(this).addClass('blue'); |
|
|
$('#repo-clone-ssh').removeClass('blue'); |
|
|
$('#repo-clone-ssh').removeClass('blue'); |
|
|
|
|
|
localStorage.setItem('repo-clone-protocol', 'https'); |
|
|
}); |
|
|
}); |
|
|
$('#repo-clone-url').click(function () { |
|
|
$('#repo-clone-url').click(function () { |
|
|
$(this).select(); |
|
|
$(this).select(); |
|
@ -1038,4 +1040,18 @@ $(window).load(function () { |
|
|
} |
|
|
} |
|
|
}).trigger('hashchange'); |
|
|
}).trigger('hashchange'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Repo clone url.
|
|
|
|
|
|
if ($('#repo-clone-url').length > 0) { |
|
|
|
|
|
switch (localStorage.getItem('repo-clone-protocol')) { |
|
|
|
|
|
case 'ssh': |
|
|
|
|
|
if ($('#repo-clone-ssh').click().length === 0) { |
|
|
|
|
|
$('#repo-clone-https').click(); |
|
|
|
|
|
}; |
|
|
|
|
|
break; |
|
|
|
|
|
default: |
|
|
|
|
|
$('#repo-clone-https').click(); |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |