(fedmenu) extract the package name from the url.
This commit is contained in:
parent
b1d54a9d96
commit
f86bafdf03
1 changed files with 11 additions and 5 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue