User:AstonishingTunesAdmirer/common.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
![]() | The accompanying .css page for this skin is at User:AstonishingTunesAdmirer/common.css. |
mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3AAstonishingTunesAdmirer%2FGadget-refToolbar.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3AAstonishingTunesAdmirer%2Fresize-covers.js&action=raw&ctype=text/javascript');
mw.loader.load( '/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Evad37/rater.js]]
var months = [
"January", "February", "March",
"April", "May", "June", "July",
"August", "September", "October",
"November", "December"
];
var date = new Date();
var day = date.getDate();
var monthIndex = date.getMonth();
var year = date.getFullYear();
// Add custom Character Inserter entries
window.charinsertCustom = {
"Custom_insert": ' Billboard_200: {\{subst:User:AstonishingTunesAdmirer/UsefulStuff/Subst/200}} Billboard_Hot_100: {\{subst:User:AstonishingTunesAdmirer/UsefulStuff/Subst/100}} Magazine_with_author: <ref>{\{cite.magazine|last=|first=|date=|title=|url=|magazine=|page=|location=|publisher=|access-date=' + months[monthIndex] + '.' + day + ',.' + year + '}}</ref> Magazine_no_author: <ref>{\{cite.magazine|author=<!--Staff.writer(s);.no.by-line.-->.|title=|url=|magazine=|location=|page=|publisher=|date=|access-date=' + months[monthIndex] + '.' + day + ',.' + year + '}}</ref> Discogs: {\{Discogs.master|MASTER|WORKNAME|type=album_OR_single}} Liner_notes: <ref>{\{Cite.AV.media.notes|title=|author=|year=|type=liner.notes/booklet|publisher=|id=}}</ref> Clack-clack_on_them_samples: {\{Original.research.section|date=' + months[monthIndex] + '.' + year + '}}'
};
// Add links to sandboxes
$.when( mw.loader.using( [ 'mediawiki.util' ] ), $.ready ).then( function () {
mw.util.addPortletLink("p-navigation", new mw.Title('User:AstonishingTunesAdmirer/UsefulStuff').getUrl(), "Garbage");
mw.util.addPortletLink("p-navigation", new mw.Title('User:AstonishingTunesAdmirer/sandbox/thedumpstest').getUrl(), "Dumpster");
mw.util.addPortletLink("p-navigation", "javascript:void(window.open('https://iabot.wmcloud.org/', '_blank'))", "Archive Bot");
mw.util.addPortletLink("p-navigation", "javascript:void(window.open('https://wikipedialibrary.wmflabs.org/', '_blank'))", "The Library of Babel");
} );
if(mw.config.get('wgNamespaceNumber') == 0)
{
mw.util.addPortletLink( 'p-cactions',
`javascript:void(window.open('https://link-dispenser.toolforge.org/analyze/${mw.config.get( 'wgPageName' )}', '_blank'))`,
'Check health of links on page');
}
$('head').one('reftoolbarbase', function() {
CiteTB.UserOptions['date format'] = "<monthname> <date>, <year>";
});
//show alt text of images on hover
$("a > img.mw-file-element").each(function(index, element){
var alt = $(element).attr("alt");
$(element).parent("a").attr({"title": alt});
});
//Add strikethrough button
// Check if we're editing a page.
if (['edit', 'submit'].indexOf(mw.config.get('wgAction')) !== -1) {
// Add a hook handler.
mw.hook('wikiEditor.toolbarReady').add(function($textarea) {
// Configure a new toolbar entry on the given $textarea jQuery object.
$textarea.wikiEditor('addToToolbar', {
section: 'advanced',
group: 'format',
tools: {
buttonId: {
label: 'Strikethrough',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/6/6d/Vector_strikeout.png',
action: {
type: 'encapsulate',
options: {
pre: '<s>',
post: '</s>'
}
}
}
}
});
});
}
importScript('User:Headbomb/unreliable.js'); // Backlink: [[User:Headbomb/unreliable.js]]
importScript('User:JPxG/TrackSum.js'); // Backlink: [[User:JPxG/TrackSum.js]]
importScript('User:Ohconfucius/dashes.js'); // Backlink: [[User:Ohconfucius/dashes.js]]
importScript('User:Shubinator/DYKcheck.js'); // Backlink: [[User:Shubinator/DYKcheck.js]]
importScript('User:Ohconfucius/script/MOSNUM dates.js'); // Backlink: [[User:Ohconfucius/script/MOSNUM dates.js]]
importScript('User:SuperHamster/CiteUnseen.js'); // Backlink: [[User:SuperHamster/CiteUnseen.js]]
importScript('User:Novem Linguae/Scripts/GANReviewTool.js'); // Backlink: [[User:Novem Linguae/Scripts/GANReviewTool.js]]
mw.loader.load('http://127.0.0.1:1337/test.js');
importScript('User:Gary/nominations viewer.js'); // Backlink: [[User:Gary/nominations viewer.js]]
importScript('User:Trappist the monk/HarvErrors.js'); // Backlink: [[User:Trappist the monk/HarvErrors.js]]
importScript('User:AstonishingTunesAdmirer/megapixels.js'); // Backlink: [[User:AstonishingTunesAdmirer/megapixels.js]]
importScript('User:Nardog/RefRenamer.js'); // Backlink: [[User:Nardog/RefRenamer.js]]
importScript('User:Nardog/IPAInput.js'); // Backlink: [[User:Nardog/IPAInput.js]]
importScript('User:Mdaniels5757/markAdmins.js'); // Backlink: [[User:Mdaniels5757/markAdmins.js]]
importScript('User:Epicgenius/ArticleQuality.js'); // Backlink: [[User:Epicgenius/ArticleQuality.js]]
importScript('User:Ohconfucius/script/EngvarB.js'); // Backlink: [[User:Ohconfucius/script/EngvarB.js]]
importScript('User:SD0001/GAN-helper.js'); // Backlink: [[User:SD0001/GAN-helper.js]]
importScript('User:Amorymeltzer/userinfo.js'); // Backlink: [[User:Amorymeltzer/userinfo.js]]