User:C.Syde65/wikia.js

// 05:56, July 6, 2017 (UTC) // 

//Add extra AccountNav options /* */   if (navLinks) return; var user = mw.util.wikiUrlencode(mw.config.get('wgUserName')), links = { contribs: { text: 'My Contributions', url: '/wiki/Special:Mycontributions' },       blogs: { text: 'My Blogs', url: '/wiki/User_blog:' + user },       watchlist: { text: 'My Watchlist', url: '/wiki/Special:Watchlist' },       followed: { text: 'My Followed Pages', url: '/wiki/Special:Following' }   },        html = '', navLinks = true; for (var i in links) { html += '' + links[i].text + ''; }   document.querySelector('.wds-global-navigation__user-menu .wds-list > li:nth-child(2)').insertAdjacentHTML('afterEnd', html); });
 * (function {

/* Quick image license - contains the most commonly used licensing criteria - fixed for Oasis */ function QLicenseUI { var options = { : ,		'\n== Licensing ==\n': 'Fair use', '\n== Licensing ==\n': 'This is licensed under Creative Commons Attribution 3.0 (free license)', '\n== Licensing ==\n': 'This is licensed under GFDL (free license)', '\n== Licensing ==\n': 'Public domain', '\n== Licensing ==\n': 'License unknown' };	var optstr = ''; for ( i in options ) { if ( options.hasOwnProperty( i ) ) { optstr += '' + options[i] + ' '; }	}	var html = '' + optstr + ' Add license'; if($('#LicensedFile').length || $('#Licensing').length) { html += ' This file is licensed. ';	} else { html += ' This file is not licensed. ';	}	$('#WikiaPageHeader').append(html); $('#aSubmit').click( function(event) {		this.innerHTML = '';		$.post("/api.php", {action: "edit", title: mw.config.get("wgPageName"), token: mw.user.tokens.values.editToken, bot: true, appendtext: $("#QLicenseSelect").val, summary: "Licensing image."}, function (result) { window.location = wgServer + '/index.php?title=' + mw.config.get("wgPageName") + '&action=purge'; });	}); } if (wgCanonicalNamespace == 'File') { addOnloadHook(QLicenseUI); }