User:Josephyr/wikia.js

// ******************* // Custom adoption response buttons // ******************* if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://img3.wikia.nocookie.net/__cb20120729015330/callofduty/images/0/02/Blocked_button.png", "speedTip": "AdoptionResponse: Block ", "tagOpen": " Hello. It appears that you are currently blocked on another wiki, which may make you ineligible to adopt this one. You can explain the block here, [as a local block does not automatically disqualify someone from adopting, as Staff will review it. ",    "tagClose": "",     "sampleText": ""};  } if (wgAction == "edit" || wgAction == "submit") {   /***** Custom edit buttons *****/    if (mwCustomEditButtons) {            mwCustomEditButtons[mwCustomEditButtons.length] = {                "imageFile": "http://vignette1.wikia.nocookie.net/central/images/6/6a/Button_sup_letter.png/revision/latest?cb=20070329065456",                "speedTip": "AdoptionResponse: Another Adoption",                "tagOpen": " Hello! It appears that you have adopted another wiki within the previous 30 days. Unfortunately, this makes you ineligible to adopt this wiki 30 days from your last adoption has elapsed. So, just wait until 30 days passed from your last request, then you are free to make another request. ",                "tagClose": "",                "sampleText": ""};            mwCustomEditButtons[mwCustomEditButtons.length] = {                "imageFile": "http://vignette3.wikia.nocookie.net/central/images/6/65/Bottom.png/revision/latest?cb=20110102061427",                "speedTip": "AdoptionResponse: Blank",                "tagOpen": " ",                "tagClose": "",                "sampleText": ""};            mwCustomEditButtons[mwCustomEditButtons.length] = {                "imageFile": "http://vignette2.wikia.nocookie.net/central/images/4/49/Button_talk.png/revision/latest?cb=20080209054415",                "speedTip": "AdoptionResponse: Active Community",                "tagOpen": " Hi - as of this moment, there appears to be several other contributors at this wiki. If they continue to edit, according to the adoption guidelines, it is required that the adopting user make a blog/forum post/announcement of some sort explaining their intentions to adopt on an active wiki, so other users on the wiki can give their input, and comment. It's best to make a blog or forum about your adoption rather than individual messages so there can be consensus in one place (which makes it easier for Staff). Be sure to link it when you are done, and let it run for 1 week. If there is a consensus amongst the users for you to receive the rights, then you'll be eligible to adopt. ",                "tagClose": "",                "sampleText": ""};            mwCustomEditButtons[mwCustomEditButtons.length] = {                "imageFile": "http://vignette3.wikia.nocookie.net/central/images/f/fc/Button_user_talk.png/revision/latest?cb=20090511022917",                "speedTip": "AdoptionResponse: Active Community (2)",                "tagOpen": " Hey. Right now, there appears a few other contributors at this wiki. If they continue to contribute, according to the adoption guidelines, it is required that the adopting user make a blog/forum post/announcement of some sort explaining their intentions to adopt on an active wiki, so other users on the wiki can give their input, and comment on the leadership change. If you have already made one, please link it, and if not, you should create one, then link it. If there is a consensus amongst the users for you to receive the rights, then you'll be eligible to adopt. ",                "tagClose": "",                "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette1.wikia.nocookie.net/central/images/f/fd/Button_blockquote.png/revision/latest?cb=20070407041237", "speedTip": "AdoptionResponse: Everything", "tagOpen": " Hello - as of now, there appears to be several other contributors at this wiki. If they continue to contributote, according to the adoption guidelines, it is required that the adopting user make a blog/forum post/announcement of some sort explaining their intentions to adopt on an active wiki, so other users on the wiki can give their input, and comment. Be sure to link it when you are done, and let it run for 1 week. If there is a consensus amongst the users for you to receive the rights, then you'll be eligible to adopt. Also, in order to adopt the wiki, you will need to edit there regularly, every day or two for at least a week. Try to edit from now on, and by the time this request is viewed by Staff, you should meet the requirement. ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette2.wikia.nocookie.net/central/images/c/c7/B.WARNING_1.png/revision/latest?cb=20110102062219", "speedTip": "AdoptionResponse: 1 Week", "tagOpen": " Ahoy - one of the critical requirements for adopting a wiki is 1 solid week of active editing (i.e. making new pages, fixing up articles, adding content, building the wiki). If you edit at least every day or two while you wait for this request to be processed, (which ranges from 7-10 days), you should meet that requirement. It doesn't have to be a lot of edits each day, it is just the *frequency* of the edits that Staff needs to see, to show your investment and commitment to the wiki. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette3.wikia.nocookie.net/central/images/5/54/B.WARNING_2.png/revision/latest?cb=20110102062220", "speedTip": "AdoptionResponse: 1 Week (2)", "tagOpen": " Howdy - in order to adopt the wiki, you will need to edit there regularly, every day or two for 1 solid week straight and create 1 mainspace page. Try to edit from now on, and by the time this request is viewed by Staff, you should meet the requirement. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette3.wikia.nocookie.net/central/images/a/ab/A.WARNING_end.png/revision/latest?cb=20110102062220", "speedTip": "AdoptionResponse: 1 Week (3)", "tagOpen": " One of the most important requirements to adopt is active editing for 1 week, and Staff needs to see you do this, otherwise the request won't be passed. The good news is that these requests take 1-2 weeks, so you have plenty of time to edit, and meet the requirement if you daily edit. ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette2.wikia.nocookie.net/central/images/1/13/Button_enter.png/revision/latest?cb=20070324060224", "speedTip": "AdoptionResponse: 1 Week (4)", "tagOpen": " Ahoy- your contributions look good, but it seems you've just returned to editing again. Since adoptions require 1 solid week of active editing, try to consistently contribute while you wait for this request to be processed, and you should be good to go. ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette4.wikia.nocookie.net/central/images/1/11/Btn_toolbar_liste.png/revision/latest?cb=20070329064826", "speedTip": "AdoptionResponse: Reminder to Edit", "tagOpen": " Ahoy! You've done a splendid job with your edits thus far - kudos! Just remember to keep editing while this request is processed (which takes from 1-14 days) and you should have a successful request. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette1.wikia.nocookie.net/central/images/2/29/Button_user.png/revision/latest?cb=20080208025052", "speedTip": "AdoptionResponse: Admin", "tagOpen": " Hi there. The most basic and prime rule about adopting a wiki is for none of the admins to be inactive for 60 days. But it appears that a bureaucrat has edited within that timeframe. This makes the wiki ineligible to adopt. However, you can request for a promotion from the active bureaucrat. If you choose to directly request the rights from them, you should check out this blog written by Sannse, which provides stellar advice on receiving rights. ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette4.wikia.nocookie.net/central/images/b/bb/Seealso.png/revision/latest?cb=20081020112924", "speedTip": "AdoptionResponse: Admin 2", "tagOpen": " Hey - the wiki isn't eligable for adoption, due to a bureaucrat editing within the past 60 days. If you want to receive rights on the wiki, you'll need to contact them. ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette4.wikia.nocookie.net/central/images/2/23/Button_wait.png/revision/latest?cb=20080111190106", "speedTip": "AdoptionResponse: How Long", "tagOpen": " Adoption requests are evaluated in the order received, which takes 7 to 14 days or so. Just be patient, and continue to actively edit. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/__cb20100502153421/callofduty/images/8/8b/Button_Vvandal.jpg", "speedTip": "AdoptionResponse: VSTF", "tagOpen": " Hello there. If you have issues with an active spammer/vandal/user adding false information, contact the VSTF at their wiki, and they can help you deal with the troublemaker while you wait to receive the rights. ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette1.wikia.nocookie.net/central/images/4/4a/Button_table.png/revision/latest?cb=20070329065459", "speedTip": "AdoptionResponse: Logged Admin", "tagOpen": " Hey there. A bureaucrat, while not active on the wiki, last *logged on* just the other day. If *I* may make a suggestion, you should message them asking for the rights. You never know, you just might get them sooner. If you choose to directly request the rights from them, you should check out this blog written by Sannse, which provides stellar advice on receiving rights. ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette4.wikia.nocookie.net/central/images/f/f7/Button_comment1.png/revision/latest?cb=20080111185919", "speedTip": "AdoptionResponse: Returning Admin", "tagOpen": " Hullo - you'll need to leave the admin a message about you adopting, as they have returned. If they don't respond to your request, Staff will most likely give you admin rights, and will hand out bureaucratic rights after 60 days have passed since the founder's last edit. (see this adoption for a similar situation). ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette3.wikia.nocookie.net/central/images/5/58/Button_small.png/revision/latest?cb=20081020113836", "speedTip": "AdoptionResponse: Admin, Not 'Crat", "tagOpen": " Hello - the most basic and prime rule about adopting a wiki is for none of the admins to be inactive for 60 days. But there appears to be an active admin, this makes the wiki techncially ineligible to adopt. Since they do not posses the bureaucratic rights to promote other users, they can either endorse your adoption so that you'll receive the rights, or they can create their own to receive bureaucratic rights, and promote others. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette1.wikia.nocookie.net/flags/images/c/cb/Mexico.svg/revision/latest/scale-to-width/300?cb=20081022191619", "speedTip": "AdoptionResponse: Spanish Adoptions", "tagOpen": " Hi - Spanish adoptions are handled here. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette4.wikia.nocookie.net/flags/images/a/a0/Germany.svg/revision/latest/scale-to-width/300?cb=20080610122129", "speedTip": "AdoptionResponse: German Adoptions", "tagOpen": " Hi - German adoptions are handled here. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette2.wikia.nocookie.net/flags/images/9/98/France.svg/revision/latest/scale-to-width/300?cb=20100228180001", "speedTip": "AdoptionResponse: French Adoptions", "tagOpen": " French adoptions are handled here. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette4.wikia.nocookie.net/flags/images/3/35/Russia.svg/revision/latest/scale-to-width/300?cb=20080426150357", "speedTip": "AdoptionResponse: Russian Adoptions", "tagOpen": " Hi - Russian adoptions are handled here. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette1.wikia.nocookie.net/flags/images/5/57/Italy.svg/revision/latest/scale-to-width/300?cb=20071201212612", "speedTip": "AdoptionResponse: Italian Adoptions", "tagOpen": " Hi - Italian adoptions are handled here. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette1.wikia.nocookie.net/flags/images/4/4d/Poland.svg/revision/latest/scale-to-width/300?cb=20081204000950", "speedTip": "AdoptionResponse: Polish Adoptions", "tagOpen": " Hi - Polish adoptions are handled here. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette4.wikia.nocookie.net/flags/images/4/4a/Netherlands.svg/revision/latest/scale-to-width/300?cb=20071218203236", "speedTip": "AdoptionResponse: Dutch Adoptions", "tagOpen": " Hi - Dutch adoptions are handled here. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette2.wikia.nocookie.net/flags/images/f/f9/Portugal.svg/revision/latest?cb=20081203223406", "speedTip": "AdoptionResponse: Portugal Adoptions", "tagOpen": " Hi - Portugese adoptions are handled here. ", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://vignette1.wikia.nocookie.net/flags/images/4/4a/China.svg/revision/latest/scale-to-width/300?cb=20090207152627", "speedTip": "AdoptionResponse: Chinese Adoptions", "tagOpen": " Hi - Chinese adoptions are handled here. ", "tagClose": "", "sampleText": ""};

} } // *********************** // End custom buttons // ***********************

