(fedmenu) extract the package name from the url.

This commit is contained in:
Ralph Bean 2015-04-24 17:45:47 +00:00
parent b1d54a9d96
commit f86bafdf03

View file

@ -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>