User:Prahlad balaji/vector.js

This is an old revision of this page, as edited by Prahlad balaji (talk | contribs) at 19:29, 24 November 2016. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
// Wikipedia:Tools/Navigation popups //
importScript('MediaWiki:Gadget-popups.js');
importStylesheet('MediaWiki:Gadget-navpop.css');

importScript('User:Anomie/previewtemplatelastmod.js'); // Linkback: [[User:Anomie/previewtemplatelastmod.js]]
window.popupStructure = 'menus';
window.popupAdminLinks = true;

// initialize the array - only do this once
window.extraPopupFilters = [];

// define the function
function popupFilterHtmlTable (wikiText) {
	if (/<table/i.test(wikiText)) return '&lt;table&gt;';
	else return '';
};

// add the function for the array (you can repeat this for lots of functions)
extraPopupFilters.push(popupFilterHtmlTable);