Thread:Ultrasonic9000/@comment-24014422-20161013120041/@comment-24014422-20161013131408

A bureaucrat from Yu-Gi-Oh! wiki was too kind that taught me how this code works. Just write the code in the black quote down on the wiki's JS, and you should see the effect the moment the Wikia Staff approve of it.

/** * Add Template:Talk if it's not there. */ var mNamespaceNumber = mw.config.get('wgNamespaceNumber'), mAction         = mw.util.getParamValue('action'), mSection        = mw.util.getParamValue('section'); if (mNamespaceNumber % 2 == 1 && mNamespaceNumber != 3 && !mSection && mAction !== 'submit') { addOnloadHook(addTalk);

function addTalk { var vText = $('#wpTextbox1').val; if (!vText.match('{\{Talk') && !vText.match('{\{Delete')) { $('#wpTextbox1').val('{\{Talk}}\n\n' + vText); } else { $('#wpTextbox1').val(vText); }   } }