Disabling the Javascript in Drupal Comment Forms

In Drupal, forms have nice little features which slide up and down some areas and make textareas resizable. The example is in the search page, where the “advanced search” field slides down when you click on it. It is a nice feature, especially in administration pages where forms tend to get very long. And it is tightly integrated to Drupal so you don’t need to waste some precious time implementing it.

The reason I am saying this is because those effects require Javascript (and more specifically, the JQuery library), which itself weights around 19 KB, and Drupal’s own Javascript flavor, drupal.js which is around 5 KB. 24 KB is admittedly small for that kind of effect, but surely you won’t want to double your page size just for it, will you? And don’t mention the extra HTTP requests and additional script for each effects…

Now suppose that you are a blogger who dreads for comments very much that you make the process of submitting comments as easy as possible. You will put the comment form right under the content, in the same page. Suddenly all your content pages need Javascript for it to function, just because of that tiny little form which only a bit of your site visitors care!

Fortunately enough, there is a way to remove this functionality which in turn removes the need of Javascript for a particular page. Behold Comment Form, my own tiny little Drupal module! (download link below) After downloading, installing, and enabling this module, you can go to comments admin page, and there’ll be a new tab, ‘Comment form display’. There, you can disable and enable those Javscript-hungry effects as you wish. As a bonus, you can configure how many rows the comment form textarea will have (because I really think it is too high).

My investigation concludes that by using this module properly, you can reduce the total size of one page by 28 KB.

I hope that this module helps bloggers using Drupal a bit. And the reason I’m not putting this in drupal.org is that it is so lightweight (the code is just 2.5 KB) that I don’t want to bother setting up CVS, maintaining it, etc. If someone wants to take care of it I would be glad, just drop me a line here (it is GPL, by the way).

comment_form.tar.gz6.61 KB



Starting today, let's suppose introspection with all the things we have done. All we accounted, good and bad is up to us.

obat meningitis pada anak | pengobatan kanker lambung | penyebab kista ovarium | pengobatan kanker vagina | obat tipes pada anak | obat infeksi hidung


See your latest update today. The most fun looking through the internet news, can select any kind, many new things that we can. My hope is also a choice of web readers to seek information

obat jantung bocor pada bayi
obat infeksi amandel
obat ginjal bocor pada anak

marema page one.

Starting today, let's suppose introspection with all the things we have done. All we accounted, good and bad is up to us. A thank for information is the best very nice

obat tradisional batu empedu

Obat pelangsing badan aman ya.

Obat pelangsing badan aman ya disini adanya yaitu wsc biolo wootekh terjamin keamanannya buat tubuh dan menjadikan tubuh lebih ramping,sehat dan lebih bergairah bukan hanya itu wsc biolo pun menjadikan limpa anda lebih sehat lagi karena kandungan yang di jadikan bahan pelangsing wsc biolo terkandung bahan alami yang menyehatkan buat badan selain membakar lemak di dalam tubuh..

Selamat datang di blog saya.

Selamat datang di blog saya di agen obat pelangsing wsc biolo original di sini kami melayani pembelian wsc biolo secara eceran ataupun partai besar tentunya dengan harga resmi konsumen yang telah di tetapkan yaitu Rp.250 ribu untuk eceran dan untuk beli banyak ada discount tertentu kami akan layani dengan baik...

Tahukah anda tentang.

Tahukah anda tentang pelangsing wsc biolo obat pelangsing badan yang ampuh menurunkan berat badan..pasti sekilas anda dapat melihatnya di komputer anda atau di android namun tentunya anda belum banyak yang tahu yang manakah obat pelangsing wsc biolo asli original,disini saya akan mengungkap ciri-ciri wsc biolo yang asli dan yang palsu..

obat kanker payudara.

gan the info very nice and very helpful :)
obat tradisional kanker payudara

pengobatan benjolan anak.

nice article


woowwwwwwwwww lieur

Kenapa Bila bersin Suka Merem ?

the information provided on this website is very good, I can hear every detail of paragrapnya. Vocabulary contained within this blog are also very useful and cool once, next update in waiting
ciri penyakit and my blogs ace maxs and my blogs obat pembekuan darah di otak

You need to take part in a.

You need to take part in a contest for one of the finest websites online. I'm going to recommend this web site!

Do not worry about tomorrow,

Do not worry about tomorrow, for tomorrow will worry about itself. Sufficient for the day of distress
obat sesak dada
obat sakit pinggang untuk ibu hamil


One of the hardest things in life is still to be yourself when everyone is trying to turn you into someone else.
obat sesak dada
obat sakit pinggang ibu hamil
obat penyakit flek paru anak
obat kista ovarium tanpa operasi

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <pre> <i> <b>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.

Recent comments