OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
34
app/Views/Templates/sections/pageBottom.blade.php
Normal file
34
app/Views/Templates/sections/pageBottom.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
@if ($poorMansCron && $loggedIn)
|
||||
<script>
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
let now = Date.now();
|
||||
let lastCronExecution = localStorage.getItem("lastCronRun");
|
||||
|
||||
if(Number.isInteger(lastCronExecution)){
|
||||
|
||||
var difference = Math.floor((now - lastCronExecution) / 1000);
|
||||
if(difference > 300) {
|
||||
jQuery.get('{!! BASE_URL !!}/cron/run');
|
||||
localStorage.setItem("lastCronRun", Date.now());
|
||||
}
|
||||
|
||||
}else{
|
||||
jQuery.get('{!! BASE_URL !!}/cron/run');
|
||||
localStorage.setItem("lastCronRun", Date.now());
|
||||
}
|
||||
|
||||
//1 min time to run cron
|
||||
setInterval(function(){
|
||||
jQuery.get('{!! BASE_URL !!}/cron/run');
|
||||
localStorage.setItem("lastCronRun", Date.now());
|
||||
}, 300000);
|
||||
});
|
||||
|
||||
</script>
|
||||
@endif
|
||||
|
||||
<script src="{!! BASE_URL !!}/dist/js/compiled-footer.{!! $version !!}.min.js"></script>
|
||||
|
||||
@dispatchEvent('beforeBodyClose')
|
||||
Reference in New Issue
Block a user