Skip to content

Instantly share code, notes, and snippets.

@dvygolov
Created November 18, 2021 16:27
Show Gist options
  • Save dvygolov/caa5ba9b5fbcaa640390db2a243b7abf to your computer and use it in GitHub Desktop.
Save dvygolov/caa5ba9b5fbcaa640390db2a243b7abf to your computer and use it in GitHub Desktop.
A browser bookmark for Freenom site to quickly change all DNS-records and IP-address when getting new sites
javascript: (function(){
var curIp='5.101.153.15';
var dnsValue='ns1.beget.com';
var dns2Value='ns2.beget.com';
var periods=document.querySelectorAll('.select_period');
periods.forEach(function(period){
period.value='12M';
});
var dnses=document.querySelectorAll('.useDNS');
dnses.forEach(function(dns){
dns.click();
});
var ownDnses=document.querySelectorAll('.useOwnDNS');
ownDnses.forEach(function(oDns){
oDns.click();
});
var dnses=document.querySelectorAll('.dnsname_input');
var curValue=dnsValue;
dnses.forEach(function(dns){
dns.setAttribute('value',curValue);
curValue=(curValue==dnsValue?dns2Value:dnsValue);
});
var ips=document.querySelectorAll('.dnsip_input');
ips.forEach(function(ip){
ip.setAttribute('value',curIp);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment