(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 %}
|
{% endif %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
{% if env == 'staging' %}
|
{% if env == 'staging' %}
|
||||||
var base = 'https://apps.stg.fedoraproject.org/';
|
var base = 'https://apps.stg.fedoraproject.org/';
|
||||||
{% else %}
|
{% else %}
|
||||||
var base = 'https://apps.fedoraproject.org/';
|
var base = 'https://apps.fedoraproject.org/';
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
var tokens = window.location.href.split('/');
|
||||||
|
var repo = null;
|
||||||
|
if (tokens.length > 4 && tokens[4] != '') {
|
||||||
|
repo = tokens[4].split('.')[0];
|
||||||
|
}
|
||||||
fedmenu({
|
fedmenu({
|
||||||
'url': base + 'js/data.js',
|
'url': base + 'js/data.js',
|
||||||
'mimeType': 'application/javascript',
|
'mimeType': 'application/javascript',
|
||||||
'position': 'bottom-right',
|
'position': 'bottom-right',
|
||||||
|
'package': repo,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue