summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Bean <rbean@redhat.com>2015-04-24 17:45:47 +0000
committerRalph Bean <rbean@redhat.com>2015-04-24 17:45:47 +0000
commitf86bafdf0368bb12f013fd36397b18d6bf672d5c (patch)
tree35ba3f16294dd65240331af528c04a677d5e3db2
parentb1d54a9d967b7f06c4b34bb1625e4e654d0e51ac (diff)
downloadansible-f86bafdf0368bb12f013fd36397b18d6bf672d5c.tar.gz
ansible-f86bafdf0368bb12f013fd36397b18d6bf672d5c.tar.xz
ansible-f86bafdf0368bb12f013fd36397b18d6bf672d5c.zip
(fedmenu) extract the package name from the url.
-rw-r--r--roles/distgit/templates/cgit-header.html16
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>