-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathto-table.txt
1 lines (1 loc) · 1.04 KB
/
to-table.txt
1
javascript:(function(){var t,e,a;t="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js",e=function(){lastEntry=jQuery("#dnsEntries > .form-panels > .form-panel").last().find('input[name="name[]"]'),lastEntry.length>0&&""==lastEntry.val()&&jQuery("#dnsEntries > .form-panels > .form-panel").last().remove();var t='<table style="width:100%;"><thead><th>name</th><th>ttl</th><th>type</th><th>value</th></thead>',e="";jQuery("#dnsEntries .form-group").each(function(){var t="";jQuery(this).find("input, select option:selected").each(function(){t+="<td>"+function(t){switch(t.prop("tagName")){case"INPUT":return t.val();case"OPTION":return t.text()}return""}(jQuery(this))+"</td>"}),e+="\n<tr>"+t+"</tr>"}),t+="<tbody>"+e+"</tbody></table>",jQuery("form.dns").html(t)},(a=document.createElement("script")).type="text/javascript",a.readyState?a.onreadystatechange=function(){"loaded"!=a.readyState&&"complete"!=a.readyState||(a.onreadystatechange=null,e())}:a.onload=function(){e()},a.src=t,document.getElementsByTagName("head")[0].appendChild(a)})();