Jump to content

User:Quiddity/global.js: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
replace
demo
Line 29: Line 29:
popupImages=true;
popupImages=true;
imagePopupsForImages=false;
imagePopupsForImages=false;
popupPreviewKillTemplates=true;
popupPreviewKillTemplates=false;


// Add an [Edit section] to the top/intro/lede/section0
// Add an [Edit section] to the top/intro/lede/section0

Revision as of 20:43, 19 February 2018

// Expand all grouped RC/Watchlist entries. Thanks to [[m:User:PiRSquared17]].
$(window).on('load',function() { $('.mw-enhancedchanges-arrow').click(); });
 
// Highlight my username everywhere. From [[w:User:Ais523/highlightmyname2.js]]. See also global.css
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Ais523/highlightmyname2.js&action=raw&ctype=text/javascript');
hmn2username="quiddity"; // This line is only needed if it differs from your full account name
 
// Default expand the "View templates on this page" and "View hidden categories on this page" on initial preview
document.cookie='templates-used-list=expanded';
document.cookie='hiddencats-list=expanded';

// Gives some useful links on user, user talk, and user contribution pages
// by [[m:user:Hoo man]] <http://meta.wikimedia.org/wiki/User:Hoo_man/Scripts/Useful_links>
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:Hoo_man/useful_links.js&action=raw&ctype=text/javascript');
if(typeof(usefulLinksConfig) == 'undefined') usefulLinksConfig = {};
usefulLinksConfig.toolLinkMethod = 'p-cactions';

// Useful script to tell if a user is currently blocked, by striking out the username
// mw.loader.load('https://ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&action=raw&ctype=text/javascript');

// Navpopups. See also global.css
mw.loader.load('https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups&only=scripts' );
mw.loader.load('https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups&only=styles', 'text/css');
// popupDelay=0.3;
// popupHideDelay=0.3;
popupFixDabs=true;
popupOnEditSelection=false;
popupAdminLinks=false;
popupImages=true;
imagePopupsForImages=false;
popupPreviewKillTemplates=false;

// Add an [Edit section] to the top/intro/lede/section0
mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-edittop.js&action=raw&ctype=text/javascript');

// Hide "Beta" in the personal bar
$('#pt-betafeatures').hide();

// Show EventLogging validation errors in a dismissible bar at the top of page.
var $el = $( '<pre style="background: yellow; margin: 0; padding: 8px; position: fixed; top: 0; width: 100%; z-index: 99"></pre>' );
$el.click( function () { $el.empty().detach(); } );
mw.trackSubscribe( 'eventlogging.error', function ( topic, err ) {
    $el.text( function ( idx, text ) {
        return ( text && text + '\n' ) + err;
    } ).appendTo( 'body' );
} );

// Add info on userpages listing their flags, account-age, contributions-count, and last-edit-time
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:PleaseStand/userinfo.js&action=raw&ctype=text/javascript');

// TESTING STUFF, BELOW

// [[File:User:He7d3r/Tools/HighlightSmallDiffs.js]] (workaround for [[phab:T35355]])
mw.loader.load( 'https://meta.wikimedia.org/w/index.php?title=User:He7d3r/Tools/HighlightSmallDiffs.js&action=raw&ctype=text/javascript' );
// Testing cleanDiff instead...  [[:de:Benutzer:TMg/cleanDiff]]  ... revert, there seems to be a Firefox specific bug preventing it from working
// mw.loader.load('https://de.wikipedia.org/w/index.php?title=Benutzer:TMg/cleanDiff.js&action=raw&ctype=text/javascript');

// Article Map (proof of concept)
// mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:Matma_Rex/article-map.js&action=raw&ctype=text/javascript');

// Sidebar ToC
// mw.loader.load( 'https://cdn.rawgit.com/prtksxna/persistent-toc/master/ptoc.css', 'text/css' );
// mw.loader.load( 'https://cdn.rawgit.com/prtksxna/persistent-toc/master/ptoc.js', 'text/javascript' );

// [[m:User:Hedonil/XTools]]
// mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:Hedonil/XTools/XTools.js&action=raw&ctype=text/javascript');

// Wiki-Labels [[File:User:EpochFail/WikiLabels.js]] - details at [[:en:WP:Labels]]
mw.loader.load( 'https://labels.wmflabs.org/gadget/loader.js' );

// TheDJ's responsive vector
mw.loader.load('https://www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-responsiveContentBase.css&action=raw&ctype=text/css', 'text/css');
mw.loader.load('https://www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-responsiveContent.js&action=raw&ctype=text/javascript');
mw.loader.load('https://www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-mobileVectorBase.css&action=raw&ctype=text/css', 'text/css');
mw.loader.load('https://www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-mobileVector.js&action=raw&ctype=text/javascript');

// Add a toolbox link to display the current page with MediaWiki message names replacing their text
mw.loader.using( 'mediawiki.util', function () {mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ShowMessageNames.js&action=raw&ctype=text/javascript');
} );