标签
const targetLink = document.querySelector('a[href*="9432b3b0-661c-4d05-9552-29757dafc4cb"]');
// 如果存在,则向上找到外层 col-6 容器并移除
if (targetLink) {
const container = targetLink.closest('.col-6.col-sm-4.col-lg-12');
if (container) {
container.remove();
console.log('广告元素已移除');
}
}
// 新增快进快退
(function () {
fastForward('#player', 'section.pb-3.pb-e-lg-30');
})();
// 快进快退结束
if (document.location.href.search('search') !== -1) {
let regex = /.*\/search\//;
let code = window.location.pathname.replace(regex, '').replace('/', '').toLowerCase()
setTimeout(() => {
tmd('#list_videos_videos_list_search_result > nav', code, '试试其他搜索:');
}, 2000)
console.log("生成搜索链接🔗");
}
if (document.querySelector('.plyr__poster') !== null) { // 在其他站点播放
let regex = /.*\/videos\//;
let code = window.location.pathname.replace(regex, '').replace('/', '').toLowerCase();
setTimeout(() => {
if (document.querySelector('#p1') == null) {
console.log('开始生成在线预览链接...')
tmd('h4', code, '在其他站点播放:');
}
console.log("生成在其他站点播放链接🔗");
}, 3000)
}
}()
// 子域名跳转至主域名 jable.tv
if (/\b(.*\.)(jable\.tv.*)\b/i.test(window.location.href.toLowerCase())) {
console.log(window.location.href.toLowerCase())
let url_jable_rewrite = window.location.href.toLowerCase().replace(/https:\/\/\w{2,3}\./i, "https://")
console.log(url_jable_rewrite)
window.location.replace(url_jable_rewrite)
}
// 去除首页广告
if (document.querySelectorAll('div.col-6.col-sm-4.col-lg-3').length > 0) {
document.querySelectorAll('div.col-6.col-sm-4.col-lg-3').forEach((x) => { // xxx
if (x.querySelectorAll("[target='_blank']").length > 0) {
x.style = "display: none !important; z-index:-114154; display:block; width:0vw; height:0";
}
})
}
//cloudflare_captchaBypass();
css_adsRemove(adsMax.css.jable);
jable_adsRemove();
const url_jable = document.location.href;
const reg_videos = /^https:\/\/jable\.tv.*\/videos/gi;
url_jable.search(reg_videos) !== -1 && document.querySelector('#avCodeCopy') === null
if (url_jable.search(reg_videos) !== -1 && document.querySelector('#avCodeCopy') === null) {
setTimeout(() => {
let cssText = "margin-left: 5px; margin-top: 5px; position: static; font-size: smaller !important; background: #2563eb !important; margin-right: 5px; padding: 6px 6px 6px 6px; display: inline-block; color: white; border-right: 6px solid #38a3fd; border-left: #292f33 !important; border-top: #292f33 !important; border-bottom: #292f33 !important; background: #2563eb; border-radius: 0px 0px 0px 0px; font-weight: 800 !important; text-align: right !important;"
let cssText2 = "width:72px; margin-left: 5px; margin-top: 5px; position: static; font-size: smaller !important; background: #2563eb !important; margin-right: 5px; padding: 6px 6px 6px 6px; display: inline-block; color: white; border-right: 6px solid #38a3fd; border-left: #292f33 !important; border-top: #292f33 !important; border-bottom: #292f33 !important; background: #2563eb; border-radius: 0px 0px 0px 0px; font-weight: 800 !important; text-align: right !important;"
ele_dynamicAppend("div.header-left > h6", "onclick", "code", cssText2, "", "avCodeCopy", 13, "input");
ele_dynamicAppend("div.header-left > h6", "onclick", "复制番号", cssText, "", "copyavCode", 14, "button");
ele_dynamicAppend("div.header-left > h6", "onclick", "", cssText, "", "copy", 15, "input");
ele_dynamicAppend("div.header-left > h6", "onclick", "复制M3U8文件地址", cssText, "", "jablex", 16, "button")
ele_dynamicAppend("div.header-left > h6", "onclick", "在线下载本视频", cssText, "", "onlinedl", 17, "button");
ele_dynamicAppend("div.header-left > h6", "onclick", "如何下载本视频?", cssText, "window.open(\"https://limbopro.com/archives/M3U8-Downloader.html\", \"_blank\")", "how", 18, "button");
var regex = /[a-zA-Z]{3,5}\-\d{3,5}/i
var avCode = document.querySelectorAll('h4')[0].innerText.match(regex)[0]
//let avCode = window.location.pathname.replace('/videos/', '').replace('/', '')
let input = document.querySelector('#avCodeCopy')
input.value = avCode
// 添加监听器
addListenerById("jablex", () => { copyText("copy", "jablex", "复制M3U8文件地址") }, 0);
addListenerById("copyavCode", () => { avCodeCopy() }, 0);
}, 3000)
function avCodeCopy() {
// 复制工作开始
let civ = document.querySelector('#avCodeCopy')
civ.select()
document.execCommand('copy')
// 复制工作结束
// 取消文本选中
window.getSelection().removeAllRanges();
// 移除焦点,防止键盘弹出
document.activeElement.blur();
document.querySelector('#copyavCode').innerHTML = '复制成功!'
document.querySelector('#copyavCode').setAttribute('class', 'jable_css')
setTimeout(() => {
document.querySelector('#copyavCode').innerHTML = '复制番号'
document.querySelector('#copyavCode').className = ''
}, 1500)
//}, 0)
}
setTimeout(() => {
repeat_regex.forEach(m3u8_tempt)
// online download button script
// 获取按钮
const button = document.getElementById('onlinedl');
// 动态创建样式
function createStyles() {
const style = document.createElement('style');
style.textContent = `
/* 遮罩层样式 */
.overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
}
/* 悬浮窗样式 */
.modal {
height: 65%;
align-content: center;
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
padding: 30px;
border: 2px solid #007bff;
border-radius: 10px;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
z-index: 1000;
text-align: center;
max-width: 400px;
width: 90%;
animation: modalFadeIn 0.3s ease-out;
}
/* 动画效果 */
@keyframes modalFadeIn {
from {
opacity: 0;
transform: translate(-50%, -60%);
}
to {
opacity: 1;
transform: translate(-50%, -50%);
}
}
.modal h3 {
color: #007bff;
margin-top: 0;
font-size: 1.5em;
}
.modal p {
color: #333;
font-size: 1.1em;
margin: 15px 0;
}
.modal a {
display: inline-block;
background-color: #007bff;
color: white;
padding: 12px 24px;
text-decoration: none;
border-radius: 5px;
font-weight: bold;
transition: background-color 0.3s;
margin-top: 15px;
}
.modal a:hover {
background - color: #0056b3;
transform: translateY(-2px);
}
.close-btn {
background-color: #dc3545;
color: white;
border: none;
padding: 8px 16px;
border-radius: 5px;
cursor: pointer;
margin-top: 10px;
font-size: 14px;
}
.close-btn:hover {
background-color: #c82333;
}
`;
document.head.appendChild(style);
return style;
}
// 动态创建DOM元素
function createModalElements() {
// 创建遮罩层
const overlay = document.createElement('div');
overlay.id = 'overlay';
overlay.className = 'overlay';
// 创建悬浮窗
const modal = document.createElement('div');
modal.id = 'modal';
modal.className = 'modal';
modal.innerHTML = `
✅ 已复制M3U8文件地址
1.点击下方按钮跳转到在线解析网站 anyconv>,2.粘贴M3U8文件地址>,3.然后点击转换为MP4格式>进行下载即可!
(P.S. 需要注意的是,使用在线解析下载长视频(大于128Mb)可能体验不佳或不如App,可查看更多下载方法选择合适的App下载长视频;点击页面上的非弹窗部分关闭本弹窗)