function dt() {
var pro2=prompt('Enter desired title',wgTitle);
if (pro2==null || pro2==wgTitle || pro2=="") {
alert('Aborted');
return};
document.location=mw.config.get('wgServer') mw.config.get('wgScript') "?title=" wgPageName "&action=edit&dt=" pro2;
}
$(function() {
mw.util.addPortletLink("p-cactions","javascript:dt()","dt","ca-dt","dt","");
if (location.href.indexOf("&action=edit&dt=") == -1) return;
var dtRegExp = /&action=edit&dt=(.*)/;
var dt = dtRegExp.exec(location.href)[1];
var newdt = decodeURIComponent(dt);
document.getElementById('wpTextbox1').value = "{{DISPLAYTITLE:" newdt "}}\n" document.getElementById('wpTextbox1').value;
document.getElementById('wpSummary').value = "added displaytitle tag";
document.getElementById('wpMinoredit').checked = true;
document.getElementById('editform').submit();
});