User:Cqm/Scrapbook

Sample stuff......

if (mw.config.get('wgNamespaceNumber') === 0) { namespace = 'Talk'; } else if (mw.config.get('wgNamespaceNumber') === (1200 || 1202 || 500 || 2000 || 2002)) { namespace = mw.config.get('wgCanonicalNamespace'); } else if (mw.config.get('wgNamespaceNumber') % 2 !== 0) { namespace = mw.config.get('wgCanonicalNamespace'); } else { namespace = mw.config.get('wgCanonicalNamespace') + '_talk'; }

more sample stuff...