Hi,
Writing module .info files (7.x) states that :

You can now add Javascript in the module's .info file if it should be added on every page. This allows Javascript to be aggregated in an optimal way, and is the preferred method of adding Javascript that most visitors will need on a typical site visit.

Therefore, I'm proposing to move the js inclusion to the .info file instead of the hook_init().

CommentFileSizeAuthor
#1 bud-1922332-1-script_info.patch590 bytesSimon Georges
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Simon Georges’s picture

Status: Active » Needs review
FileSize
590 bytes

And the patch.

Pol’s picture

Status: Needs review » Fixed

Thanks Simon, committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.