diff options
-rw-r--r-- | roles/distgit/templates/cgit-header.html | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/roles/distgit/templates/cgit-header.html b/roles/distgit/templates/cgit-header.html index b5263fc6e..c3ac46657 100644 --- a/roles/distgit/templates/cgit-header.html +++ b/roles/distgit/templates/cgit-header.html @@ -7,14 +7,20 @@ {% endif %} <script> -{% if env == 'staging' %} -var base = 'https://apps.stg.fedoraproject.org/'; -{% else %} -var base = 'https://apps.fedoraproject.org/'; -{% endif %} + {% if env == 'staging' %} + var base = 'https://apps.stg.fedoraproject.org/'; + {% else %} + var base = 'https://apps.fedoraproject.org/'; + {% endif %} + var tokens = window.location.href.split('/'); + var repo = null; + if (tokens.length > 4 && tokens[4] != '') { + repo = tokens[4].split('.')[0]; + } fedmenu({ 'url': base + 'js/data.js', 'mimeType': 'application/javascript', 'position': 'bottom-right', + 'package': repo, }); </script> |