2022-03-31 09:01:07 +00:00
|
|
|
$(function () {
|
|
|
|
// Remove unviewed status when normally clicked
|
|
|
|
$('.diff-link').click(function () {
|
|
|
|
$(this).closest('.unviewed').removeClass('unviewed');
|
|
|
|
});
|
2022-04-26 08:52:08 +00:00
|
|
|
|
|
|
|
$('.with-share-link > *').click(function () {
|
|
|
|
$("#copied-clipboard").remove();
|
|
|
|
|
|
|
|
var range = document.createRange();
|
|
|
|
var n=$("#share-link")[0];
|
|
|
|
range.selectNode(n);
|
|
|
|
window.getSelection().removeAllRanges();
|
|
|
|
window.getSelection().addRange(range);
|
|
|
|
document.execCommand("copy");
|
|
|
|
window.getSelection().removeAllRanges();
|
|
|
|
|
|
|
|
$('.with-share-link').append('<span style="font-size: 80%; color: #fff;" id="copied-clipboard">Copied to clipboard</span>');
|
|
|
|
$("#copied-clipboard").fadeOut(2500, function() {
|
|
|
|
$(this).remove();
|
|
|
|
});
|
|
|
|
});
|
2022-03-31 09:01:07 +00:00
|
|
|
});
|
2022-04-26 08:52:08 +00:00
|
|
|
|