Jump to content

User:SuperMarioMan/common.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
$(document).ready(function() {$("#t-RFA-tool a").text("RfAs");});
$(document).ready(function() {$("#t-afd-discussions-tool a").text("AfDs");});
$(document).ready(function() {$("#t-GA-reassesments-tool a").text("GARs");});
$(document).ready(function() {$("#t-FA-reviews-tool a").text("FARs");});
$(document).ready(function() {$("#t-Peer-reviews-tool a").text("PRs");});

// Rollback text says ... //
$(document).ready(function() {$(".mw-special-Watchlist .mw-rollback-link a").text("curr-r");});


// [[Wikipedia:Comments_in_Local_Time]] //
window.LocalComments = {
	dateDifference: true,
	dateFormat: 'dmy',
	dayOfWeek: false,
	dropDays: 27,
	dropMonths: 12,
	timeFirst: false,
	twentyFourHours: false,
};


/// STREAMLINED ... ///

// WATCHLIST //
importScript('user:js/watchlist.js'); // Backlink: [[user:js/watchlist.js]]
if (mw.config.get('wgCanonicalSpecialPageName') == 'Watchlist') 
var unwatchLinksOnLoad = false;

// CONTRIBS PAGES //
//importScript('User:BrandonXLF/ContribsByPage.js'); // Backlink: [[User:BrandonXLF/ContribsByPage.js]]

// HISTORY PAGES //
if (mw.config.get('wgAction') == 'history') //add a link to call histComb.js
$(function(){
 var pagehis = document.getElementById('pagehistory');
 if (!pagehis) return;
 var lnk = document.createElement('a');
 lnk.style.marginLeft = '10px';
 lnk.href = '#';
 lnk.appendChild(document.createTextNode('See improved view.....'));
 lnk.onclick=function(){this.parentNode.removeChild(this);importScript('User:Alex_Smotrov/histcomb.js')} // Backlink: [[User:Alex_Smotrov/histcomb.js]]
 pagehis.parentNode.insertBefore(lnk, pagehis);
 window.histCombLeaveComment = true //if true, keep summary on the last folded edit
 window.histCombNoCollapse = true //if true, do not collapse edits on load
 window.histCombMyBg = '#F0FFF0' //background on your edits (light green)
 window.histCombTalk = 'talk' //string to replace 'talk'
 window.histCombContrib = 'contribs' //string to replace 'contribs'
 window.histCombUndo = 'undo' //string to replace 'undo'
})


/// ADDITIONS TO SIDEBAR ///

// CITE MARKER //
window.CSMarkerMode = 'disabled';
importScript('User:BrandonXLF/CitationStyleMarker.js'); // Backlink: [[User:BrandonXLF/CitationStyleMarker.js]]

// OTHERS //
importScript('User:Anne_drew_Andrew_and_Drew/PageDetails.js'); // Backlink: [[User:Anne_drew_Andrew_and_Drew/PageDetails.js]]
//importScript('User:BrandonXLF/FloatSide.css'); // MAKE SIDEBAR STATIC // Backlink: [[User:BrandonXLF/FloatSide.css]]
importScript('User:Danski454/UserLogToolbar.js'); // "LOGGED ACTIONS" & "TARGET LOGS" // Backlink: [[User:Danski454/UserLogToolbar.js]]
importScript('User:Epicgenius/sortcategories.js'); // "SORT CATEGORIES" // Backlink: [[User:Epicgenius/sortcategories.js]]
//importScript('User:Alex_21/script-categoriessort.js'); // Backlink: [[User:Alex_21/script-categoriessort.js]]
//importScript('User:Equazcion/SidebarHistoryTools.js'); // TOOLSERVER LINKS AT SIDE // Backlink: [[User:Equazcion/SidebarHistoryTools.js]]
importScript('User:Evad37/duplinks-alt.js'); // "HIGHLIGHT DUPLICATE LINKS" // Backlink: [[User:Evad37/duplinks-alt.js]]
importScript('User:Guarapiranga/WhatRedirectsHere.js'); // Backlink: [[User:Guarapiranga/WhatRedirectsHere.js]]
importScript('User:Nardog/MoveHistory.js'); // Backlink: [[User:Nardog/MoveHistory.js]]
importScript('User:PrimeHunter/Source links.js'); // Backlink: [[User:PrimeHunter/Source links.js]]
importScript('User:Suffusion_of_Yellow/mark-reverted.js'); // Backlink: [[User:Suffusion_of_Yellow/mark-reverted.js]]
//importScript('User:The_Voidwalker/centralAuthLink.js'); // CENTRALAUTH AT SIDE // Backlink: [[User:The_Voidwalker/centralAuthLink.js]]


