Update mbimport.js

Move the home variable, and its default value, to arguments, to allow it to be something other than https://github.com/murdos/musicbrainz-userscripts for scripts that don't live there.
This commit is contained in:
brianfreud 2019-03-17 22:51:58 -04:00 committed by Aurélien Mino
parent c5961ef481
commit f30e6b6d5d

View file

@ -345,8 +345,7 @@ var MBImport = (function() {
return (3600 * parseFloat(m[1] || 0) + 60 * parseFloat(m[2] || 0) + parseFloat(m[3] || 0)) * 1000;
}
function fnMakeEditNote(release_url, importer_name, format) {
let home = 'https://github.com/murdos/musicbrainz-userscripts';
function fnMakeEditNote(release_url, importer_name, format, home = 'https://github.com/murdos/musicbrainz-userscripts') {
return `Imported from ${release_url}${format ? ` (${format})` : ''} using ${importer_name} import script from ${home}`;
}