diff --git a/metalarchives_importer.user.js b/metalarchives_importer.user.js index 3b38776..f8ab20a 100644 --- a/metalarchives_importer.user.js +++ b/metalarchives_importer.user.js @@ -23,8 +23,7 @@ $(document).ready(function() { }); function setreleasedate(release, datestring) { - var patt = new RegExp('^d{4}$'); - if (patt.exec(datestring)) { + if (/^\d{4}$/.exec(datestring)) { release.year = datestring; } else if (datestring.indexOf(',') != -1) { var commaindex = datestring.indexOf(',');