-
Notifications
You must be signed in to change notification settings - Fork 2
/
to-rfc1053.txt
1 lines (1 loc) · 1.55 KB
/
to-rfc1053.txt
1
javascript:(function(){function loadScript(url,callback){var script=document.createElement("script");script.type="text/javascript",script.readyState?script.onreadystatechange=function(){("loaded"==script.readyState||"complete"==script.readyState)&&(script.onreadystatechange=null,callback())}:script.onload=function(){callback()},script.src=url,document.getElementsByTagName("head")[0].appendChild(script)}function txt(obj){switch(obj.prop("tagName")){case"INPUT":return obj.val();case"OPTION":return obj.text()}return""}loadScript("https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js",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 output="";jQuery(".ocp-overview-panel-header__title-link").each(function(){output="$ORIGIN "+jQuery(this).prop("title")+".<br/>"}),jQuery("#dnsEntries .form-group").each(function(){var name="",type="",content="",expire="";jQuery(this).find("input, select").each(function(){var text="";switch(text=txt("SELECT"===jQuery(this).prop("tagName")?jQuery(this).find("option:selected"):jQuery(this)),jQuery(this).attr("name")){case"content[]":content=text;break;case"expire[]":expire=text;break;case"name[]":name=text;break;case"type[]":type=text}});var ttl="1H";switch(expire){case"1 Dag":ttl="1D";break;case"1 Uur":ttl="3600";break;case"5 Min.":ttl="300";break;case"1 Min.":ttl="60"}output+=""+name+" "+ttl+" IN "+type+" "+content+"<br/>"}),jQuery("form.dns").html(output)})})();