Add copy-url button
Took 11 minutes
This commit is contained in:
12
vendor/js/faq.js
vendored
12
vendor/js/faq.js
vendored
@ -289,6 +289,18 @@ function welcomeMessage()
|
||||
|
||||
}
|
||||
|
||||
function copyShareUrl( btn )
|
||||
{
|
||||
|
||||
let share_url = document.getElementById( "share_url" );
|
||||
share_url.select();
|
||||
share_url.setSelectionRange(0, 99999) ;
|
||||
document.execCommand( "copy" );
|
||||
$(btn).html( 'Copied!' );
|
||||
setTimeout( function() { $(btn).html( 'Copy-URL' );}, 1500 );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user