Add tags for librejs compatibility on application/console pages and in embedded javascript

This commit is contained in:
hankhill19580
2020-09-20 05:05:57 +00:00
parent c4a5d111e7
commit 8fa3e45e47
23 changed files with 129 additions and 1 deletions

View File

@ -1,3 +1,9 @@
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
// This component is dedicated to the public domain. It uses the CC0
// as a formal dedication to the public domain and in circumstances where
// a public domain is not usable.
var fails = 0;
function ajax(url, target, refresh) {
@ -48,3 +54,5 @@ function ajaxDone(url, target, refresh) {
setTimeout(function() {ajax(url, target, refresh);}, refresh);
}
}
/* @license-end */

View File

@ -1,3 +1,9 @@
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
// This component is dedicated to the public domain. It uses the CC0
// as a formal dedication to the public domain and in circumstances where
// a public domain is not usable.
function initConfigClients()
{
var buttons = document.getElementsByClassName("delete");
@ -21,3 +27,5 @@ function addCCClickHandler(elem)
document.addEventListener("DOMContentLoaded", function() {
initConfigClients();
}, true);
/* @license-end */

View File

@ -1,3 +1,9 @@
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
// This component is dedicated to the public domain. It uses the CC0
// as a formal dedication to the public domain and in circumstances where
// a public domain is not usable.
function initConfigStats()
{
checkAll = false;
@ -66,3 +72,5 @@ function toggleAll(category)
document.addEventListener("DOMContentLoaded", function() {
initConfigStats();
}, true);
/* @license-end */

View File

@ -1,8 +1,15 @@
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
// This component is dedicated to the public domain. It uses the CC0
// as a formal dedication to the public domain and in circumstances where
// a public domain is not usable.
function injectClass(f) {
f.className += ' iframed';
var doc = 'contentDocument' in f? f.contentDocument : f.contentWindow.document;
doc.body.className += ' iframed';
}
function resizeFrame(f) {
// offsetHeight returns the height of the visible area for an object, in pixels.
// The value contains the height with the padding, scrollBar, and the border,
@ -39,3 +46,5 @@ function resizeFrame(f) {
document.addEventListener("DOMContentLoaded", function() {
setupFrame();
}, true);
/* @license-end */

View File

@ -1,3 +1,9 @@
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
// This component is dedicated to the public domain. It uses the CC0
// as a formal dedication to the public domain and in circumstances where
// a public domain is not usable.
// refresh the sidebar mini graph every 15 seconds
function refreshGraph() {
@ -5,4 +11,6 @@ function refreshGraph() {
setTimeout(refreshGraph, 15000);
}
refreshGraph();
refreshGraph();
/* @license-end */

View File

@ -1,3 +1,9 @@
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
// This component is dedicated to the public domain. It uses the CC0
// as a formal dedication to the public domain and in circumstances where
// a public domain is not usable.
function initResetScroll()
{
var buttons = document.getElementsByClassName("resetScrollLeft");
@ -35,3 +41,5 @@ function resetScrollTop(element) {
document.addEventListener("DOMContentLoaded", function() {
initResetScroll();
}, true);
/* @license-end */

View File

@ -1,3 +1,9 @@
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
// This component is dedicated to the public domain. It uses the CC0
// as a formal dedication to the public domain and in circumstances where
// a public domain is not usable.
function initStats()
{
var buttons = document.getElementsByClassName("onchange");
@ -18,3 +24,5 @@ function addSChangeHandler(elem)
document.addEventListener("DOMContentLoaded", function() {
initStats();
}, true);
/* @license-end */

View File

@ -1,3 +1,9 @@
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
// This component is dedicated to the public domain. It uses the CC0
// as a formal dedication to the public domain and in circumstances where
// a public domain is not usable.
var fails = 0;
function ajax(url, target, refresh) {
@ -62,3 +68,5 @@ function ajaxDone(url, target, refresh) {
setTimeout(function() {ajax(url, target, refresh);}, refresh);
}
}
/* @license-end */