mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
adding JSDoc + remove unused function
This commit is contained in:
parent
1291303c5a
commit
e1030c6b5f
1 changed files with 8 additions and 5 deletions
|
|
@ -195,6 +195,13 @@ var OC={
|
|||
return OC.webroot + '/remote.php/' + service;
|
||||
},
|
||||
|
||||
/**
|
||||
* Generates the absolute url for the given relative url, which can contain parameters.
|
||||
*
|
||||
* @returns {string}
|
||||
* @param {string} url
|
||||
* @param params
|
||||
*/
|
||||
generateUrl: function(url, params) {
|
||||
var _build = function (text, vars) {
|
||||
return text.replace(/{([^{}]*)}/g,
|
||||
|
|
@ -211,10 +218,6 @@ var OC={
|
|||
return OC.webroot + '/index.php' + _build(url, params);
|
||||
},
|
||||
|
||||
linkToRoute:function(route) {
|
||||
return OC.webroot + '/index.php/' + route;
|
||||
},
|
||||
|
||||
/**
|
||||
* @brief Creates an absolute url for remote use
|
||||
* @param string $service id
|
||||
|
|
@ -812,7 +815,7 @@ function initCore() {
|
|||
if (interval < 60) {
|
||||
interval = 60;
|
||||
}
|
||||
var url = OC.linkToRoute('heartbeat');
|
||||
var url = OC.generateUrl('/heartbeat');
|
||||
setInterval(function(){
|
||||
$.post(url);
|
||||
}, interval * 1000);
|
||||
|
|
|
|||
Loading…
Reference in a new issue