diff --git a/contrib/plugins/up2k-hook-ytid.js b/contrib/plugins/up2k-hook-ytid.js index 53b60baf..a6d8d933 100644 --- a/contrib/plugins/up2k-hook-ytid.js +++ b/contrib/plugins/up2k-hook-ytid.js @@ -14,6 +14,8 @@ function up2k_namefilter(good_files, nil_files, bad_files, hooks) { a_up2k_namefilter(good_files, nil_files, bad_files, hooks).then(() => { }); } +// ebi('op_up2k').appendChild(mknod('input','unick')); + function bstrpos(buf, ptn) { var ofs = 0, ch0 = ptn[0], @@ -167,6 +169,16 @@ async function a_up2k_namefilter(good_files, nil_files, bad_files, hooks) { return hooks[0]([], [], [], hooks.slice(1)); } + var el = ebi('unick'), unick = el ? el.value : ''; + if (unick) { + console.log(`sending uploader nickname [${unick}]`); + fetch(document.location, { + method: 'POST', + headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' }, + body: 'msg=' + encodeURIComponent(unick) + }); + } + toast.inf(5, `running query for ${yt_ids.size} youtube-IDs...`); var xhr = new XHR();