OffSite

OpenForum OffSite Javascript {{version}}

Latest build {{buildDate}}

<!--Extension InsertFile pageName="/OpenForum/Javascript/OffSite" fileName="OpenForumOffSite.js" -->//==============================================================================================================// <!-- Version 0.0.1--> <!-- Built on Mon Nov 21 2022 11:55:22 GMT-0000 (GMT) --> <!-- Built by OpenForum Javascript Builder.--> <!-- Do not edit as changes may be overwritten --> //==============================================================================================================// //==============================================================================================================// <!-- Source: /OpenForum/Javascript/Core/open-forum-testing.js--> //==============================================================================================================// <!--<ul><li> Author: </li> <li> Description: </li> </ul>--> if(typeof OpenForum == "undefined") { OpenForum = { testing: {} }; } OpenForum.testing.showComments = function() { var filterNone = function() { return NodeFilter.FILTER_ACCEPT; }; var iterator = document.createNodeIterator(document.body, NodeFilter.SHOW_COMMENT, filterNone); var currentNode; while ( currentNode = iterator.nextNode() ) { try{ var e = document.createElement("div"); //if(currentNode.nextElementSibling.offsetParent!=null) { var x = currentNode.nextElementSibling.offsetTop; var y = currentNode.nextElementSibling.offsetLeft; e.style.position = "absolute"; e.style.top = x; e.style.left = y; e.style.color = "black"; e.style.backgroundColor = "white"; e.style.border = "solid 1px black"; e.style.borderRadius = "8px"; e.style.padding = "2px"; e.style.zIndex = "9999"; //} e.innerHTML = "comment"; e.title = currentNode.nodeValue; currentNode.nextElementSibling.insertAdjacentElement('beforeBegin',e); console.log("Displaying comment " + currentNode.nodeValue); } catch (ex) { console.log("Error displaying comment " + ex); } } }; OpenForum.testing.showIds = function() { var filterNone = function() { return NodeFilter.FILTER_ACCEPT; }; var iterator = document.createNodeIterator(document.body, NodeFilter.SHOW_ALL, filterNone); var currentNode; while ( currentNode = iterator.nextNode() ) { try{ if(typeof currentNode.id == "undefined" || currentNode.id == "") continue; var e = document.createElement("div"); //if(currentNode.nextElementSibling.offsetParent!=null) { var x = currentNode.offsetTop; var y = currentNode.offsetLeft; e.style.position = "absolute"; e.style.top = x; e.style.left = y; e.style.color = "black"; e.style.backgroundColor = "cyan"; e.style.border = "solid 1px black"; e.style.borderRadius = "2px"; e.style.padding = "2px"; e.style.zIndex = "9999"; //} e.innerHTML = "id"; e.title = currentNode.id; currentNode.insertAdjacentElement('beforeBegin',e); console.log("Displaying id " + currentNode.id); } catch (ex) { console.log("Error displaying id " + ex + " for " +currentNode.id); } } }; OpenForum.testing.showNames = function() { var filterNone = function() { return NodeFilter.FILTER_ACCEPT; }; var iterator = document.createNodeIterator(document.body, NodeFilter.SHOW_ALL, filterNone); var currentNode; while ( currentNode = iterator.nextNode() ) { try{ if(typeof currentNode.name == "undefined" || currentNode.name == "") continue; var e = document.createElement("div"); //if(currentNode.nextElementSibling.offsetParent!=null) { var x = currentNode.offsetTop; var y = currentNode.offsetLeft; e.style.position = "absolute"; e.style.top = x; e.style.left = y; e.style.color = "white"; e.style.backgroundColor = "black"; e.style.border = "solid 1px white"; e.style.borderRadius = "2px"; e.style.padding = "2px"; e.style.zIndex = "9999"; //} e.innerHTML = "name"; e.title = currentNode.name; currentNode.insertAdjacentElement('beforeBegin',e); console.log("Displaying id " + currentNode.id); } catch (ex) { console.log("Error displaying id " + ex + " for " +currentNode.id); } } }; OpenForum.testing.readForm = function() { var data = {}; var is = document.getElementsByTagName("input"); for( var i in is ) { if( is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.id ) { if(is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.type == "radio") { data<img src="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/ is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" alt=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" title=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i"/>.id ] = is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.checked; } else { data<img src="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/ is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" alt=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" title=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i"/>.id ] = is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.value; } } else if( is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.name ) { if(is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.type == "radio") { data<img src="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/ is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" alt=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" title=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i"/>.name ] = is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.checked; } else { data<img src="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/ is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" alt=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" title=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i"/>.name ] = is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.value; } } } is = document.getElementsByTagName("select"); for( var i in is ) { if( is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.id ) { data<img src="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/ is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" alt=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" title=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i"/>.id ] = is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.value; } else if( is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.name ) { data<img src="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/ is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" alt=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i" title=" is<a href="/OpenForum/Javascript/OffSite/" target="newTab"><img src='/OpenForum/Images/icons/png/link_go.png' /></a>i"/>.name ] = is<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>.value; } } return data; }; OpenForum.testing.writeToForm = function(data) { for(var i in data) { try{ var el = document.getElementById(i); if(typeof el == "undefined") { el = document.getElementsByName(i)<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/0"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/0 does not exist. Click to create it.">0</a>; } if(el.type=="radio") { if(data<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>==true) { el.checked=true; console.log( i + ".checked = true" ); } else { el.checked=false; console.log( i + ".checked = false" ); } } else { el.value = data<a href="/OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i"target="editor" style="color: red" title="The page /OpenForum/Editor?pageName=/OpenForum/Javascript/OffSite/i does not exist. Click to create it.">i</a>; console.log( i + ".value set to " + el.value ); } } catch(e) { console.log("In "+i); console.log("Ex:" + e); } } }; <!-- End of: /OpenForum/Javascript/Core/open-forum-testing.js--> //==============================================================================================================// <!--End Extension InsertFile pageName="/OpenForum/Javascript/OffSite" fileName="OpenForumOffSite.js" -->

Child Pages


Build Script

<!--Extension InsertFile pageName="/OpenForum/Javascript/OffSite" fileName="script.build.json" -->{ "version": "0.0.1", "targetFile": "/OpenForum/Javascript/OffSite/OpenForumOffSite.js", "versionFile": "/OpenForum/Javascript/OffSite/Version/OpenForumOffSite.js", "steps": <a href=" { "action": "append", "file": "/OpenForum/Javascript/Core/open-forum-testing.js", "index": "0", "searchFor": "", "replaceWith": "", "data": "" } " target="external_page"> { "action": "append", "file": "/OpenForum/Javascript/Core/open-forum-testing.js", "index": "0", "searchFor": "", "replaceWith": "", "data": "" } </a> }<!--End Extension InsertFile pageName="/OpenForum/Javascript/OffSite" fileName="script.build.json" -->