X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/08efa741a5984f3105e4c847d644522ed92d319c..31ff867136044d3f3fbeb4357f814adb8da3003a:/lib/functions.js.php?ds=inline diff --git a/lib/functions.js.php b/lib/functions.js.php index 845da82..1f83ae7 100644 --- a/lib/functions.js.php +++ b/lib/functions.js.php @@ -316,17 +316,17 @@ function add_time_string_to_date(d, time) } if (time == 'month') { - d.setSeconds (d.getSeconds() + 2419200); + d.setSeconds (d.getSeconds() + 2592000); return true; } if (time == 'quarter') { - d.setSeconds (d.getSeconds() + 7257600); + d.setSeconds (d.getSeconds() + 7776000); return true; } if (time == 'year') { - d.setSeconds (d.getSeconds() + 29030400); + d.setSeconds (d.getSeconds() + 31536000); return true; } return false; @@ -742,8 +742,10 @@ function copyLinkToClipboard(link_id) { } function addCopyListener(button_id, link_id) { - document.getElementById(button_id) + if(document.getElementById(button_id)){ + document.getElementById(button_id) .addEventListener("click", function() { copyLinkToClipboard(link_id);}); + } } // @license-end