Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions scripts/revcheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,14 +428,18 @@ function print_html_footer()
print_html_menu("");
print <<<HTML
<p/>
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
<script>
var clipboard = new ClipboardJS('.btn');
clipboard.on('success', function (e) {
console.log(e);
});
clipboard.on('error', function (e) {
console.log(e);
document.querySelectorAll('.btn').forEach(button => {
button.addEventListener('click', async () => {
const text = button.dataset.clipboardText;

try {
await navigator.clipboard.writeText(text);
console.log('Copied:', text);
} catch (err) {
console.error('Copy failed:', err);
}
});
});
</script>
</body>
Expand All @@ -448,4 +452,4 @@ function print_debug_list( RevcheckData $data )
foreach( $data->fileDetail as $key => $file )
print "f:$key m:{$file->maintainer} s:{$file->status->value}\n";
die();
}
}
Loading