mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-04 16:13:08 +08:00
(fedmenu) extract the package name from the url.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user