User:Cakemix/wikia.js

/*--- Importing shit ---*/ var teabag = []; importScriptPage('User:Cakemix/Qlicense.js', 'callofduty'); /*--- Testing shit ---*/ $(document).ready(function {    var QLicensebuttonFirst = true;    var QLicenseDebug = false; //make    var QLicenseUseOutGoingLayout = true; //make    var SelectOption = [];    SelectOption[""] = "Pimp My Gun";    SelectOption[""] = "Public domain";    SelectOption[""] = "Game Screenshot";    SelectOption[""] = "Fair use";    SelectOption[""] = "Catergory Pimp my gun";    var SelectOptions = "";    for (i in SelectOption) {        SelectOptions += "" + SelectOption[i] + " ";    }    var licensedImage = 'Loading...';    var selects = ' ' + SelectOptions + ' ';    var buttons = ' Add license  ';

if (QLicensebuttonFirst) { var buttonAndStuff = buttons + selects } else { var buttonAndStuff = selects + buttons } if($('#LicensedFile').length != 0){ licensedImage = ' ''' This file is licensed. ''' ' }else{ licensedImage = ' ''' This file is not licensed. ''' ' }   $('footer#WikiaFooter.WikiaFooter').before('  ' + buttonAndStuff +licensedImage+ '   '); $('#aSubmit').click(function {        if (QLicenseUseOutGoingLayout) {            console.log('Submit clicked')            console.log($('#QLicenseSelect').val + ':' + $('#QLicenseSelect :selected').text + ' is selected')        }    }); });

/*--- Other shit ---*/ if (wgAction == "edit" || wgAction == "submit") { if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/common/avatars/thumb/0/09/1760849.png/20px-1760849.png", "speedTip": "Image naming", "tagOpen": "", "sampleText": "|Cake" };   } }