mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
up2k-hook-ytid: comment-field example
This commit is contained in:
parent
89d1af7f33
commit
5fa8aaabb9
|
@ -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(() => { });
|
a_up2k_namefilter(good_files, nil_files, bad_files, hooks).then(() => { });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ebi('op_up2k').appendChild(mknod('input','unick'));
|
||||||
|
|
||||||
function bstrpos(buf, ptn) {
|
function bstrpos(buf, ptn) {
|
||||||
var ofs = 0,
|
var ofs = 0,
|
||||||
ch0 = ptn[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));
|
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...`);
|
toast.inf(5, `running query for ${yt_ids.size} youtube-IDs...`);
|
||||||
|
|
||||||
var xhr = new XHR();
|
var xhr = new XHR();
|
||||||
|
|
Loading…
Reference in a new issue