JavaScript by Path
JavaScript by Path allows custom, user defined JavaScript code to be added on a path by path basis. This is particularity useful for implementing various third party 'tracking codes' eg. Doubleclick.
To add JavaScript to a particular page or set of pages, you define a rule. This rule defines visibility settings (works the same as block.module), the desired scope of the JavaScript (header or footer), and provides 2 text areas where JavaScript code and noscript code may be entered.
Obviously, permission to use the module should be granted with care as it allows for potentially malicious code to be inserted into a page.
I found a need for it... perhaps others would. Or, perhaps this functionality is already provided by another module, in which case I just wasted a couple of hours! If not, I will release it on drupal.org.
Thoughts/comments/suggestions?
Thanks,
Tom
| Attachment | Size |
|---|---|
| javascript_bypayh.png | 100.88 KB |


Sounds a lot like a general
Sounds a lot like a general Statistics/Analytics module that I've been working on that can be a drop-in replacement for core's statistics.module. The base module would expose the interface for user/role/path/link tracking. Modules like Google Analytics would then just be small-sub module that tells 'what' to add. This way all the separate 'analytics' modules that need to add JS on certain pages don't need to re-implement code every single time. They'd all be controlled by one module and respect the same settings.
I'll add it to my CVS sandbox and post some screenshots here and see what you think.
Drupal freelance developer | www.davereid.net | Please help sponsor my attendance at DrupalCon SF 2010!
Existing module
Also see http://drupal.org/project/js_injector
Drupal freelance developer | www.davereid.net | Please help sponsor my attendance at DrupalCon SF 2010!