(function () {
	var btn = document.querySelector( '.truebe-impl-copy' );
	if ( ! btn ) { return; }
	btn.addEventListener( 'click', function () {
		navigator.clipboard.writeText( btn.getAttribute( 'data-code' ) ).then( function () {
			var c = document.getElementById( 'truebe-copied' );
			c.style.display = 'inline';
			setTimeout( function () { c.style.display = 'none'; }, 2000 );
		} );
	} );
})();