Content deleted Content added
me |
m Maintenance: Replacing addPortletLink() with mw.util.addPortletLink() (mw:ResourceLoader/Migration_guide_(users)#addPortletLink) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1:
// <nowiki>
addOnloadHook(function()▼
//created by btilm
function adt() {
));▼
}
▲addOnloadHook(function() {
if (document.editform) {
mw.util.addPortletLink("p-cactions", "javascript:adt()", "adt", "ca-adt", "Add Display Title", "");
}
▲ document.getElementById('wpTextbox1').value = "{{" + dt + "}}" + document.getElementById('wpTextbox1').value;
▲ document.getElementById('wpSummary').value = "added displaytitle tag";
▲ document.getElementById('wpMinoredit').checked = true;
▲ document.getElementById('editform').submit();
});
function
var txt = document.editform.wpTextbox1;
▲var pro2=prompt('Enter desired title','wgTitle');
txt.value = txt.value.replace(/{{DISPLAYTITLE.*}}\n/gim, "");
▲if (pro2==null || pro2==wgTitle || pro2=="") {
document.editform.wpSummary.value = 'removed displaytitle tag';
▲ alert('Aborted');
document.editform.wpMinoredit.checked = true;
▲ return};
document.editform.submit();
}
addOnloadHook(function() {
if (document.editform) {
mw.util.addPortletLink("p-cactions", "javascript:rdt()", "rdt", "ca-rdt", "Remove Display Title", "");
}
// </nowiki>
|