/// ADDITIONS TO TOP BARS ///
mw.util.addPortletLink(
 'p-personal',
 '/wiki/Special:PrefixIndex/User:SuperMarioMan/',
 '(SUBPAGES)',
 'pt-subpages',
 'Your subpages',
 null,
 '#pt-preferences'
 );
mw.util.addPortletLink(
 'p-personal',
 '/wiki/Special:PrefixIndex/User talk:SuperMarioMan/',
 '(T)',
 'pt-subpages',
 'Your subpages',
 null,
 '#pt-preferences'
 );
mw.util.addPortletLink(
 'p-personal',
 '/w/index.php?title=Special%3AContributions&target=SuperMarioMan&namespace=0&newOnly=1',
 '(CREATED)',
 'pt-contributions',
 'contributions',
 null,
 '#pt-preferences'
 );
mw.util.addPortletLink(
 'p-personal',
 '/wiki/Special:Log?type=block&user=SuperMarioMan',
 '(B-LOG)',
 'pt-mylogs',
 'logs',
 null,
 '#pt-preferences'
 );
mw.util.addPortletLink(
 'p-personal',
 '/wiki/Special:Log?type=delete&user=SuperMarioMan&subtype=delete',
 '(D-LOG)',
 'pt-mylogs',
 'logs',
 null,
 '#pt-preferences'
 );

//importScript('User:BrandonXLF/GlobalPrefs.js'); // GLOBAL PREFS LINK // Backlink: [[User:BrandonXLF/GlobalPrefs.js]]
//importScript('User:Evad37/Watchlist-hideAWB.js'); // Backlink: [[User:Evad37/Watchlist-hideAWB.js]]
//importScript('User:GeneralNotability/spihelper.js'); // "spi" TOOLS TAB ON SPI PAGES // Backlink: [[User:GeneralNotability/spihelper.js]]
importScript('User:John254/mass rollback.js'); // Backlink: [[User:John254/mass rollback.js]]
importScript('User:Taavi/Aligner.js'); // ADD "ALIGN TEMPLATE PARAMETERS" TAB // Backlink: [[User:Taavi/Aligner.js]]


//HIDE SEMI-AUTOMATED EDITS//
function setupHideSemiautomated() {
	$( "a[title='User:SD0001/StubSorter'], a[title='Wikipedia:TW'], a[title='Wikipedia:Twinkle'], a[title='Wikipedia:HG'], a[title='Wikipedia:Huggle'], a[title='Wikipedia:RW'], a[title='Wikipedia:RedWarn'], a[title='Wikipedia:UV'], a[title='Wikipedia:Ultraviolet'], a[title='Wikipedia:AWB'], a[title='Wikipedia:AutoWikiBrowser'], a[title='Wikipedia:JWB'], a[title='User:Joeytje50/JWB'], a[title='Wikipedia:HC'], a[title='Wikipedia:HotCat'], a[title='Wikipedia:SHORTDESCHELPER'], a[title='Wikipedia:Shortdesc helper'], a[title='Wikipedia:CLEANER'], a[title='Wikipedia:WPCleaner'], a[title='Wikipedia:POPUPS'], a[title='Wikipedia:Tools/Navigation popups'], a[title='User:SD0001/GAR-helper'], a[title='Wikipedia:DisamAssist'], a[title='User:Qwertyytrewqqwerty/DisamAssist'], a[title='User:Evad37/OneClickArchiver'], a[title='User:Enterprisey/archiver'], a[title='User:Equazcion/OneClickArchiver'], a[title='Wikipedia:RATER'], a[title='User:Evad37/rater'], a[title='User:Edward/Find link'], a[title='c:Special:MyLanguage/User:JWBTH/CD'], a[title='c:Help:Cat-a-lot'], a[title='User:Evad37/rater'], a[title='Wikipedia:RATER'], a[title='Wikipedia:XFDC'], a[title='Wikipedia:XFDcloser'], a[title='User:SD0001/BDCS']" ).closest("li, tr").addClass("watchlist-semiautomated-edit");

	mw.util.addPortletLink( 'p-cactions', '#', 'Hide Semiautomated', 'ca-hideSemiautomated', "Hide Semiautomated edits" );
	mw.util.addPortletLink( 'p-cactions', '#', 'Show Semiautomated', 'ca-showSemiautomated', "Show Semiautomated edits" );
	
	if ( window.semiautomatedHiddenByDefault ) {
		$(".watchlist-semiautomated-edit").hide();
		$('#ca-hideSemiautomated').hide();
	} else {
		$('#ca-showSemiautomated').hide();
	}
	
	$('#ca-hideSemiautomated').on('click', function() {
		$(".watchlist-semiautomated-edit").hide();
		$('#ca-showSemiautomated').show();
		$('#ca-hideSemiautomated').hide();
		return false;
	});
	
	$('#ca-showSemiautomated').on('click', function() {
		$(".watchlist-semiautomated-edit").show();
		$('#ca-showSemiautomated').hide();
		$('#ca-hideSemiautomated').show();
		return false;
	});
}
if( mw.config.get('wgPageName') === "Special:Watchlist" ) {
	$.when( mw.loader.using( ['mediawiki.util'] ), $.ready).done( setupHideSemiautomated );
}
var semiautomatedHiddenByDefault = true;


