Wikipedia talk:AutoEd/isbn.js
Latest comment: 12 years ago by Anomie in topic Simplified
More parameters to check for edit
I've seen several occurances of ISBN 10 and ISBN 13 without the dash, so I suggest you add those to the script as well. To my knowldge no ISBNs start with 10 or 13, so it shouldn't be a problem adding these two. My suggestion is:
txt.value = txt.value.replace(new RegExp('ISBN-10:|ISBN-13:|ISBN 10:|ISBN 13:|ISBN-10|ISBN-13|ISBN:|ISBN 10|ISBN 13', 'gi'), 'ISBN');
Simplified edit
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I think this does the same thing but with less code.
str = str.replace(/ISBN-10:|ISBN-13:|ISBN-10|ISBN-13|ISBN:/gi), 'ISBN');