Permalink
Browse files

js_config: Add a hook for mutating js_config.

  • Loading branch information...
1 parent e66ee5a commit 30d1c8f89d27b76bf5a97016bd22795b7e687564 @spladug spladug committed Mar 22, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 r2/r2/lib/template_helpers.py
@@ -24,6 +24,7 @@
from filters import unsafe, websafe, _force_unicode, _force_utf8
from r2.lib.utils import vote_hash, UrlParser, timesince, is_subdomain
+from r2.lib import hooks
from r2.lib.media import s3_direct_url
import babel.numbers
@@ -164,6 +165,8 @@ def js_config(extra_config=None):
if extra_config:
config.update(extra_config)
+ hooks.get_hook("js_config").call(config=config)
+
return config

0 comments on commit 30d1c8f

Please sign in to comment.