User:Mifter/DYK tools.js

addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Wikipedia:Did you know'), 'WP:DYK'); });

addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Wikipedia talk:Did you know'), 'WT:DYK'); });

addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Template:Did you know'), 'T:DYK'); });

addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Template talk:Did you know'), 'T:TDYK'); });

addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Template:Did you know/Queue/1'), 'T:DYK/Queue 1'); });

addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Template:Did you know/Queue/2'), 'T:DYK/Queue 2'); });

addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Template:Did you know/Queue/3'), 'T:DYK/Queue 3'); });

addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Template:Did you know/Queue/4'), 'T:DYK/Queue 4'); });

addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Template:Did you know/Queue/5'), 'T:DYK/Queue 5'); }); 6 addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Template:Did you know/Queue/6'), 'T:DYK/Queue 6'); });

addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Template:Did you know/Preparation area 1'), 'T:DYK/Prep 1'); }); addOnloadHook(function { addPortletLink ('p-tb', mw.config.get('wgArticlePath').replace(/\$1/,'Template:Did you know/Preparation area 2'), 'T:DYK/Prep 2'); });