// ******************* // Custom Responses 2.0 // *******************

$('[name="message"]').keypress(function(e) {       if (e.which == 13) {            this.value = this.value.replace(/\/caps/gi, 'Please do not write in all caps.');        }    }); $('[name="message"]').keypress(function(e) {       if (e.which == 13) {            this.value = this.value.replace(/\/chat/gi, 'Please do not direcly link other chats.');        }    }); $('[name="message"]').keypress(function(e) {       if (e.which == 13) {            this.value = this.value.replace(/\/sc/gi, 'Go to Special:Contact.');        }    }); $('[name="message"]').keypress(function(e) {       if (e.which == 13) {            this.value = this.value.replace(/\/renameaccount/gi, 'Look at Special:Contact/rename-account.');        }    }); $('[name="message"]').keypress(function(e) {       if (e.which == 13) {            this.value = this.value.replace(/\/closeaccount/gi, 'Special:CloseMyAccount.');        }    }); $('[name="message"]').keypress(function(e) {       if (e.which == 13) {            this.value = this.value.replace(/\/renamewiki/gi, 'You can rename a wiki at Special:Contact/wiki-name-change.');        }    }); $('[name="message"]').keypress(function(e) {       if (e.which == 13) {            this.value = this.value.replace(/\/staff/gi, 'Please see Special:Contact, and select the page you are looking for.)'); }   });    $('[name="message"]').keypress(function(e) { if (e.which == 13) { this.value = this.value.replace(/\/adopt/gi, 'You can adopt the wiki.'); }   });    $('[name="message"]').keypress(function(e) { if (e.which == 13) { this.value = this.value.replace(/\/vstf/gi, 'You can report that to the VSTF Wiki.)');       }    }); $('[name="message"]').keypress(function(e) {       if (e.which == 13) {            this.value = this.value.replace(/\/rules/gi, 'Please read the Chat Guidelines.');        }    }); $('[name="message"]').keypress(function(e) {       if (e.which == 13) {            this.value = this.value.replace(/\/age/gi, 'Please do not ask for the ages of other users, or any other personal information');        }    });

// *********************** // End custom responses 2.0 // ***********************

//Add link to Special:InterwikiEdit if (mw.config.get('wgPageName') === 'Community_Central:Interlanguage_link_requests') { $('#WikiaArticleCategories').before(''); document.getElementById("custom-interwiki-edit").innerHTML = ' Interwiki edit ' } /* Multiple Interwiki links - by Monchoman45 */ window.InterwikiEdit = { buffer: true, threads: 10, running: 0, queue: [] }; InterwikiEdit.onload = function { if (wgCanonicalSpecialPageName == 'InterwikiEdit' && !mw.util.getParamValue('action')) { var gui = document.createElement('div'); gui.innerHTML = 'Multiple List each domain (eg. ), one on each line. This will link each specified wiki to every other specified wiki.    '; document.getElementById('mw-content-text').appendChild(gui); } } $(InterwikiEdit.onload); InterwikiEdit.linkAll = function (wikis) { for (var i = 0; i < wikis.length - 1; i++) { for (var j = i + 1; j < wikis.length; j++) { if (wikis[i] != wikis[j]) { if (!InterwikiEdit.buffer || InterwikiEdit.running < InterwikiEdit.threads) { InterwikiEdit.link(wikis[i], wikis[j], InterwikiEdit.linkAllCallback); InterwikiEdit.running++; } else { InterwikiEdit.queue.push([wikis[i], wikis[j]]); }           } else { console.log(i + ' == ' + j); }       }    } } InterwikiEdit.link = function (wiki1, wiki2, callback) { if (!wiki1 || !wiki2) { return false; }   var get = new XMLHttpRequest; var url = '/wiki/Special:InterwikiEdit?action=Link&wikia=' + wiki1 + '.wikia.com&ext_wikia=' + wiki2 + '.wikia.com&useskin=wikia'; get.open('GET', url, true); get.onreadystatechange = function { if (this.readyState == 4 && this.status == 200) { var html = document.createElement('html'); html.innerHTML = this.responseText; var form = html.getElementsByTagName('form'); for (var i = 0; i < form.length; i++) { if (form[i].id == 'chooseaction') { form = form[i]; break; }           }            var post = new XMLHttpRequest; post.open('POST', url, true); post.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); post.onreadystatechange = function { if (this.readyState == 4 && this.status == 200 && typeof callback == 'function') { callback.call(this, wiki1, wiki2); }           }            post.send('action=commit_link&wikia_id=' + form['wikia_id'].value + '&ext_wikia_id=' + form['ext_wikia_id'].value); }   }    get.send; return get; } InterwikiEdit.linkAllCallback = function (wiki1, wiki2) { var output = document.getElementById('interwiki-multiple-output'); var scroll = false; if (output) { if (output.offsetHeight + output.scrollTop >= output.scrollHeight) { scroll = true; }       output.innerHTML += wiki1 + ' >=< ' + wiki2 + '\n'; }   if (InterwikiEdit.queue.length > 0) { wikis = InterwikiEdit.queue.shift; InterwikiEdit.link(wikis[0], wikis[1], InterwikiEdit.linkAllCallback); } else { InterwikiEdit.running--; if (InterwikiEdit.running == 0 && output) { output.innerHTML += '-\n'; }   }    if (scroll) { output.scrollTop = output.scrollHeight; } }