mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Update apps.js
This commit is contained in:
parent
a9d55004f0
commit
b0b9a59b9c
1 changed files with 3 additions and 2 deletions
|
@ -461,6 +461,7 @@
|
|||
// Force trailing slash
|
||||
params.app = params.app.replace(/\/?$/, '/');
|
||||
var rawpath = "";
|
||||
var giturl = params.app;
|
||||
if(function() {
|
||||
var xhr_object = new XMLHttpRequest();
|
||||
xhr_object.open("GET", params.app + "raw/master/manifest.json", false);
|
||||
|
@ -468,11 +469,11 @@
|
|||
return xhr_object.status;
|
||||
} === 200) {
|
||||
rawpath = 'raw/master/manifest.json';
|
||||
var giturl = params.app + rawpath;
|
||||
giturl = params.app + rawpath;
|
||||
} // Install custom app from github
|
||||
else if (params.app.indexOf("github.com") !== -1) {
|
||||
rawpath = 'master/manifest.json';
|
||||
var giturl = params.app.replace('github.com', 'raw.githubusercontent.com') + rawpath;
|
||||
giturl = params.app.replace('github.com', 'raw.githubusercontent.com') + rawpath;
|
||||
}
|
||||
else {
|
||||
console.log("You git host is not supported");
|
||||
|
|
Loading…
Reference in a new issue