document.addEventListener('DOMContentLoaded', function () { const button = document.querySelector('.maxbutton-copy-bca-s-details-and-wording'); const status = document.getElementById('copyStatus'); if (!button) return; button.addEventListener('click', async function (e) { e.preventDefault(); const text = `Legal name: Blind Citizens Australia ABN: 90 006 985 226 Address: Ross House, 247–251 Flinders Lane, Melbourne VIC 3000 Suggested bequest wording Please ask your solicitor to confirm that the wording is suitable for your will and your circumstances. Three gift options and wording follow. Residual gift "I give the residue of my estate to Blind Citizens Australia (ABN 90 006 985 226), of Ross House, 247–251 Flinders Lane, Melbourne VIC 3000, for its general purposes." Percentage gift "I give [insert percentage] per cent of my estate to Blind Citizens Australia (ABN 90 006 985 226), of Ross House, 247–251 Flinders Lane, Melbourne VIC 3000, for its general purposes." Specific amount "I give the sum of [insert dollar amount] to Blind Citizens Australia (ABN 90 006 985 226), of Ross House, 247–251 Flinders Lane, Melbourne VIC 3000, for its general purposes."`; try { await navigator.clipboard.writeText(text); const originalText = button.textContent; button.textContent = 'Copied!'; if (status) { status.textContent = 'BCA details and suggested bequest wording copied to your clipboard.'; } setTimeout(function () { button.textContent = originalText; }, 2000); } catch (err) { alert('Sorry, copying failed. Please copy the text manually.'); } }); }); If you are using the jQuery library, then don't forget to wrap your code inside jQuery.ready() as follows: jQuery(document).ready(function( $ ){ // Your code in here }); -- If you want to link a JavaScript file that resides on another server (similar to ), then please use the "Add HTML Code" page, as this is a HTML code that links a JavaScript file. End of comment */