//Simply to add tag to WikiProjects
//You have to be in edit mode to try it
//<nowiki>
if(mw.config.get('wgCanonicalNamespace') == 'Talk' && mw.config.get('wgAction')=="view") addOnloadHook(function() {
addPortletLink('p-cactions','javascript:addSomeText("{{Iraq}}")', 'I');
});
function addSomeText(text) {
location.href=mw.config.get('wgServer')+mw.config.get('wgScript')+'?title=' + mw.config.get('wgPageName') + "&action=edit";
}
if(mw.config.get('wgCanonicalNamespace') == 'Talk' && mw.config.get('wgAction')=="edit") addOnloadHook(function() {
addPortletLink('p-cactions','javascript:hmm("{{Iraq}}")', 'I');
});
function hmm(text) {
txtb = document.getElementById('wpTextbox1');
txtb.value += text;
document.getElementById('wpTextbox1').value+="";
document.getElementById('wpSummary').value=
"Tagged with [[WP:IRAQ| WikiProject Iraq]]";
document.getElementById('wpSave').click();
}
//</nowiki>