/// EVERYTHING ELSE ///
importScript('User:Amorymeltzer/logSwap.js'); // LOGPAGE "PERFORMER"-"TARGET" SWITCHING // Backlink: [[User:Amorymeltzer/logSwap.js]]
importScript('User:Amorymeltzer/unhide.js'); // AUTO-UNHIDE REV-DELETED // Backlink: [[User:Amorymeltzer/unhide.js]]
importScript('User:Anomie/linkclassifier.js'); // COLOUR-CODE WIKILINKS // Backlink: [[User:Anomie/linkclassifier.js]]
//importStylesheet('User:Anomie/linkclassifier.css'); // Backlink: [[User:Anomie/linkclassifier.css]]
//importScript('User:Anomie/talklink.js'); // COLOUR-CODE TALK TABS // Backlink: [[User:Anomie/talklink.js]]
//importStylesheet('User:Anomie/talklink.css'); // Backlink: [[User:Anomie/talklink.css]]
importScript('User:Anomie/nosubmitsummary.js'); // FORCE EDIT SUMMARY // Backlink: [[User:Anomie/nosubmitsummary.js]]
//importScript('User:Anomie/unsignedhelper.js'); // FACILITATE SIGNING UNSIGNED // Backlink: [[User:Anomie/unsignedhelper.js]]
//importScript('User:Bradv/Scripts/Notepad.js'); // Backlink: [[User:Bradv/Scripts/Notepad.js]]
importScript('User:BrandonXLF/WatchDoc.js'); // AUTO-WATCH TEMPLATE DOC PAGES // Backlink: [[User:BrandonXLF/WatchDoc.js]]
//importScript('User:BrandonXLF/ToTopButton.js'); // PAGE-TOP BUTTON: bottom-RIGHT // Backlink: [[User:BrandonXLF/ToTopButton.js]]
//importScript('User:DannyS712/Logs.js'); // LOGS LINK NEXT TO SEARCHBOX // Backlink: [[User:DannyS712/Logs.js]]
//importScript('User:Danski454/undo-move.js'); // REVERT PAGE MOVES ON CLICK // Backlink: [[User:Danski454/undo-move.js]]
//importScript('User:Danski454/goToTop.js'); // PAGE-TOP BUTTON: bottom-LEFT // Backlink: [[User:Danski454/goToTop.js]]
importScript('m:User:Dragoniez/Mark_BLocked_Global.js'); // Backlink: [[m:User:Dragoniez/Mark_BLocked_Global.js]]
importScript('User:Enterprisey/diff-context.js'); // SHOW MORE LINES IN DIFFS //Backlink: [[User:Enterprisey/diff-context.js]]
importScript('User:Enterprisey/fancy-diffs.js'); // MAKE LINKS IN DIFFS CLICKABLE // Backlink: [[User:Enterprisey/fancy-diffs.js]]
importScript('User:Enterprisey/link-deleted-revs.js'); // AUTO-UNHIDE REV-DELETED, NO ERROR MESSAGE // Backlink: [[User:Enterprisey/link-deleted-revs.js]]
importScript('User:Enterprisey/section-redir-note.js'); // "REDIRECTED FROM" IN SECTIONS // Backlink: [[User:Enterprisey/section-redir-note.js]]
importScript('User:Enterprisey/undelete-backlink.js'); // NAVIGATE BACK TO UNDELETE MAIN // Backlink: [[User:Enterprisey/undelete-backlink.js]]
//importScript('User:Epicgenius/nothanks.js'); // HIDE "THANKS" IN HISTORY PAGES // Backlink: [[User:Epicgenius/nothanks.js]]
importScript('User:Equazcion/link_intermediate_revisions.js'); // Backlink: [[User:Equazcion/link_intermediate_revisions.js]]
//importScript('User:Equazcion/DynaThank.js'); // CLICK TO SHOW "THANKS" IN HISTORY PAGES // Backlink: [[User:Equazcion/DynaThank.js]]
//importScript('User:Firefly/more-block-info.js'); // SHOW RANGEBLOCKS BETTER // Backlink: [[User:Firefly/more-block-info.js]]
importScript('User:Galobtter/scripts/WatchlistLinksNewTab.js'); // FORCE NEW TABS FOR WATCHLIST // Backlink: [[User:Galobtter/scripts/WatchlistLinksNewTab.js]]
importScript('User:Gary/nominations_viewer.js'); // COLLAPSE FAC/FAR DISCUSSIONS // Backlink: [[User:Gary/nominations_viewer.js]]
//importScript('User:GeneralNotability/ip-ext-info.js'); // ISP INFO // Backlink: [[User:GeneralNotability/ip-ext-info.js]]
importScript('User:GhostInTheMachine/SortWhatLinksHere.js'); // Backlink: [[User:GhostInTheMachine/SortWhatLinksHere.js]]
importScript('User:Headbomb/unreliable.js'); // COLOUR-CODE UNRELIABLE SOURCES // Backlink: [[User:Headbomb/unreliable.js]]
//importScript('User:Ingenuity/AbuseFilterContribs.js'); // (?)SHOW DISALLOWED EDITS IN CONTRIBS // Backlink: [[User:Ingenuity/AbuseFilterContribs.js]]
importScript('User:LFaraone/autounhide.js'); // (?)AUTO-UNHIDE REV-DELETED // Backlink: [[User:LFaraone/autounhide.js]]
importScript('User:Mattflaschen/Compare_link.js'); // MAKE "COMP. SELECTED REVS." A LINK // Backlink: [[User:Mattflaschen/Compare_link.js]]
importScript('User:Mdaniels5757/markAdmins.js'); // USER GROUP FLAGS // Backlink: [[User:Mdaniels5757/markAdmins.js]]
importScript('User:Mr._Stradivarius/gadgets/DiffOnly.js'); // NO PAGE CONTENT BELOW DIFFS // Backlink: [[User:Mr._Stradivarius/gadgets/DiffOnly.js]]
//importScript('User:Nardog/PlayAudioNow.js'); // PLAY AUDIO FILES IN SAME TAB // Backlink: [[User:Nardog/PlayAudioNow.js]]
importScript('User:Novem_Linguae/Scripts/CiteHighlighter.js'); // TRAFFIC-LIGHT HIGHLIGHTING FOR CITATIONS // Backlink: [[User:Novem_Linguae/Scripts/CiteHighlighter.js]]
importScript('User:Novem Linguae/Scripts/DetectG4G5.js'); // WARN OF RE-CREATION // Backlink: [[User:Novem Linguae/Scripts/DetectG4G5.js]]
importScript('User:Novem Linguae/Scripts/UserRightsDiff.js'); // COLOUR-CODE SPECIAL:USER-RIGHTS PAGE // Backlink: [[User:Novem Linguae/Scripts/UserRightsDiff.js]]
importScript('User:Pythoncoder/Scripts/voteSymbols.js'); // XFD VOTE ICONS // Backlink: [[User:Pythoncoder/Scripts/voteSymbols.js]]
importScript('User:SD0001/quickViewDeleted.js'); // VIEW LAST DELETED REVISION // Backlink: [[User:SD0001/quickViewDeleted.js]]
//importScript('User:SD0001/RC-links-new-tab.js'); // FORCE NEW TABS FOR RECENT CHANGES // Backlink: [[User:SD0001/RC-links-new-tab.js]]
importScript('User:Suffusion of Yellow/filter-highlighter.js'); // COLOUR-CODE ABUSE LOG // Backlink: [[User:Suffusion of Yellow/filter-highlighter.js]]
importScript('User:SuperHamster/CiteUnseen.js'); // FOOTNOTE ICONS // Backlink: [[User:SuperHamster/CiteUnseen.js]]
//importScript('User:The_Voidwalker/alwaysEditSectionLink.js'); // FORCE EDIT-SECTION LINK // Backlink: [[User:The_Voidwalker/alwaysEditSectionLink.js]]
importScript('User:Þjarkur/NeverUseMobileVersion.js'); // Backlink: [[User:Þjarkur/NeverUseMobileVersion.js]]
importScript('User:Þjarkur/Show_number_of_active_watchers_&_monthly_views_on_every_page.js');
// Backlink: [[User:Þjarkur/Show_number_of_active_watchers_&_monthly_views_on_every_page.js]]
//importScript('User:קיפודנחש/watchlistMark.js'); // BOLD WATCH-LISTED PAGES // Backlink: [[User:קיפודנחש/watchlistMark.js]]


/// TESTING ///
//if (mw.config.get('wgPageName') == "Special:Watchlist") {
//   $('#mw-watchlist-resetbutton').remove();
//   $('.mw-watched').contents().unwrap();
//}
//if (mw.config.get('wgAction') == "history") {
//   $('.updatedmarker').remove();
//}
//importScript('User:Nardog/VitalTopicon.js'); // Backlink: [[User:Nardog/VitalTopicon.js]]
importScript('User:Phlsph7/Readability.js'); // Backlink: [[User:Phlsph7/Readability.js]]
//importScript('User:Sam_Sailor/Scripts/WRStitle.js'); // Backlink: [[User:Sam_Sailor/Scripts/WRStitle.js]]
//importScript('User:Ingenuity/ReferenceEditor.js'); // Backlink: [[User:Ingenuity/ReferenceEditor.js]]
//importScript('User:Jerome Frank Disciple/curlyfixer.js'); // Backlink: [[User:Jerome Frank Disciple/curlyfixer.js]]
//importScript('User:Nux/CategorySortKeys.js'); // Backlink: [[User:Nux/CategorySortKeys.js]]
importScript('User:JAAqqO/EnhancedSearchPage.js'); // Backlink: [[User:JAAqqO/EnhancedSearchPage.js]]
importScript('User:Enterprisey/parent-cats.js'); // Backlink: [[User:Enterprisey/parent-cats.js]]
importScript('User:Nardog/SmartDiff.js'); // Backlink: [[User:Nardog/SmartDiff.js]]
importScript('User:Suntooooth/flickrsearch.js'); // Backlink: [[User:Suntooooth/flickrsearch.js]]
importScript('User:EpochFail/ArticleQuality.js'); // Backlink: [[User:EpochFail/ArticleQuality.js]]
importScript('User:Aaron_Liu/MoveTop.js'); // Backlink: [[User:Aaron_Liu/MoveTop.js]]
importScript('User:ZKang123/TitleCaseConverter.js'); // Backlink: [[User:ZKang123/TitleCaseConverter.js]]
importScript('meta:User:Diegodlh/search-wpl.js'); // Backlink: [[meta:User:Diegodlh/search-wpl.js]]
importScript('User:Polygnotus/DuplicateReferences.js'); // Backlink: [[User:Polygnotus/DuplicateReferences.js]]
importScript('User:Gary/highlight_my_username_in_history.js'); // Backlink: [[User:Gary/highlight_my_username_in_history.js]]
importScript('User:Animum/massdelete.js'); // Backlink: [[User:Animum/massdelete.js]]
importScript('User:Suntooooth/openversesearch.js'); // Backlink: [[User:Suntooooth/openversesearch.js]]
importScript('User:Titodutta/scripts/SearchHelper.js'); // Backlink: [[User:Titodutta/scripts/SearchHelper.js]]
importScript('User:Nardog/CatChangesViewer.js'); // Backlink: [[User:Nardog/CatChangesViewer.js]]
importScript('User:Equazcion/CatListMainTalkLinks.js'); // Backlink: [[User:Equazcion/CatListMainTalkLinks.js]]
importScript('User:Nardog/Unpipe.js'); // Backlink: [[User:Nardog/Unpipe.js]]
importScript('User:Nardog/SortCentralAuthByEditCount.js'); // Backlink: [[User:Nardog/SortCentralAuthByEditCount.js]]
//importScript('User:Guycn2/VandalCleaner.js'); // Backlink: [[User:Guycn2/VandalCleaner.js]]
importScript('User:Guywan/Scripts/12HourFormat.js'); // Backlink: [[User:Guywan/Scripts/12HourFormat.js]]
importScript('User:Awesome_Aasim/DetectProtectionLevels.js'); // Backlink: [[User:Awesome_Aasim/DetectProtectionLevels.js]]