4chan Enhanced

By VIPPER Last update Nov 2, 2011 — Installed 4,736 times.

mods

in
Subscribe to mods 1 post, 1 voice

aeosynth User

I changed the sage/noko buttons into actual buttons instead of links, just for looks, and then I set it to clear the email field automatically, since sometimes I want to leave it blank, and sometimes people actually use it to communicate, like during the positron uprising.

/* Add sage/noko buttons */
newspan = d.createElement("span");

noko = d.createElement("input");
noko.value = "noko";
noko.type = "submit";
noko.setAttribute("onclick", "this.parentNode.previousSibling.previousSibling.value = 'noko';");
newspan.appendChild(noko);

sage = d.createElement("input");
sage.value = "sage";
sage.type = "submit";
sage.setAttribute("onclick", "this.parentNode.previousSibling.previousSibling.value = 'sage';");

newspan.appendChild(sage);

email = d.getElementsByName("email")[0];
email.value = '';
email.parentNode.appendChild(newspan);

note that since 4chan's been down, i haven't been able to test whether or not the sage/noko buttons actually submit posts.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel