Rev 5 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
function openPage(pageName, elmnt) {var i, tablinks;// get snippet from servergetPage(pageName);// Remove the background color of all nav-links/buttonstablinks = document.getElementsByClassName("nav-link");for (i = 0; i < tablinks.length; i++) {tablinks[i].style.backgroundColor = "";}// Show the specific tab content and scroll to top/////document.getElementById(pageName).style.display = "block";document.body.scrollTop = document.documentElement.scrollTop = 0;// Change color for active buttonelmnt.style.backgroundColor = "#666";}function initIframes() {var iframeDefer = document.getElementsByTagName('iframe');for (var i = 0; i < iframeDefer.length; i++) {if (iframeDefer[i].getAttribute('data-src')) {iframeDefer[i].setAttribute('src', iframeDefer[i].getAttribute('data-src'));}}}window.onload = initIframes;jQuery(document).on('copy', function(e) {var sel = window.getSelection();var copyFooter = "<br /><br /> Source: <a href='" + document.location.href + "'>" + document.location.href + "</a>";var copyHolder = $('<div>', {html: sel+copyFooter, style: {position: 'absolute', left: '-99999px'}});$('body').append(copyHolder);sel.selectAllChildren( copyHolder[0] );window.setTimeout(function() {copyHolder.remove();},0);});function getPage(pageName) {$.post("getpage.php",{page: pageName},function(data, status) {if (status == "success") {document.getElementById("content").innerHTML = data;initIframes();}});}// Read url parameter or get the element with id="defaultOpen", and click on itvar parameterValue = null;var parameterPage = window.location.search.match(/(\?|&)page\=([^&]*)/);if (parameterPage !== null) {parameterValue = decodeURIComponent(parameterPage[2]);document.getElementById(parameterValue + "Open").click();} else {document.getElementById("defaultOpen").click();}