forked from I2P_Developers/i2p.i2p
Add tags for librejs compatibility on application/console pages and in embedded javascript
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
/* @license http://www.gnu.org/licenses/gpl-2.0.html GPL-2.0 */
|
||||
|
||||
function initDelete()
|
||||
{
|
||||
var main = document.getElementById("mainsection");
|
||||
@ -21,3 +23,5 @@ function initDelete()
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
initDelete();
|
||||
}, true);
|
||||
|
||||
/* @license-end */
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* @license http://www.gnu.org/licenses/gpl-2.0.html GPL-2.0 */
|
||||
|
||||
const setupbuttons=()=>{
|
||||
let sp = document.forms[0].savepri;
|
||||
if ( sp ) updatesetallbuttons(), sp.disabled = true, sp.className = 'disabled';
|
||||
@ -115,3 +117,5 @@ function addClickHandler(elem)
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
setupbuttons();
|
||||
}, true);
|
||||
|
||||
/* @license-end */
|
||||
|
@ -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 requestAjax1() {
|
||||
var url = ".ajax/xhr1.html";
|
||||
var query = window.location.search;
|
||||
@ -13,3 +19,5 @@ function initAjax() {
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
initAjax();
|
||||
}, true);
|
||||
|
||||
/* #license-end */
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* @license http://www.gnu.org/licenses/gpl-2.0.html GPL-2.0 */
|
||||
|
||||
function initDelete()
|
||||
{
|
||||
var buttons = document.getElementsByClassName("delete");
|
||||
@ -21,3 +23,5 @@ function addClickHandler(elem)
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
initDelete();
|
||||
}, true);
|
||||
|
||||
/* @license-end */
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* @license http://www.gnu.org/licenses/gpl-2.0.html GPL-2.0 */
|
||||
|
||||
function initTables() {
|
||||
|
||||
var hideableTables = document.querySelectorAll("table.tunnelConfig th");
|
||||
@ -75,3 +77,5 @@ hideableTables.forEach(function(configTable) {
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
initTables();
|
||||
}, true);
|
||||
|
||||
/* @license-end */
|
||||
|
@ -27,6 +27,8 @@
|
||||
<script src="/js/iframed.js?<%=net.i2p.CoreVersion.VERSION%>" type="text/javascript"></script>
|
||||
<%@include file="summaryajax.jsi" %>
|
||||
<script nonce="<%=cspNonce%>" type="text/javascript">
|
||||
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
|
||||
|
||||
function setupFrame() {
|
||||
f = document.getElementById("susidnsframe");
|
||||
f.addEventListener("load", function() {
|
||||
@ -34,6 +36,8 @@
|
||||
resizeFrame(f);
|
||||
}, true);
|
||||
}
|
||||
|
||||
/* @license-end */
|
||||
</script>
|
||||
</head><body>
|
||||
<%@include file="summary.jsi" %>
|
||||
|
@ -27,6 +27,8 @@
|
||||
<script src="/js/iframed.js?<%=net.i2p.CoreVersion.VERSION%>" type="text/javascript"></script>
|
||||
<%@include file="summaryajax.jsi" %>
|
||||
<script nonce="<%=cspNonce%>" type="text/javascript">
|
||||
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
|
||||
|
||||
function injectClassSpecific(f) {
|
||||
var doc = 'contentDocument' in f? f.contentDocument : f.contentWindow.document;
|
||||
if (doc.getElementsByClassName == undefined) {
|
||||
@ -56,6 +58,8 @@
|
||||
resizeFrame(f);
|
||||
}, true);
|
||||
}
|
||||
|
||||
/* @license-end */
|
||||
</script>
|
||||
</head><body>
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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() {
|
||||
@ -6,3 +12,5 @@ function refreshGraph() {
|
||||
}
|
||||
|
||||
refreshGraph();
|
||||
|
||||
/* @license-end */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -2,10 +2,14 @@
|
||||
if (!intl.getDisableRefresh()) {
|
||||
%><script src="/js/ajax.js?<%=net.i2p.CoreVersion.VERSION%>" type="text/javascript"></script>
|
||||
<script nonce="<%=cspNonce%>" type="text/javascript">
|
||||
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
|
||||
|
||||
var failMessage = "<hr><b><%=intl._t("Router is down")%><\/b>";
|
||||
function requestAjax1() { ajax("/xhr1.jsp?requestURI=<%=request.getRequestURI()%>", "xhr", <%=intl.getRefresh()%>000); }
|
||||
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||
initAjax();
|
||||
|
||||
/* @license-end */
|
||||
</script><%
|
||||
}
|
||||
%>
|
||||
|
@ -28,6 +28,8 @@
|
||||
<script src="/js/iframed.js?<%=net.i2p.CoreVersion.VERSION%>" type="text/javascript"></script>
|
||||
<%@include file="summaryajax.jsi" %>
|
||||
<script nonce="<%=cspNonce%>" type="text/javascript">
|
||||
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
|
||||
|
||||
function setupFrame() {
|
||||
f = document.getElementById("i2psnarkframe");
|
||||
f.addEventListener("load", function() {
|
||||
@ -35,6 +37,8 @@
|
||||
resizeFrame(f);
|
||||
}, true);
|
||||
}
|
||||
|
||||
/* @license-end */
|
||||
</script>
|
||||
</head><body>
|
||||
<%@include file="summary.jsi" %>
|
||||
|
@ -28,6 +28,8 @@
|
||||
<script src="/js/iframed.js?<%=net.i2p.CoreVersion.VERSION%>" type="text/javascript"></script>
|
||||
<%@include file="summaryajax.jsi" %>
|
||||
<script nonce="<%=cspNonce%>" type="text/javascript">
|
||||
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
|
||||
|
||||
function setupFrame() {
|
||||
f = document.getElementById("susimailframe");
|
||||
f.addEventListener("load", function() {
|
||||
@ -35,6 +37,8 @@
|
||||
resizeFrame(f);
|
||||
}, true);
|
||||
}
|
||||
|
||||
/* @license-end */
|
||||
</script>
|
||||
</head><body>
|
||||
<%@include file="summary.jsi" %>
|
||||
|
@ -68,6 +68,8 @@
|
||||
%>
|
||||
<script src="/js/welcomeajax.js?<%=net.i2p.CoreVersion.VERSION%>" type="text/javascript"></script>
|
||||
<script nonce="<%=cspNonce%>" type="text/javascript">
|
||||
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
|
||||
|
||||
var failMessage = "<b><%=intl._t("Router is down")%><\/b>";
|
||||
var progressMessage = "<b><%=intl._t("Bandwidth test in progress...")%><\/b>";
|
||||
var doneMessage = "<b><%=intl._t("Bandwidth test is complete, click Next")%><\/b>";
|
||||
@ -79,6 +81,8 @@
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
initAjax();
|
||||
}, true);
|
||||
|
||||
/* @license-end */
|
||||
</script>
|
||||
<%
|
||||
} // ipg == 3
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* #license http://www.jclark.com/xml/copying.txt Expat */
|
||||
|
||||
function HideMessages() {
|
||||
var hideableMessages = document.getElementsByClassName("messages");
|
||||
@ -17,3 +18,5 @@ function HideMessages() {
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.body.addEventListener('click', HideMessages, true);
|
||||
}, true);
|
||||
|
||||
/* @license-end */
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* @license http://www.gnu.org/licenses/gpl-2.0.html GPL-2.0 */
|
||||
|
||||
let beforePopup = true;
|
||||
window.addEventListener('beforeunload', (e)=>{if (beforePopup) e.returnValue=true;} );
|
||||
|
||||
@ -20,3 +22,5 @@ function addClickHandler5(elem)
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
initPopup();
|
||||
}, true);
|
||||
|
||||
/* @license-end */
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* @license http://www.gnu.org/licenses/gpl-2.0.html GPL-2.0 */
|
||||
|
||||
function initButtons() {
|
||||
var buttons = document.getElementsByClassName("delete1");
|
||||
for(index = 0; index < buttons.length; index++)
|
||||
@ -100,3 +102,5 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||
initButtons();
|
||||
deleteboxclicked();
|
||||
}, true);
|
||||
|
||||
/* @license-end */
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* @license http://www.gnu.org/licenses/gpl-2.0.html GPL-2.0 */
|
||||
|
||||
function initNotifications() {
|
||||
var buttons = document.getElementsByClassName("notifications");
|
||||
for(index = 0; index < buttons.length; index++)
|
||||
@ -17,3 +19,5 @@ function addClickHandler6(elem)
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
initNotifications();
|
||||
}, true);
|
||||
|
||||
/* @license-end */
|
||||
|
Reference in New Issue
Block a user