summaryrefslogtreecommitdiff
path: root/www/crm/wp-content/plugins/akismet/_inc/form.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/crm/wp-content/plugins/akismet/_inc/form.js')
-rw-r--r--www/crm/wp-content/plugins/akismet/_inc/form.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/akismet/_inc/form.js b/www/crm/wp-content/plugins/akismet/_inc/form.js
new file mode 100644
index 00000000..3a5be8af
--- /dev/null
+++ b/www/crm/wp-content/plugins/akismet/_inc/form.js
@@ -0,0 +1,30 @@
+var ak_js = document.getElementById( "ak_js" );
+
+if ( ! ak_js ) {
+ ak_js = document.createElement( 'input' );
+ ak_js.setAttribute( 'id', 'ak_js' );
+ ak_js.setAttribute( 'name', 'ak_js' );
+ ak_js.setAttribute( 'type', 'hidden' );
+}
+else {
+ ak_js.parentNode.removeChild( ak_js );
+}
+
+ak_js.setAttribute( 'value', ( new Date() ).getTime() );
+
+var commentForm = document.getElementById( 'commentform' );
+
+if ( commentForm ) {
+ commentForm.appendChild( ak_js );
+}
+else {
+ var replyRowContainer = document.getElementById( 'replyrow' );
+
+ if ( replyRowContainer ) {
+ var children = replyRowContainer.getElementsByTagName( 'td' );
+
+ if ( children.length > 0 ) {
+ children[0].appendChild( ak_js );
+ }
+ }
+} \ No newline at end of file