Ask Your Question

How to paste custom javascript at one question only?

asked 2014-04-11 13:40:57 -0600

Toms's avatar

Is it somehow possible to paste some custom javascript on one specific question only?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-11 13:41:54 -0600

Evgeny's avatar

updated 2014-04-11 14:12:51 -0600

In the template question/javascript.html you could add something like:

{% if request.path == '/my-url/' %}
<script src="" />
{% endif %}
edit flag offensive delete link more


Some agency wants to test my site to be approved by their standards and they want me to paste their code on one test-question-page. If I paste it for all sites, it will eventually break the site for one day.

Toms's avatar Toms  ( 2014-04-11 13:48:42 -0600 )edit

Thank you! It works!

Toms's avatar Toms  ( 2014-04-11 14:15:17 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-04-11 13:40:57 -0600

Seen: 148 times

Last updated: Apr 11 '14