mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Final test
This commit is contained in:
parent
e7e295ff1f
commit
7e385af846
1 changed files with 1 additions and 18 deletions
|
@ -460,24 +460,7 @@
|
||||||
|
|
||||||
// Force trailing slash
|
// Force trailing slash
|
||||||
params.app = params.app.replace(/\/?$/, '/');
|
params.app = params.app.replace(/\/?$/, '/');
|
||||||
var rawpath = "";
|
var giturl = params.app + "raw/master/manifest.json";
|
||||||
var giturl = params.app;
|
|
||||||
if(function() {
|
|
||||||
var xhr_object = new XMLHttpRequest();
|
|
||||||
xhr_object.open("GET", params.app + "raw/master/manifest.json", false);
|
|
||||||
xhr_object.send(null);
|
|
||||||
return xhr_object.status;
|
|
||||||
} === 200) {
|
|
||||||
rawpath = 'raw/master/manifest.json';
|
|
||||||
giturl = params.app + rawpath;
|
|
||||||
} // Install custom app from github
|
|
||||||
else if (params.app.indexOf("github.com") !== -1) {
|
|
||||||
rawpath = 'master/manifest.json';
|
|
||||||
giturl = params.app.replace('github.com', 'raw.githubusercontent.com') + rawpath;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log("You git host is not supported");
|
|
||||||
}
|
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
url: giturl,
|
url: giturl,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
|
|
Loading…
Add table
Reference in a new issue