Skip to content

Instantly share code, notes, and snippets.

@octalmage
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save octalmage/628ae0639755ab59f308 to your computer and use it in GitHub Desktop.
Save octalmage/628ae0639755ab59f308 to your computer and use it in GitHub Desktop.
Add domains to MaxCDN whitelist.

How-to

  1. Put comma separated list of domains in the domains variable (no spaces).
  2. Run in JavaScript console.
var domains="one.com,two.com,three.com"
domains=domains.split(",");
var current=0;
process();
var t=setInterval(process, 1000)
function process()
{
console.log(domains[current])
$("#valid_referers_tag").click();
$("#valid_referers_tag").val(domains[current]);
e = jQuery.Event("keypress");
e.which = 13;
e.keyCode = 13;
$("#valid_referers_tag").trigger(e);
current++;
if (current>=domains.length)
{
clearInterval(t);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment