User:Hermntrix/global.js

// *************************** // Image licenses dropdown >:D // *************************** var QLicensebuttonFirst = false; var QLicenseDebug = false; var QLicenseUseOutGoingLayout = true; importScriptPage('User:Cakemix/Qlicensev2.js', 'callofduty'); // ******************************* // End Image licenses dropdown >:D // ******************************* // ******************* // Custom edit buttons // ******************* if (wgAction == "edit" || wgAction == "submit") { /***** Custom edit buttons *****/ if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20120128095141/callofduty/images/2/2c/CreeperForEmote.jpg", "speedTip": "Vandalism Template", "tagOpen": "", "tagClose": "", "sampleText": "PAGE"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20100502153339/callofduty/images/1/17/Button_Ssig.jpg", "speedTip": "Signature", "tagOpen": " ~"+""+"", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#redirect",               "tagClose": "", "sampleText": "PAGE"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://1.bp.blogspot.com/_P69BgsglWcA/TPZCZOXMLCI/AAAAAAAAARk/q1KhAtpTTHw/s1600/l_plate.jpg", "speedTip": "LICENSE", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20120128095141/callofduty/images/2/2c/CreeperForEmote.jpg", "speedTip": "Bad Edit Template", "tagOpen": "", "tagClose": "", "sampleText": "PAGE"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/9d/Button_halt.png", "speedTip": "Trolling", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/fc/Button_supp.png", "speedTip": "Dont Delete Disscusions", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://sccreader.files.wordpress.com/2008/11/copyrightsymbol.gif", "speedTip": "Copyrighted Media", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://www.clker.com/cliparts/4/2/0/c/11954452301922936529public_domain_icon_blue_01.svg.hi.png", "speedTip": "Public Domain", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3e/Tree-256x256.png", "speedTip": "No IRL", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://marketingbean.files.wordpress.com/2008/01/let-b.jpg", "speedTip": "Banned", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://www.murrayschools.org/schools2/mhs/images/U.jpg", "speedTip": "Unbanned", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://upload.wikimedia.org/wikipedia/commons/2/22/DJCTQ_-_L.svg", "speedTip": "Leaked", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/82/Nowiki_icon.png", "speedTip": "NoWiki", "tagOpen": " ", "tagClose": " ", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png", "speedTip": "References", "tagOpen": " ", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/6a/Button_sup_letter.png", "speedTip": "SuperScript", "tagOpen": " ", "tagClose": " ", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/aa/Button_sub_letter.png", "speedTip": "SubScript", "tagOpen": " ", "tagClose": " ", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images3.wikia.nocookie.net/__cb20070329065150/central/images/d/d5/Button_noinclude.png", "speedTip": "Noinclude", "tagOpen": "<"+"noinclude"+">[[Category:",               "tagClose": "]]<"+"/noinclude"+">", "sampleText": "Text"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20080111185517/central/images/6/60/Button_support.png", "speedTip": "Support", "tagOpen": " ", "tagClose": " ~"+""+"", "sampleText": "Reasoning"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20080111185614/central/images/9/98/Button_oppose.png", "speedTip": "Oppose", "tagOpen": " ", "tagClose": " ~"+""+"", "sampleText": "Reasoning"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/__cb20100304205745/callofduty/images/0/03/Al-Asad.jpg", "speedTip": "Speedy delete", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/__cb20120621083437/callofduty/images/d/d7/Jpeg.jpg", "speedTip": "JPG", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/callofduty/images/7/7d/TransPictureBackground.png", "speedTip": "Trans", "tagOpen": "", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/__cb20120119102346/callofduty/images/5/54/Information.png", "speedTip": "Image Quality", "tagOpen": "", "tagClose": "", "sampleText": ""}; } } /* SpeedyComments.js  A script to add speedy deletion buttons for blog comments. Authored by http://callofduty.wikia.com/wiki/User:Sactage , 2012 Please maintain this notice if you use this code elsewhere. function BlogCommentSpeedyDeleteButtons { var deleteOptions = { 'None': 'None', 'Spam/Nonsense': 'Spam', 'Flaming': 'Flame', 'Off-topic': 'OffTopic' };   var deleteoptstr = ''; for (var i in deleteOptions) { deleteoptstr += '' + deleteOptions[i] + ' '; }   var html = '' + deleteoptstr + ' Delete (Speedy)'; var commentArray = $('#article-comments-ul li .tools'); for (var i = 0; i < commentArray.length; i++) { $(commentArray[i]).append(html); $(commentArray[i]).children('.blog-speedy-button')[0].onclick = function(event) { var select = this.previousSibling; var pagename = this.parentElement.getElementsByClassName("article-comm-delete")[0].href.split("/wiki/")[1].split("?")[0]; if (select.options[select.selectedIndex].innerHTML != "None") { api.send(new api.Query(api, 'POST', {'action': 'delete', 'title': pagename, 'reason': select.options[select.selectedIndex].value}, function(result) {window.location = wgServer + '/index.php?title=' + wgPageName + '&action=purge';})); } else { alert('Please select a delete reason.'); }  	}    } } addOnloadHook(BlogCommentSpeedyDeleteButtons); importScriptPage('MediaWiki:APIQuery.js', 'monchbox'); importScript('User:Callofduty4/FileTemplateAdder.js'); /* stuff */ $(function { $('Recent Changes').insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('War Room').insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('Custom .js</li>').insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="/wiki/Rfa">RfA</a></li>').insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="/wiki/Call_of_Duty_Wiki%3ADuplicate_images">Duplicates</a></li>').insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="/wiki/Special:UnusedFiles">Unused</a></li>').insertBefore('.AccountNavigation .subnav li:first'); }); /* end stuff */ /* Adds Module to Wikia Rail */ function UserPageLinks { var userArray = wgPageName.split(":"); $('.WikiaRail').append(' <a href="/index.php?title=Special%3ALog&type=&user=&page=User%3A' + userArray[1] + '&year=&month=-1&tagfilter=">Logs done to User</a> <a href="/index.php?title=Special%3ALog&type=block&user=&page=User%3A' + userArray[1] + '&year=&month=-1&tagfilter=">Block Logs</a> <a href="/wiki/Special:Log/' + userArray[1] + '">Logs done by User</a> <a href="/wiki/Special:Editcount/' + userArray[1] + '">Editcount</a> '); }	if(wgCanonicalNamespace == "User") { addOnloadHook(UserPageLinks); }   // ***********    // Quick block // ***********   importScriptPage('User:Azuris/quickblock.js', 'callofduty'); // ***************   // End Quick block // *************** // ********** // Fastdelete // ********** importScriptPage('FastDelete/code.js', 'dev'); var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Unused file', 'label': 'Unused'}; fdButtons[fdButtons.length] = { 'summary': 'Spam', 'label': 'spam'}; fdButtons[fdButtons.length] = { 'summary': 'Vandalism', 'label': 'van'}; fdButtons[fdButtons.length] = { 'summary': 'Unnecessary', 'label': 'unnec'}; fdButtons[fdButtons.length] = { 'summary': 'Leaked', 'label': 'LEAK'}; fdButtons[fdButtons.length] = { 'summary': 'Unlicensed', 'label': 'NoLic'}; fdButtons[fdButtons.length] = { 'summary': 'Duplicate file', 'label': 'dupe'}; // ************** // End Fastdelete // ************** /*** BEGIN LOCAL TIME SCRIPT ***/ /* DO NOT EDIT THIS LINE! */ importScript('User:Quarenon/localcomments.js'); /*** END LOCAL TIME SCRIPT ***/