Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //// Google Analytics
- //var _gaq = _gaq || [];
- //_gaq.push(['_setAccount', 'UA-55249638-2']);
- //_gaq.push(['_trackPageview']);
- ///*(function() {
- // var ga = document.createElement('script');
- // ga.type = 'text/javascript'; ga.async = true;
- // ga.src = 'https://ssl.google-analytics.com/ga.js';
- // var s = document.getElementsByTagName('script')[0];
- // s.parentNode.insertBefore(ga, s);
- //})();*/
- //function trackButtonClick(e) {
- // _gaq.push(['_trackEvent', e.target.id, 'clicked']);
- //};
- //var buttons = document.querySelectorAll('button');
- //for( var i = 0; i < buttons.length; i++ ) {
- // buttons[i].addEventListener('click', trackButtonClick);
- //}
- // Theme
- var formalyseThemeHead = localStorage["formalyseThemeHead"]; // darkkhaki
- var formalyseThemeAction = localStorage["formalyseThemeAction"]; // khaki
- var formalyseThemeMain = localStorage["formalyseThemeMain"]; // palegoldenrod
- function getTheme() {
- // valid colors are darkkhaki, blue and red
- if( formalyseThemeHead != undefined && (formalyseThemeHead == "darkkhaki" || formalyseThemeHead == "cornflowerblue" || formalyseThemeHead == "#f70000") ) {
- document.getElementById("formalyseDefaultThemeHead").value = formalyseThemeHead;
- document.getElementById("formalyseDefaultThemeAction").value = formalyseThemeAction;
- document.getElementById("formalyseDefaultThemeMain").value = formalyseThemeMain;
- }
- }
- document.addEventListener(
- 'DOMContentLoaded', function() {
- var checkPageButton = document.getElementById('formalyseStart');
- var infoText = document.getElementById('formalyseInfo');
- var disableButtons = document.getElementById('formalyseButtons');
- var setGoldButton = document.getElementById('setGold');
- var setBlueButton = document.getElementById('setBlue');
- var setRedButton = document.getElementById('setRed');
- var result;
- var lockPath = chrome.extension.getURL('lock_icon.gif');
- var showHidden = chrome.extension.getURL('eye.png');
- var showHiddenRed = chrome.extension.getURL('eye_red.png');
- var optionUncheck = chrome.extension.getURL('option_uncheck.png');
- var postGetSwitch = chrome.extension.getURL('post_get.png');
- // disable extension on "chrome://"-sites
- chrome.tabs.getSelected(null, function(tab){
- var str = tab.url, n = 0, m = 0, o = 0;
- n = str.search("chrome.google.com/");
- m = str.search("chrome://");
- o = str.search("chrome-extension://");
- if( n > -1 || m > -1 || o > -1 ) {
- disableButtons.style.display = "none";
- infoText.style.display = "block";
- }
- // console.log(tab);
- });
- setGoldButton.addEventListener('click', function() {
- document.getElementById("formalyseDefaultThemeHead").value = localStorage["formalyseThemeHead"] = "darkkhaki";
- document.getElementById("formalyseDefaultThemeAction").value = localStorage["formalyseThemeAction"] = "khaki";
- document.getElementById("formalyseDefaultThemeMain").value = localStorage["formalyseThemeMain"] = "palegoldenrod";
- // alert("gold");
- }, false);
- setBlueButton.addEventListener('click', function() {
- document.getElementById("formalyseDefaultThemeHead").value = localStorage["formalyseThemeHead"] = "cornflowerblue";
- document.getElementById("formalyseDefaultThemeAction").value = localStorage["formalyseThemeAction"] = "#bddbff";
- document.getElementById("formalyseDefaultThemeMain").value = localStorage["formalyseThemeMain"] = "#e7f4ff";
- // alert("blue");
- }, false);
- setRedButton.addEventListener('click', function() {
- document.getElementById("formalyseDefaultThemeHead").value = localStorage["formalyseThemeHead"] = "#f70000";
- document.getElementById("formalyseDefaultThemeAction").value = localStorage["formalyseThemeAction"] = "#f5b5b5";
- document.getElementById("formalyseDefaultThemeMain").value = localStorage["formalyseThemeMain"] = "#fddede";
- // alert("red");
- }, false);
- checkPageButton.addEventListener('click', function() {
- chrome.tabs.query({
- currentWindow: true,
- active: true
- },
- function(tabs) {
- formalyseThemeHead = document.getElementById("formalyseDefaultThemeHead").value;
- formalyseThemeAction = document.getElementById("formalyseDefaultThemeAction").value;
- formalyseThemeMain = document.getElementById("formalyseDefaultThemeMain").value;
- chrome.tabs.executeScript(
- {code: '\n\
- if( formInfoApp ) {\n\
- formInfoApp.close();\n\
- }\n\
- var centerTop = 100;//parseInt((window.screen.availHeight - 700) / 2);\n\
- var centerLeft = 100;//parseInt((window.screen.availWidth - 800) / 2);\n\
- var formInfoApp = window.open("", "formInfoApp", "width=800,height=700,top="+centerTop+",left="+centerLeft+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no");\n\
- counter = 1;\n\
- formInfoApp.document.write("<html><head><title>Formalyse</title>");\n\
- formInfoApp.document.writeln("<script>");\n\
- formInfoApp.document.writeln("var blinkAllowed = 1;");\n\
- // isFrame=boolean, h=frameNr, i=formularNr, j=elementNr, k=ImageElementNr \n\
- formInfoApp.document.writeln("function blinkElement( isFrame, h, i, j, k ) {");\n\
- formInfoApp.document.writeln(" var timer = 0;");\n\
- formInfoApp.document.writeln(" if( blinkAllowed ) {");\n\
- formInfoApp.document.writeln(" blinkAllowed = 0;");\n\
- // formInfoApp.document.writeln(" alert(isFrame+\\"-\\"+h+\\"-\\"+i+\\"-\\"+j+\\"-\\"+k);");\n\
- formInfoApp.document.writeln(" if( isFrame == 0 ) {");\n\
- formInfoApp.document.writeln(" domPath = window.opener.document.forms;");\n\
- formInfoApp.document.writeln(" } else {");\n\
- formInfoApp.document.writeln(" domPath = window.opener.window.frames[h].document.forms;");\n\
- formInfoApp.document.writeln(" }");\n\
- formInfoApp.document.writeln(" if( k > 0 ) {");\n\
- // formInfoApp.document.writeln(" alert(isFrame+\\"-\\"+h+\\"-\\"+i+\\"-\\"+j+\\"-\\"+k);");\n\
- formInfoApp.document.writeln(" var inputs = domPath[i].getElementsByTagName(\\"input\\");");\n\
- formInfoApp.document.writeln(" var elementStyle1 = inputs[k].style;");\n\
- formInfoApp.document.writeln(" oldVisibility = elementStyle1.visibility;");\n\
- formInfoApp.document.writeln(" for(var x=0; x<3; x++) {");\n\
- formInfoApp.document.writeln(" setTimeout(function() {elementStyle1.visibility=\'hidden\';}, timer+=100);");\n\
- formInfoApp.document.writeln(" setTimeout(function() {elementStyle1.visibility=oldVisibility;}, timer+=100);");\n\
- formInfoApp.document.writeln(" }");\n\
- formInfoApp.document.writeln(" elementStyle1.visibility=oldVisibility;");\n\
- formInfoApp.document.writeln(" } else {");\n\
- formInfoApp.document.writeln(" oldVisibility = domPath[i][j].style.visibility;");\n\
- formInfoApp.document.writeln(" oldColor = domPath[i][j].style.backgroundColor;");\n\
- formInfoApp.document.writeln(" domPath[i][j].style.backgroundColor = \\"#de010a\\";");\n\
- formInfoApp.document.writeln(" for(var x=0; x<3; x++) {");\n\
- formInfoApp.document.writeln(" setTimeout(function() {domPath[i][j].style.visibility=\'hidden\';}, timer+=100);");\n\
- formInfoApp.document.writeln(" setTimeout(function() {domPath[i][j].style.visibility=oldVisibility;}, timer+=100);");\n\
- formInfoApp.document.writeln(" }");\n\
- formInfoApp.document.writeln(" setTimeout(function() {domPath[i][j].style.backgroundColor=oldColor;}, timer+=100);");\n\
- formInfoApp.document.writeln(" }");\n\
- formInfoApp.document.writeln(" setTimeout(\\"blinkAllowed = 1;\\", timer+=100);");\n\
- formInfoApp.document.writeln(" }");\n\
- formInfoApp.document.writeln("}");\n\
- \n\
- formInfoApp.document.writeln("function formOverlayShow(form) {");\n\
- formInfoApp.document.writeln(" form.style.position = \\"relative\\";");\n\
- formInfoApp.document.writeln(" var formComputed=getComputedStyle(form);");\n\
- // height\n\
- formInfoApp.document.writeln(" var height = formComputed.height;");\n\
- formInfoApp.document.writeln(" var heightOff = form.offsetHeight;");\n\
- formInfoApp.document.writeln(" if( height == \\"auto\\" ) {");\n\
- formInfoApp.document.writeln(" if( Number.isInteger(heightOff) ) {");\n\
- formInfoApp.document.writeln(" if( heightOff > 15 ) {");\n\
- formInfoApp.document.writeln(" height = heightOff;");\n\
- formInfoApp.document.writeln(" } else {");\n\
- formInfoApp.document.writeln(" height = 15;");\n\
- formInfoApp.document.writeln(" }");\n\
- formInfoApp.document.writeln(" } else {");\n\
- formInfoApp.document.writeln(" height = heightInt;");\n\
- formInfoApp.document.writeln(" }");\n\
- formInfoApp.document.writeln(" } else {");\n\
- formInfoApp.document.writeln(" var heightInt = parseInt(height);");\n\
- formInfoApp.document.writeln(" if( heightInt < 15 ) heightInt = 15;");\n\
- formInfoApp.document.writeln(" height = heightInt;");\n\
- formInfoApp.document.writeln(" }");\n\
- // width\n\
- formInfoApp.document.writeln(" var width = formComputed.width;");\n\
- formInfoApp.document.writeln(" var widthOff = form.offsetWidth;");\n\
- formInfoApp.document.writeln(" if( width == \\"auto\\" ) {");\n\
- formInfoApp.document.writeln(" if( Number.isInteger(widthOff) ) {");\n\
- formInfoApp.document.writeln(" width = widthOff;");\n\
- formInfoApp.document.writeln(" if( widthOff < 25 ) {width = 25;}");\n\
- formInfoApp.document.writeln(" } else {");\n\
- formInfoApp.document.writeln(" width = 25;");\n\
- formInfoApp.document.writeln(" }");\n\
- formInfoApp.document.writeln(" } else {");\n\
- formInfoApp.document.writeln(" var widthInt = parseInt(width);");\n\
- formInfoApp.document.writeln(" if( widthInt < 25 ) {widthInt = 25;}");\n\
- formInfoApp.document.writeln(" width = widthInt;");\n\
- formInfoApp.document.writeln(" }");\n\
- // top/left\n\
- formInfoApp.document.writeln(" var formalyseDivOver2 = \\"<div name=\'formalyseDivOver\' style=\'background-color:green;width:\\"+width+\\"px;height:\\"+height+\\"px;left: 0;top: 0;position:absolute;opacity:0.5;z-index: 9999;\'> </div>\\"");\n\
- formInfoApp.document.writeln(" form.insertAdjacentHTML(\\"afterbegin\\", formalyseDivOver2);");\n\
- formInfoApp.document.writeln("}");\n\
- \n\
- formInfoApp.document.writeln("function formOverlayHide(frame, form) {");\n\
- formInfoApp.document.writeln(" form.style.position = \\"\\";");\n\
- formInfoApp.document.writeln(" var elements = frame.getElementsByName(\\"formalyseDivOver\\");");\n\
- formInfoApp.document.writeln(" while(elements.length > 0){");\n\
- formInfoApp.document.writeln(" elements[0].parentNode.removeChild(elements[0]);");\n\
- formInfoApp.document.writeln(" }");\n\
- formInfoApp.document.writeln("}");\n\
- // Popup Bildvorschau\n\
- formInfoApp.document.writeln("function formalyseWindowOpen(url, width, height) {");\n\
- formInfoApp.document.writeln(" width = parseInt(width);");\n\
- formInfoApp.document.writeln(" height = parseInt(height);");\n\
- formInfoApp.document.writeln(" if( width < 400 ) width = 400;");\n\
- formInfoApp.document.writeln(" if( height < 250 ) height = 250;");\n\
- formInfoApp.document.writeln(" var centerTop = 200;//parseInt((window.screen.availHeight - height) / 2);");\n\
- formInfoApp.document.writeln(" var centerLeft = 200;//parseInt((window.screen.availWidth - width) / 2);");\n\
- formInfoApp.document.writeln(" window.open(url, \\"imgWindow\\", \\"width=\\"+width+\\",height=\\"+height+\\",top=\\"+centerTop+\\",left=\\"+centerLeft+\\",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no\\");");\n\
- formInfoApp.document.writeln("}");\n\
- formInfoApp.document.writeln("</script>");\n\
- formInfoApp.document.write("</head><body>");\n\
- if( document.forms.length > 0 ) {\n\
- formInfoApp.document.write("<table border=1 width=\'100%\' style=\'font-family: arial;font-size: 12px;border-collapse: collapse;background-color: '+formalyseThemeMain+';table-layout: fixed;\'>");\n\
- formInfoApp.document.write("<colgroup><col width=\'23\'><col width=\'85\'><col width=\'165\'><col width=\'*\'></colgroup>");\n\
- for(var i = 0; i < document.forms.length; i++) {\n\
- analyseDocument(document.forms[i], 0);\n\
- }\n\
- formInfoApp.document.write("</table>");\n\
- }\n\
- if( window.frames.length > 0 ) {\n\
- formInfoApp.document.write("<table border=1 width=\'100%\' style=\'font-family: arial;font-size: 12px;border-collapse: collapse;background-color: '+formalyseThemeMain+';table-layout: fixed;\'>");\n\
- formInfoApp.document.write("<colgroup><col width=\'23\'><col width=\'85\'><col width=\'165\'><col width=\'*\'></colgroup>");\n\
- var frames = window.frames;\n\
- for(var h = 0; h < frames.length; h++) {\n\
- // formInfoApp.document.write("xxx-"+h+"-"+(typeof frames)+"<br>");\n\
- if( typeof frames === \'object\' ) {\n\
- for(var i = 0; i < frames[h].document.forms.length; i++) {\n\
- // formInfoApp.document.write("yyy-"+h+"-"+i+"<br>");\n\
- analyseDocument(frames[h].document.forms[i], 1, h);\n\
- }\n\
- }\n\
- }\n\
- formInfoApp.document.write("</table>");\n\
- }\n\
- if( document.forms.length <= 0 && window.frames.length <= 0 ) {\n\
- formInfoApp.document.write("nothing found");\n\
- }\n\
- formInfoApp.document.write("</body></html>");\n\
- \n\
- // FUNCTION: \n\
- function analyseDocument(documentForms, isFrame, frameNr) {\n\
- var regxpr = /(<([^>]+)>)/ig; /* RegExp: replace um HTML zu entfernen */\n\
- if( isFrame == 0 ) {\n\
- domPath = "window.opener.document.forms";\n\
- framePath = "window.opener.document";\n\
- rowspan = 4;\n\
- } else {\n\
- domPath = "window.opener.window.frames["+h+"].document.forms";\n\
- framePath = "window.opener.window.frames["+h+"].document";\n\
- rowspan = 5;\n\
- }\n\
- if( documentForms.name == "" ) {\n\
- formName = "<i>n/a</i>";\n\
- } else {\n\
- formName = documentForms.name;\n\
- }\n\
- formInfoApp.document.write("<tr style=\'background-color: '+formalyseThemeHead+';\' onMouseover=\'formOverlayShow("+domPath+"["+i+"]);\' onMouseout=\'formOverlayHide("+framePath+", "+domPath+"["+i+"]);\'><td colspan=4><h2 style=\'margin: 0;\'>Name: <u style=\'cursor: pointer;color: #224A7D;\' title=\'click to mark form in webpage\' onClick=\'"+domPath+"["+i+"].style.backgroundColor=\\"rgba(255, 255, 0, 0.2)\\";"+domPath+"["+i+"].style.border=\\"3px dotted green\\";\'>"+formName+"</u></h2></td></tr>");\n\
- if( documentForms.getAttribute("action") == "" ) {\n\
- formAction = "<i>n/a</i>";\n\
- } else {\n\
- formAction = documentForms.getAttribute("action");\n\
- }\n\
- formInfoApp.document.write("<tr><td colspan=2 style=\'background-color: '+formalyseThemeAction+';\'> <b>action:</b></td><td colspan=2 style=\'word-wrap: break-word;\'>"+formAction+"</td></tr>");\n\
- formInfoApp.document.write("<tr>");\n\
- formInfoApp.document.write("<td colspan=2 style=\'background-color: '+formalyseThemeAction+';\'>");\n\
- formInfoApp.document.write(" <b>method:</b>");\n\
- formInfoApp.document.write("<img src=\''+postGetSwitch+'\' align=\'right\' style=\'vertical-align: middle;cursor: pointer;padding: 0 2px;\' title=\'click to toggle post/get\' onclick=\'document.getElementById(\\"method_"+counter+"\\").style.color=\\"blue\\";if("+domPath+"["+i+"].method==\\"post\\"){"+domPath+"["+i+"].method=\\"get\\";document.getElementById(\\"method_"+counter+"\\").innerText=\\"get\\";}else{"+domPath+"["+i+"].method=\\"post\\";document.getElementById(\\"method_"+counter+"\\").innerText=\\"post\\";}\'>");\n\
- formInfoApp.document.write("</td>");\n\
- formInfoApp.document.write("<td><span id=\'method_"+counter+"\'>"+documentForms.method+"</span> <b style=\'color: blue;float: right;\'>[initial: "+documentForms.method+"] </b></td>");\n\
- ++counter;\n\
- formInfoApp.document.write("<td style=\'margin: 0;padding: 0;\'>");\n\
- formInfoApp.document.write("<table border=0 width=\'100%\' style=\'font-family: arial;font-size: 12px;border-collapse: collapse;background-color: '+formalyseThemeMain+';table-layout: fixed;\'><tr>");\n\
- formInfoApp.document.write("<td style=\'background-color: '+formalyseThemeAction+';width: 110px;border-right: 1px solid black;\'><b>id:</b></td>");\n\
- formInfoApp.document.write("<td>"+documentForms.id+"</td>");\n\
- formInfoApp.document.write("</tr></table>");\n\
- formInfoApp.document.write("</tr>");\n\
- formInfoApp.document.write("<tr>");\n\
- formInfoApp.document.write("<td colspan=2 style=\'background-color: '+formalyseThemeAction+';\'> <b><i>form[n]:</i></b></td>");\n\
- formInfoApp.document.write("<td>"+i+"</td>");\n\
- formInfoApp.document.write("<td style=\'margin: 0;padding: 0;\'>");\n\
- formInfoApp.document.write("<table border=0 width=\'100%\' style=\'font-family: arial;font-size: 12px;border-collapse: collapse;background-color: '+formalyseThemeMain+';table-layout: fixed;\'><tr>");\n\
- formInfoApp.document.write("<td style=\'background-color: '+formalyseThemeAction+';width: 110px;border-right: 1px solid black;\'><b>onSubmit:</b></td>");\n\
- formOnSubmit = documentForms.getAttribute("onsubmit");\n\
- if( formOnSubmit === null ) {\n\
- formOnSubmit = "<i>n/a</i>";\n\
- }\n\
- formInfoApp.document.write("<td>"+formOnSubmit+"</td>");\n\
- formInfoApp.document.write("</tr></table>");\n\
- formInfoApp.document.write("</tr>");\n\
- if( isFrame == 1 ) {\n\
- formInfoApp.document.write("<tr><td colspan=2 style=\'background-color: '+formalyseThemeAction+';\'> <b><i>frame[n]:</i></b></td><td colspan=2>"+frameNr+"</td></tr>");\n\
- }\n\
- formInfoApp.document.write("<tr style=\'background-color: '+formalyseThemeHead+';\'><td><b style=\'font-size: 14px;\'>Ix</b></td><td><b style=\'font-size: 14px;\'>Type</b></td><td><b style=\'font-size: 14px;\'>Name</b></td><td><b style=\'font-size: 14px;\'>Value</b></td></tr>");\n\
- for(var j = 0; j < documentForms.length; j++) {\n\
- if( documentForms[j].type != "fieldset" ) {\n\
- inputLine = documentForms[j].outerHTML;\n\
- inputLine = inputLine.replace(/\"/g, \'\\"\').replace(/\'\/g, "\\"").replace(/\\t+/g, "").replace(/\\n\\t*\\n/g, "\\n").replace(/><\\/select/g, ">\\n<\\/select").replace(/><option/g, "> - <option");\n\
- if( frameNr == undefined ) {frameNrType = 1;} else {frameNrType = frameNr}\n\
- formInfoApp.document.write("<tr title=\'"+inputLine+"\' style=\'cursor: help;\'><td align=\'center\' style=\'cursor: pointer;\' title=\'click to blink element\' onClick=\'blinkElement("+isFrame+", "+h+", "+i+", "+j+", 0);\'><u style=\'cursor: pointer;color: #224A7D;\'>"+j+"</u></td><td>");\n\
- if( documentForms[j].type == "hidden" ) {\n\
- formInfoApp.document.write("<img src=\''+showHidden+'\' align=\'right\' style=\'vertical-align: middle;cursor: pointer;padding: 0 1px;\' title=\'click to toggle hidden/text\' onClick=\'document.getElementById(\\"type_"+frameNrType+"_"+i+"_"+j+"\\").style.color=\\"blue\\";"+domPath+"["+i+"]["+j+"].style.backgroundColor=\\"#f7f7c4\\";"+domPath+"["+i+"]["+j+"].style.color=\\"#ff002b\\";if("+domPath+"["+i+"]["+j+"].getAttribute(\\"type\\") == \\"text\\") {"+domPath+"["+i+"]["+j+"].setAttribute(\\"type\\", \\"hidden\\");}else{"+domPath+"["+i+"]["+j+"].setAttribute(\\"type\\", \\"text\\");}"+domPath+"["+i+"]["+j+"].setAttribute(\\"title\\", \\""+documentForms[j].name+"\\");\'>");\n\
- } else if( documentForms[j].type == "password" ) {\n\
- formInfoApp.document.write("<img src=\''+showHiddenRed+'\' align=\'right\' style=\'vertical-align: middle;cursor: pointer;padding: 0 1px;\' title=\'click to show password\' onClick=\'document.getElementById(\\"type_"+frameNrType+"_"+i+"_"+j+"\\").style.color=\\"blue\\";"+domPath+"["+i+"]["+j+"].style.backgroundColor=\\"#f7f7c4\\";"+domPath+"["+i+"]["+j+"].style.color=\\"#ff002b\\";"+domPath+"["+i+"]["+j+"].setAttribute(\\"type\\", \\"text\\");"+domPath+"["+i+"]["+j+"].setAttribute(\\"title\\", \\""+documentForms[j].name+"\\");\'>");\n\
- } else if( documentForms[j].type == "radio" ) {\n\
- formInfoApp.document.write("<img src=\''+optionUncheck+'\' align=\'right\' style=\'vertical-align: middle;cursor: pointer;padding: 0 2px;\' title=\'click to deselect radiobutton\' onClick=\'document.getElementById(\\"type_"+frameNrType+"_"+i+"_"+j+"\\").style.color=\\"blue\\";"+domPath+"["+i+"]["+j+"].checked=false;\'>");\n\
- }\n\
- if( documentForms[j].readOnly ) {\n\
- formInfoApp.document.write("<img src=\''+lockPath+'\' align=\'right\' style=\'vertical-align: bottom;cursor: pointer;padding: 0 1px;\' title=\'click to unlock \\"readonly\\"\' onClick=\'document.getElementById(\\"type_"+frameNrType+"_"+i+"_"+j+"\\").style.color=\\"blue\\";"+domPath+"["+i+"]["+j+"].readOnly=false;"+domPath+"["+i+"]["+j+"].disabled=false;"+domPath+"["+i+"]["+j+"].style.backgroundColor=\\"#f7f7c4\\";"+domPath+"["+i+"]["+j+"].style.color=\\"#ff002b\\";\'>");\n\
- }\n\
- formInfoApp.document.write("<span id=\'type_"+frameNrType+"_"+i+"_"+j+"\' title=\'type_"+frameNrType+"_"+i+"_"+j+"\'>"+documentForms[j].type+"</span>");\n\
- if( documentForms[j].name == "" ) {\n\
- name_1 = "<i>n/a</i>";\n\
- } else {\n\
- name_1 = documentForms[j].name;\n\
- }\n\
- formInfoApp.document.write("</td><td style=\'overflow: hidden;\'>"+name_1+"</td>");\n\
- if( documentForms[j].type == "select-one" || documentForms[j].type == "select-multiple" ) {\n\
- // Select-List? \n\
- formInfoApp.document.write("<td style=\'overflow: hidden;\'>");\n\
- for(var k = 0; k < documentForms[j].length; k++) {\n\
- formInfoApp.document.write("<b>•</b> ""+documentForms[j].options[k].text+""   [<b>value:</b> "+documentForms[j].options[k].value+"]");\n\
- if( documentForms[j].options[k].selected ) {\n\
- formInfoApp.document.write(" <b style=\'color: blue;\'>[selected]</b>");\n\
- }\n\
- formInfoApp.document.write("<br>");\n\
- }\n\
- formInfoApp.document.write("</td>");\n\
- } else if( documentForms[j].type == "radio" || documentForms[j].type == "checkbox" ) {\n\
- // Radio-Buttons / Checkboxes? \n\
- formInfoApp.document.write("<td style=\'overflow: hidden;\'>");\n\
- formInfoApp.document.write(""+documentForms[j].value+"");\n\
- if( documentForms[j].checked ) {\n\
- if( documentForms[j].type == "radio" ) {\n\
- formInfoApp.document.write(" <b style=\'color: blue;\'>[selected]</b>");\n\
- } else if( documentForms[j].type == "checkbox" ) {\n\
- formInfoApp.document.write(" <b style=\'color: blue;\'>[checked]</b>");\n\
- }\n\
- }\n\
- formInfoApp.document.write("</td>");\n\
- } else if( documentForms[j].type == "submit" || documentForms[j].type == "button" ) {\n\
- if( documentForms[j].value && documentForms[j].value != "" ) {\n\
- submitValue = """+documentForms[j].value+""";\n\
- } else {\n\
- submitValue = "<i>n/a</i>";\n\
- }\n\
- if( documentForms[j].innerHTML ) {\n\
- formInfoApp.document.write("<td style=\'overflow: hidden;\'><b>value:</b> "+submitValue+"<br><b>innerHTML:</b> ""+documentForms[j].innerHTML.replace(regxpr, "")+""</td>");\n\
- } else {\n\
- formInfoApp.document.write("<td style=\'overflow: hidden;\'>"+submitValue+"</td>");\n\
- }\n\
- } else if( documentForms[j].type == "textarea" ) {\n\
- formInfoApp.document.write("<td style=\'overflow: hidden;\'>"+documentForms[j].value.replace(/</g, \'<\')+"</td>");\n\
- } else {\n\
- formInfoApp.document.write("<td style=\'overflow: hidden;\'>"+documentForms[j].value+"</td>");\n\
- }\n\
- formInfoApp.document.write("</tr>");\n\
- l=j;\n\
- }\n\
- }\n\
- // Suche: <input type="image" ...>\n\
- var inputs = documentForms.getElementsByTagName("input");\n\
- for(var k=0; k<inputs.length; k++){\n\
- if(inputs[k].getAttribute("type")=="image"){\n\
- //alert(inputs[k].getAttribute("src"));\n\
- inputLine = inputs[k].outerHTML;\n\
- inputLine = inputLine.replace(/\"/g, \'\\"\').replace(/\'\/g, "\\"").replace(/\\n/g, "").replace(/\\t/g, "").replace(/<option\/g, "\\n<option");\n\
- formInfoApp.document.write("<tr title=\'"+inputLine+"\' style=\'cursor: help;\'>");\n\
- formInfoApp.document.write(" <td align=\'center\' style=\'cursor: pointer;\' onClick=\'blinkElement("+isFrame+", "+h+", "+i+", "+j+", "+k+");\'><u style=\'cursor: pointer;color: #224A7D;\'>"+(++l)+"</u></td><td>image</td>");\n\
- if( typeof inputs[k].getAttribute("name") === "object" ) {\n\
- name_2 = "<i>n/a</i>";\n\
- } else {\n\
- name_2 = inputs[k].getAttribute("name");\n\
- }\n\
- formInfoApp.document.write(" <td>"+name_2+"</td>");\n\
- formInfoApp.document.write(" <td style=\'overflow: hidden;\'>");\n\
- if( inputs[k].getAttribute("value") && inputs[k].getAttribute("value") != "" ) {\n\
- formInfoApp.document.write(" <b>value: </b> "+inputs[k].getAttribute("value")+"<br>");\n\
- }\n\
- formInfoApp.document.write(" <b>src: </b> <u style=\'cursor: pointer;color: #224A7D;\' onClick=\'formalyseWindowOpen(\\""+inputs[k].getAttribute("src")+"\\", \\""+getComputedStyle(inputs[k]).width+"\\", \\""+getComputedStyle(inputs[k]).height+"\\");\'>"+inputs[k].getAttribute("src")+"</u><b style=\\"color: blue;float: right;\\">[click link to preview image]</b>");\n\
- formInfoApp.document.write(" </td>");\n\
- formInfoApp.document.write("</tr>");\n\
- }\n\
- }\n\
- formInfoApp.document.write("</table><br>");\n\
- formInfoApp.document.write("<table border=1 width=\'100%\' style=\'font-family: arial;font-size: 12px;border-collapse: collapse;background-color: '+formalyseThemeMain+';table-layout: fixed;\'>");\n\
- formInfoApp.document.write("<colgroup><col width=\'23\'><col width=\'85\'><col width=\'165\'><col width=\'*\'></colgroup>");\n\
- }\n\
- formInfoApp.document.close();'
- }
- );
- }
- );
- }, false);
- }, false
- );
- getTheme();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement