Template:CardTooltip

From Cobalt Core Wiki
Jump to navigation Jump to search
CardTrash.png

Setup

  1. The following code snippet needs to be in MediaWiki:Common.js.
    /* Tooltips configuration */
    window.tooltips_config = {
    	offsetX: 40,
    	offsetY: 20,
    	waitForImages: true,
    	noCSS: true,
    };
    
    /* Custom Tooltips */
    window.tooltips_list = [
    	{
    		classname: 'card-tooltip',
    		parse: '{'+'{CardTooltip|<#name#>}}',
    	},
    ];
    
  2. This makes it so linking to cards using Template:CardLink will display an image of the card when hovered.
  3. idk i haven't tested it yet, since i cant, hope it works as intended

Samples

This is compatible with any card, base and upgraded, as long as it exists.

(Imagine this is what you see when you hover over card links)

CardBigShield.png
CardBasicDodgeA.png
CardPrismB.png
CardCorruptedCore.png
CardYellowCard.png

Limitations

If a card does not exist, or you made a typo. It will end up looking like this.