User:Dr pda/persondata.js: Difference between revisions

Content deleted Content added
corrected typo in function name, modified logic
m reworking one find-and-replace
Line 139:
if(NAME == ''){
var pagename = wgPageName.replace(/_/g,' ');
pagename = pagename.substringreplace(0/\(.*\)/g,pagename.indexOf('( '));
NAME = format_name(pagename);
}
Line 146:
 
var insertPosition = text.indexOf('[[Category:')-1;
document.getElementById('wpTextbox1').value = text.substr(0,insertPosition)+persondata+text.substr(insertPosition+1);
document.getElementById('wpSummary').value += 'adding [[WP:PDATA|persondata]]';
document.getElementById('wpDiff').click();