User:Connel MacKenzie/setpreferences.js

/* Originally, this was going to "silently" open a link, create/edit the page Special:Mypage/Preferences, etc. Now, instead, I'll just link to the page desired. If this javascript detects that we are at that page, in edit mode, it will save the page. If this javascript detects that we are at that page, not in edit mode, it will attempt to close the window. That way, I don't mess with any of the quazi-encryption stuff.

get pagetitle if (pagetitle.search(/Preferences/g) != -1 ) {

loop through button objects <form name="createbox"... find preload name 2nd child <input name="preload" value="Wiktionary..." find cookie value set inputbox's input box's value = cookie value as TRUE/FALSE <input class="CreateboxInput" value="" find button action set the object's onclick action to toggle that cookie }

function saveMyWiktPref { return; }

$( saveMyWiktPref );