| @@ -10,38 +10,12 @@ | ||
| 10 | 10 | } |
| 11 | 11 | } |
| 12 | 12 | }; |
| 13 | 13 | |
| 14 | - // Copy the log to clipboard. | |
| 15 | - const wcf_copy_the_log = function () { | |
| 16 | - $( '.wcf-log--copy' ).on( 'click', function ( e ) { | |
| 17 | - e.preventDefault(); | |
| 18 | - const $this = $( this ); | |
| 19 | - | |
| 20 | - const copy_boundry = document.createRange(); | |
| 21 | - copy_boundry.selectNode( | |
| 22 | - document.getElementById( 'wcf-log--text' ) | |
| 23 | - ); | |
| 24 | - ownerDocument.defaultView.getSelection().removeAllRanges(); | |
| 25 | - ownerDocument.defaultView.getSelection().addRange( copy_boundry ); | |
| 26 | - document.execCommand( 'copy' ); | |
| 27 | - ownerDocument.defaultView.getSelection().removeAllRanges(); | |
| 28 | - | |
| 29 | - $this.text( $this.attr( 'data-success' ) ); | |
| 30 | - | |
| 31 | - setTimeout( function () { | |
| 32 | - $this.text( $this.attr( 'data-default' ) ); | |
| 33 | - }, 500 ); | |
| 34 | - } ); | |
| 35 | - }; | |
| 36 | - | |
| 37 | - $( document ).on( 'ready', function () { | |
| 14 | + $( function () { | |
| 38 | 15 | setTimeout( function () { |
| 39 | 16 | wcf_back_step_button(); |
| 40 | 17 | }, 300 ); |
| 41 | - | |
| 42 | - // Copy the log to clipboard. | |
| 43 | - wcf_copy_the_log(); | |
| 44 | 18 | } ); |
| 45 | 19 | |
| 46 | 20 | function installSuccess( event, args ) { |
| 47 | 21 | event.preventDefault(); |