Closed rzyao closed 2 years ago
在油猴里编辑脚本 m3u8Append.addEventListener('click', function()上面加一行代码,获取页面title, var title = document.getElementsByTagName('title')[0].innerHTML title = title.replace(/\s*/g,""); 修改脚本里这段代码 if (m3u8Target) { script = script.replace(url: '', // 在线链接, url: '${m3u8Target}',title:'${m3u8Target}'); } 修改为 if (m3u8Target) { script = script.replace(url: '', // 在线链接, url: '${m3u8Target}',titlename:'${title}',); script = script.replace(this.formatTime(this.beginTime, 'YYYY_MM_DD hh_mm_ss'), this.titlename); script = script.replace(this.formatTime(this.beginTime, 'YYYY_MM_DD hh_mm_ss'), this.titlename); } 这样下载时文件名就是title了 再把alert('注入成功,请滚动到页面底部')替换为 document.documentElement.scrollTop = 10000 点击注入下载后自动下拉到最下面
url: '', // 在线链接
url: '${m3u8Target}',title:'${m3u8Target}'
url: '${m3u8Target}',titlename:'${title}',
this.formatTime(this.beginTime, 'YYYY_MM_DD hh_mm_ss')
this.titlename
在油猴里编辑脚本 m3u8Append.addEventListener('click', function()上面加一行代码,获取页面title, var title = document.getElementsByTagName('title')[0].innerHTML title = title.replace(/\s*/g,""); 修改脚本里这段代码 if (m3u8Target) { script = script.replace(
url: '', // 在线链接
,url: '${m3u8Target}',title:'${m3u8Target}'
); } 修改为 if (m3u8Target) { script = script.replace(url: '', // 在线链接
,url: '${m3u8Target}',titlename:'${title}',
); script = script.replace(this.formatTime(this.beginTime, 'YYYY_MM_DD hh_mm_ss')
,this.titlename
); script = script.replace(this.formatTime(this.beginTime, 'YYYY_MM_DD hh_mm_ss')
,this.titlename
); } 这样下载时文件名就是title了 再把alert('注入成功,请滚动到页面底部')替换为 document.documentElement.scrollTop = 10000 点击注入下载后自动下拉到最下面