diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-01-31 19:19:47 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-02-01 09:15:30 +0100 |
commit | ab73c9c3282fa3550fcf349ea30e399de202f4ed (patch) | |
tree | ced754c494c98035e115bf8a8727afaaa31f83bf /core/js/js.js | |
parent | 8709f6b218f16dd71200c715dd37a1d58736d4e4 (diff) | |
download | nextcloud-server-ab73c9c3282fa3550fcf349ea30e399de202f4ed.tar.gz nextcloud-server-ab73c9c3282fa3550fcf349ea30e399de202f4ed.zip |
Move global helper functions to the bundle and deprecate some of them
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/core/js/js.js b/core/js/js.js index 9b4114e400e..048bd5d470f 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1312,40 +1312,6 @@ function initCore() { $(document).ready(initCore); /** - * Format an UNIX timestamp to a human understandable format - * @param {number} timestamp UNIX timestamp - * @return {string} Human readable format - */ -function formatDate(timestamp){ - return OC.Util.formatDate(timestamp); -} - -// -/** - * Get the value of a URL parameter - * @link http://stackoverflow.com/questions/1403888/get-url-parameter-with-jquery - * @param {string} name URL parameter - * @return {string} - */ -function getURLParameter(name) { - return decodeURIComponent( - (new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec( - location.search)||[,''])[1].replace(/\+/g, '%20') - )||''; -} - -/** - * Takes an absolute timestamp and return a string with a human-friendly relative date - * @param {number} timestamp A Unix timestamp - */ -function relative_modified_date(timestamp) { - /* - Were multiplying by 1000 to bring the timestamp back to its original value - per https://github.com/owncloud/core/pull/10647#discussion_r16790315 - */ - return OC.Util.relativeModifiedDate(timestamp * 1000); -} - // fallback to hashchange when no history support if (window.history.pushState) { window.onpopstate = _.bind(OC.Util.History._onPopState, OC.Util.History); |