Initial commit
This commit is contained in:
19
js/1984-hosting-support.js
Normal file
19
js/1984-hosting-support.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* wp-admin JavaScript features.
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html GNU General Public License v2.0
|
||||
*/
|
||||
|
||||
function HostingSupport1984CopyEmailAddress( e ) {
|
||||
e.preventDefault();
|
||||
var emailAddressTag = document.querySelector( '#hosting-support-1984-address' );
|
||||
emailAddressTag.select();
|
||||
document.execCommand( 'copy' );
|
||||
}
|
||||
|
||||
if (document.querySelector( '#hosting-support-1984-link' )) {
|
||||
document.querySelector( '#hosting-support-1984-link' ).addEventListener(
|
||||
'click',
|
||||
HostingSupport1984CopyEmailAddress
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user