mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Front 2.50
This commit is contained in:
39
front/js/pialert_common.js
Normal file
39
front/js/pialert_common.js
Normal file
@@ -0,0 +1,39 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
Pi.Alert Common Javascript functions
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
var timerRefreshData = ''
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function translateHTMLcodes (text) {
|
||||
if (text == null) {
|
||||
return null;
|
||||
}
|
||||
var text2 = text.replace(new RegExp(' ', 'g'), " ");
|
||||
text2 = text2.replace(new RegExp('<', 'g'), "<");
|
||||
return text2;
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function stopTimerRefreshData () {
|
||||
try {
|
||||
clearTimeout (timerRefreshData);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function newTimerRefreshData (refeshFunction) {
|
||||
timerRefreshData = setTimeout (function() {
|
||||
refeshFunction();
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function debugTimer () {
|
||||
document.getElementById ('pageTitle').innerHTML = (new Date().getSeconds());
|
||||
}
|
||||
Reference in New Issue
Block a user