You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
700 B

  1. var ak_js = document.getElementById( "ak_js" );
  2. if ( ! ak_js ) {
  3. ak_js = document.createElement( 'input' );
  4. ak_js.setAttribute( 'id', 'ak_js' );
  5. ak_js.setAttribute( 'name', 'ak_js' );
  6. ak_js.setAttribute( 'type', 'hidden' );
  7. }
  8. else {
  9. ak_js.parentNode.removeChild( ak_js );
  10. }
  11. ak_js.setAttribute( 'value', ( new Date() ).getTime() );
  12. var commentForm = document.getElementById( 'commentform' );
  13. if ( commentForm ) {
  14. commentForm.appendChild( ak_js );
  15. }
  16. else {
  17. var replyRowContainer = document.getElementById( 'replyrow' );
  18. if ( replyRowContainer ) {
  19. var children = replyRowContainer.getElementsByTagName( 'td' );
  20. if ( children.length > 0 ) {
  21. children[0].appendChild( ak_js );
  22. }
  23. }
  24. }