Greasy Fork 支持简体中文。
好东西哦(⊙﹏⊙)
< 腳本哎呦不错哦(任何事先簡介)的回應
發現以下代碼影響聊天室運作
(最初的留言要等很長時間。)
聊天室的iframe應該不用這腳本吧? 暫時未有聊天室內的廣告
// @exclude /^https?://\w+\.youtube\.com\/live_chat.*$/ // @exclude /^https?://\S+\.(txt|png|jpg|jpeg|gif|xml|svg|manifest|log|ini)[^\/]*$/
get xhrResponseValue() { const xhr = this; let result = super.response; if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.responseURL.includes('youtubei/v1/player')) { // music_watch result = data_process.text_process(result, ytInitialPlayerResponse_rule, 'insert', true); } if (xhr.responseURL.includes('youtube.com/playlist')) { let obj; try { obj = JSON.parse(result); } catch (error) { log('JSON解析失败', 1); return result; } data_process.obj_process(obj[2].playerResponse, ytInitialPlayerResponse_rule, true); data_process.obj_process(obj[3].response, ytInitialData_rule, true); tmp_debugger_value = obj; result = JSON.stringify(obj); } } else { result = ''; } return result; }
這個
} else { result = ''; }
是多餘的吧
為什麼要改動XHR本來的東西?
而且如果這個XHR是STREAM的話,這個result可能是有用
建議除掉
response 和 responseText 應該是兩個東西吧
應該分開
我把臨時的修正版放在這裡,請參考
https://github.com/cyfung1031/userscript-supports/raw/main/tmp-480192.user.js
response和responseText應該是兩個東西吧这两个确实该改一下 ,聊天室加载慢估计你可能开了shorts推荐的仅订阅,造成那时候网络卡顿,接下来更新版本要修复了。按照脚本逻辑来说即使注入到聊天页面也不会对网络内容进行修改的。@exclude 确实可以用下,以前都没用。感谢指正,nice
登入以回復
發現以下代碼影響聊天室運作
(最初的留言要等很長時間。)
建議白名單
聊天室的iframe應該不用這腳本吧? 暫時未有聊天室內的廣告
問題代碼
這個
是多餘的吧
為什麼要改動XHR本來的東西?
而且如果這個XHR是STREAM的話,這個result可能是有用
建議除掉
response 和 responseText
response 和 responseText 應該是兩個東西吧
應該分開
我把臨時的修正版放在這裡,請參考
https://github.com/cyfung1031/userscript-supports/raw/main/tmp-480192.user.js