Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
added versioning of the bang file
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Pissantchev committed Jun 4, 2015
1 parent 960d29b commit 162b773
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/DDG/Publisher/Site/Duckduckgo/Root.pm
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ sub pages {{
no_cw => 1,
hero_header => 1,
hero_header_text => 1,
js_page_type => 'Bang'
js_page_type => 'Bang',
js_bang_version => 1
},
index => sub {
no_wrapper => 1,
Expand Down
5 changes: 5 additions & 0 deletions share/site/duckduckgo/head_js.tx
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@
DDG.page = new DDG.Pages.<: if $js_page_type { $js_page_type } else if $homepage { :>Home<: } else { :>Static<: } :>();
</script>
<: } :>
<: if $js_bang_version { :>
<script type="text/javascript">
DDG.inject("DDG.Data.bangs.version", <: $ENV.DDG_MAX_BANG_JS || 0 :>);
</script>
<: } :>

0 comments on commit 162b773

Please sign in to comment.