var portletLink = mw.util.addPortletLink( 'p-cactions', '#',
'Şablon', 'ca-my-portlet', 'Şablon ekle' );
$( portletLink ).click( function ( e ) {
ic=prompt("Şablon parantez içi?");
e.preventDefault();
location.href=mw.config.get('wgServer')+mw.config.get('wgScript')+"?title="+encodeURIComponent(mw.config.get('wgPageName'))+ "&action=edit&sablonekle="+ic;
});
if(location.href.indexOf("&sablonekle=")!=-1&&document.getElementById('wpTextbox1')!==null)
{
var x=decodeURIComponent(location.href.split("&sablonekle=")[1]);
document.editform.wpTextbox1.value = "{"+"{"+x+"}}\n\n" +document.editform.wpTextbox1.value ;
document.getElementById('wpSummary').value= x;
document.getElementById('wpPreview').click();
}