├── .gitignore ├── README.md └── code ├── js-1.js ├── js-1.min.js ├── js-10.js ├── js-10.min.js ├── js-11.js ├── js-11.min.js ├── js-12.js ├── js-12.min.js ├── js-13.js ├── js-13.min.js ├── js-13.version-1.js ├── js-14.js ├── js-14.min.js ├── js-15.js ├── js-15.min.js ├── js-15.server.php ├── js-16.js ├── js-16.min.js ├── js-17.js ├── js-17.min.js ├── js-18.js ├── js-18.min.js ├── js-19.js ├── js-19.min.js ├── js-2.js ├── js-2.min.js ├── js-20.js ├── js-20.min.js ├── js-21.js ├── js-21.min.js ├── js-22.js ├── js-22.min.js ├── js-23.js ├── js-23.min.js ├── js-24.js ├── js-24.min.js ├── js-25.js ├── js-25.min.js ├── js-26.360.js ├── js-26.js ├── js-26.min.js ├── js-27.js ├── js-27.min.js ├── js-28.js ├── js-28.min.js ├── js-29.js ├── js-29.min.js ├── js-3.js ├── js-3.min.js ├── js-30.js ├── js-30.min.js ├── js-31.js ├── js-31.min.js ├── js-31.server.php ├── js-32.js ├── js-32.min.js ├── js-33.js ├── js-33.min.js ├── js-34.js ├── js-34.min.js ├── js-34.server.php ├── js-35.js ├── js-35.min.js ├── js-36.js ├── js-36.min.js ├── js-37.js ├── js-37.min.js ├── js-38.js ├── js-38.min.js ├── js-39-backward.min.js ├── js-39-forward.min.js ├── js-39.js ├── js-4.js ├── js-4.min.js ├── js-40.js ├── js-40.min.js ├── js-41.js ├── js-41.min.js ├── js-42.js ├── js-42.min.js ├── js-43.js ├── js-43.min.js ├── js-43.version-1.js ├── js-43.version-1.min.js ├── js-44.js ├── js-44.min.js ├── js-45.js ├── js-45.min.js ├── js-46.js ├── js-46.min.js ├── js-47.js ├── js-47.min.js ├── js-47.server.php ├── js-48.js ├── js-48.min.js ├── js-49.js ├── js-49.min.js ├── js-5.js ├── js-5.min.js ├── js-50.js ├── js-50.min.js ├── js-51.js ├── js-51.min.js ├── js-52.js ├── js-52.min.js ├── js-53.js ├── js-53.min.js ├── js-54.js ├── js-54.min.js ├── js-55.js ├── js-55.min.js ├── js-56.js ├── js-56.min.js ├── js-57.js ├── js-57.min.js ├── js-6.js ├── js-6.min.js ├── js-6.server.php ├── js-7.js ├── js-7.min.js ├── js-8.js ├── js-8.min.js ├── js-9.js ├── js-9.min.js ├── js_ranking.js ├── js_ranking.min.js └── js_ranking.php /.gitignore: -------------------------------------------------------------------------------- 1 | .idea -------------------------------------------------------------------------------- /code/js-1.js: -------------------------------------------------------------------------------- 1 | // window.open() 打开一个链接,链接通过属性 itemprop 等于 image 的 meta 标签中的 content 属性获取 2 | window.open( 3 | document.querySelector('meta[itemprop=image]').getAttribute('content') 4 | ); 5 | void 0; 6 | -------------------------------------------------------------------------------- /code/js-1.min.js: -------------------------------------------------------------------------------- 1 | window.open(document.querySelector('meta[itemprop=image]').getAttribute('content'));void(0);/*{"name":"快速打开视频封面"}*/ -------------------------------------------------------------------------------- /code/js-10.js: -------------------------------------------------------------------------------- 1 | // 判断有没有 level 2 | if (typeof koe_level === 'undefined') { 3 | // 没有则获取 .h-level 的属性 lvl,转成整数 4 | var koe_level = parseInt( 5 | document.querySelector('.h-level').getAttribute('lvl') 6 | ); 7 | // 设置 7、8、9 级的 style 效果 8 | var koe_style = document.createElement('style'); 9 | koe_style.innerHTML = 10 | '.m-level[lvl="7"]{ background-position: -21px -262px } .m-level[lvl="8"]{ background-position: -21px -298px } .m-level[lvl="9"]{ background-position: -21px -334px }'; 11 | document.head.appendChild(koe_style); 12 | } 13 | // 设置 level,如果 level 等于 9 则 设置为 0,否则 level + 1 14 | koe_level = koe_level === 9 ? 0 : ++koe_level; 15 | // 更改 .h-level 的 lvl 属性值 16 | document.querySelector('.h-level').setAttribute('lvl', koe_level); 17 | -------------------------------------------------------------------------------- /code/js-10.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_level==='undefined'){var koe_level=parseInt(document.querySelector('.h-level').getAttribute('lvl'));var koe_style=document.createElement('style');koe_style.innerHTML='.m-level[lvl="7"]{ background-position: -21px -262px } .m-level[lvl="8"]{ background-position: -21px -298px } .m-level[lvl="9"]{ background-position: -21px -334px }';document.head.appendChild(koe_style)}koe_level=koe_level===9?0:++koe_level;document.querySelector('.h-level').setAttribute('lvl',koe_level);/*{"name":"一键切换用户等级"}*/ -------------------------------------------------------------------------------- /code/js-11.js: -------------------------------------------------------------------------------- 1 | // 判断有没有创建 style 效果 2 | if (typeof koe_searcher_style === 'undefined') { 3 | // 新建 style 效果 4 | var koe_searcher_style = document.createElement('style'); 5 | // 设置按钮效果 6 | koe_searcher_style.innerText = 7 | '.koe_searcher_button{ position: fixed;top:100px;padding:5px 10px;background-color: #FFF;border:1px #000 solid;border-radius:5px;font-size:30px; }'; 8 | document.head.appendChild(koe_searcher_style); 9 | // 创建 stop 按钮 10 | var koe_searcher_stop = document.createElement('button'); 11 | koe_searcher_stop.innerText = '停止'; 12 | koe_searcher_stop.setAttribute('class', 'koe_searcher_button'); 13 | koe_searcher_stop.setAttribute('style', 'left:50px;'); 14 | document.body.appendChild(koe_searcher_stop); 15 | // 创建 countiue 按钮 16 | var koe_searcher_countiue = document.createElement('button'); 17 | koe_searcher_countiue.innerText = '继续'; 18 | koe_searcher_countiue.setAttribute('class', 'koe_searcher_button'); 19 | koe_searcher_countiue.setAttribute('style', 'left:150px;display:none'); 20 | document.body.appendChild(koe_searcher_countiue); 21 | // 设置计时器 22 | var koe_searcher_timer = null; 23 | // 监听 stop 按钮点击事件 24 | koe_searcher_stop.addEventListener('click', function () { 25 | // 如果没有计时器 则不继续执行 26 | if (koe_searcher_timer === null) return; 27 | // 否则 清空计时器 28 | clearInterval(koe_searcher_timer); 29 | koe_searcher_timer = null; 30 | // 隐藏 stop、countiue 按钮 31 | koe_searcher_stop.style.display = 'none'; 32 | koe_searcher_countiue.style.display = 'none'; 33 | }); 34 | // 监听 countiue 按钮点击事件 35 | koe_searcher_countiue.addEventListener('click', function () { 36 | // 隐藏 countiue 按钮 37 | koe_searcher_countiue.style.display = 'none'; 38 | // 让 是否继续 等于 true 39 | koe_searcher_is_countiue = true; 40 | }); 41 | } 42 | // 获取输入的关键词 43 | var koe_searcher_keyword = prompt('请输入关键词'); 44 | // 如果关键词 不等于 空 或 null 45 | if (koe_searcher_keyword !== '' && koe_searcher_keyword !== null) { 46 | // 设置 是否继续 为 true 47 | var koe_searcher_is_countiue = true; 48 | // 根据关键词 实例化正则表达式 49 | var koe_searcher_reg = new RegExp('(' + koe_searcher_keyword + ')'); 50 | // 创建计时器 51 | koe_searcher_timer = setInterval(function () { 52 | // 如果 继续执行 等于 false 直接停止 53 | if (!koe_searcher_is_countiue) return; 54 | // 选取所有需要查询的 element,并且没有 koe_searcher_class 这个 class 的,用 forEach 循环遍历 55 | document 56 | .querySelectorAll( 57 | '.reply-item .real-reply .content-list:not(.koe_searcher_class),.reply-item .orginal-reply:not(.koe_searcher_class),.reply-item .name-field a:not(.koe_searcher_class)' 58 | ) 59 | .forEach(function (element) { 60 | // 如果 遍历中途 继续执行 等于 false 也直接停止 61 | if (!koe_searcher_is_countiue) return; 62 | // 添加 koe_searcher_class 这个 class,下次就不会被选取了 63 | element.setAttribute( 64 | 'class', 65 | element.getAttribute('class') + ' koe_searcher_class' 66 | ); 67 | // 如果找到关键词 68 | if (koe_searcher_reg.test(element.innerText)) { 69 | // 用字符串替换,把关键词替换成 标签,这上面设置了背景色、文本大小、文本加粗 70 | element.innerHTML = element.innerText.replace( 71 | koe_searcher_reg, 72 | '$1' 73 | ); 74 | // 让 继续执行 等于 false 75 | koe_searcher_is_countiue = false; 76 | // 显示 countiue 按钮 77 | koe_searcher_countiue.style.display = 'block'; 78 | // 设置 评论滚动到最顶端 用于后面获取 最新一个关键词所在页面位置 ( top, left ) 79 | document.querySelector('.space-right-bottom').scrollTop = 0; 80 | // 获取 最新一个关键词所在位置,$ 是 jQuery 封装好的选择器,直接把原生 js 的 Element 对象传进去,调用 offset() 就会返回 { top, left },然后取出 top 再减 200 81 | document.querySelector('.space-right-bottom').scrollTop = $(element).offset().top - 200; 82 | } 83 | }); 84 | 85 | // 如果 继续执行 等于 true 86 | if (koe_searcher_is_countiue) 87 | // 让评论滚动到最底部 88 | document.querySelector( 89 | '.space-right-bottom' 90 | ).scrollTop = document.querySelector('.router-view').clientHeight; 91 | }, 1000); 92 | } 93 | -------------------------------------------------------------------------------- /code/js-11.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_searcher_style==='undefined'){var koe_searcher_style=document.createElement('style');koe_searcher_style.innerText='.koe_searcher_button{ position: fixed;top:100px;padding:5px 10px;background-color: #FFF;border:1px #000 solid;border-radius:5px;font-size:30px; }';document.head.appendChild(koe_searcher_style);var koe_searcher_stop=document.createElement('button');koe_searcher_stop.innerText='停止';koe_searcher_stop.setAttribute('class','koe_searcher_button');koe_searcher_stop.setAttribute('style','left:50px;');document.body.appendChild(koe_searcher_stop);var koe_searcher_countiue=document.createElement('button');koe_searcher_countiue.innerText='继续';koe_searcher_countiue.setAttribute('class','koe_searcher_button');koe_searcher_countiue.setAttribute('style','left:150px;display:none');document.body.appendChild(koe_searcher_countiue);var koe_searcher_timer=null;koe_searcher_stop.addEventListener('click',function(){if(koe_searcher_timer===null)return;clearInterval(koe_searcher_timer);koe_searcher_timer=null;koe_searcher_stop.style.display='none';koe_searcher_countiue.style.display='none'});koe_searcher_countiue.addEventListener('click',function(){koe_searcher_countiue.style.display='none';koe_searcher_is_countiue=true})}var koe_searcher_keyword=prompt('请输入关键词');if(koe_searcher_keyword!==''&&koe_searcher_keyword!==null){var koe_searcher_is_countiue=true;var koe_searcher_reg=new RegExp('('+koe_searcher_keyword+')');koe_searcher_timer=setInterval(function(){if(!koe_searcher_is_countiue)return;document.querySelectorAll('.reply-item .real-reply .content-list:not(.koe_searcher_class),.reply-item .orginal-reply:not(.koe_searcher_class),.reply-item .name-field a:not(.koe_searcher_class)').forEach(function(element){if(!koe_searcher_is_countiue)return;element.setAttribute('class',element.getAttribute('class')+' koe_searcher_class');if(koe_searcher_reg.test(element.innerText)){element.innerHTML=element.innerText.replace(koe_searcher_reg,'$1');koe_searcher_is_countiue=false;koe_searcher_countiue.style.display='block';document.querySelector('.space-right-bottom').scrollTop=0;document.querySelector('.space-right-bottom').scrollTop=$(element).offset().top-200;return false}});if(koe_searcher_is_countiue)document.querySelector('.space-right-bottom').scrollTop=document.querySelector('.router-view').clientHeight},1000)};/*{"name":"搜索评论"}*/ -------------------------------------------------------------------------------- /code/js-12.js: -------------------------------------------------------------------------------- 1 | // 选取所有关注按钮 2 | document.querySelectorAll('.fans-action-btn').forEach(function (element) { 3 | // 执行 点击 事件 4 | element.click(); 5 | }); 6 | // 设置 1 秒延迟 7 | setTimeout(function () { 8 | // 选取所有弹出框 9 | document.querySelectorAll('.follow-dialog-wrap').forEach(function (element) { 10 | // 移除弹出框 11 | element.remove(); 12 | }); 13 | }, 1000); 14 | -------------------------------------------------------------------------------- /code/js-12.min.js: -------------------------------------------------------------------------------- 1 | document.querySelectorAll('.fans-action-btn').forEach(function(element){element.click()});setTimeout(function(){document.querySelectorAll('.follow-dialog-wrap').forEach(function(element){element.remove()})},1000);/*{"name":"“互粉awa”"}*/ -------------------------------------------------------------------------------- /code/js-13.js: -------------------------------------------------------------------------------- 1 | // 判断是否有 getScreenshot 函数 2 | if (typeof koe_13_getScreenshot === 'undefined') { 3 | // 没有则创建,这个函数是获取截图用的,返回图片的 base64 代码 4 | function koe_13_getScreenshot() { 5 | // 选取 video 标签 6 | var videoElement = document.querySelector('video'); 7 | // 创建画布 8 | var canvas = document.createElement('canvas'); 9 | // 设置画布宽高为 视频分标率大小 10 | canvas.width = videoElement.videoWidth; 11 | canvas.height = videoElement.videoHeight; 12 | // 向画布添加内容 13 | canvas 14 | .getContext('2d') 15 | .drawImage(videoElement, 0, 0, canvas.width, canvas.height); 16 | // 将画布内容转为 data:image/png;base64,并返回 17 | return canvas.toDataURL('image/png'); 18 | } 19 | // 设置 downloadFile,用于下载图片 20 | function koe_13_downloadFile(fileName, content) { 21 | let aLink = document.createElement('a'); 22 | let blob = koe_13_base64ToBlob(content); 23 | let evt = document.createEvent('HTMLEvents'); 24 | evt.initEvent('click', true, true); 25 | aLink.download = fileName; 26 | aLink.href = URL.createObjectURL(blob); 27 | aLink.click(); 28 | } 29 | // base64ToBlob 格式转换,在 downloadFile 中用到了 30 | function koe_13_base64ToBlob(code) { 31 | let parts = code.split(';base64,'); 32 | let contentType = parts[0].split(':')[1]; 33 | let raw = window.atob(parts[1]); 34 | let rawLength = raw.length; 35 | let uInt8Array = new Uint8Array(rawLength); 36 | for (let i = 0; i < rawLength; ++i) { 37 | uInt8Array[i] = raw.charCodeAt(i); 38 | } 39 | return new Blob([uInt8Array], { type: contentType }); 40 | } 41 | } 42 | // 如果 不存在 截图图片 43 | if (typeof koe_13_img === 'undefined') { 44 | // 则创建 45 | var koe_13_img = document.createElement('img'); 46 | koe_13_img.setAttribute('src', koe_13_getScreenshot()); 47 | koe_13_img.setAttribute( 48 | 'style', 49 | 'position: fixed;top:50%;left:50%;transform: translate(-50%,-50%);z-index:99999999' 50 | ); 51 | // 监听点击事件,执行下载 52 | koe_13_img.addEventListener('click', function () { 53 | koe_13_downloadFile('截图.png', this.src); 54 | }); 55 | document.body.appendChild(koe_13_img); 56 | } else { 57 | // 如果图片显示 58 | if (koe_13_img.style.display === '' || koe_13_img.style.display === 'block') { 59 | // 则设为隐藏 60 | koe_13_img.style.display = 'none'; 61 | } else { 62 | // 否则重新获取 base64 内容,把新获取的这一帧截图放到图片 src 中 63 | koe_13_img.setAttribute('src', koe_13_getScreenshot()); 64 | // 并将图片显示 65 | koe_13_img.style.display = 'block'; 66 | } 67 | } 68 | void 0; 69 | -------------------------------------------------------------------------------- /code/js-13.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_13_getScreenshot==='undefined'){function koe_13_getScreenshot(){var videoElement=document.querySelector('video');var canvas=document.createElement('canvas');canvas.width=videoElement.videoWidth;canvas.height=videoElement.videoHeight;canvas.getContext('2d').drawImage(videoElement,0,0,canvas.width,canvas.height);return canvas.toDataURL('image/png')}function koe_13_downloadFile(fileName,content){let aLink=document.createElement('a');let blob=koe_13_base64ToBlob(content);let evt=document.createEvent('HTMLEvents');evt.initEvent('click',true,true);aLink.download=fileName;aLink.href=URL.createObjectURL(blob);aLink.click()}function koe_13_base64ToBlob(code){let parts=code.split(';base64,');let contentType=parts[0].split(':')[1];let raw=window.atob(parts[1]);let rawLength=raw.length;let uInt8Array=new Uint8Array(rawLength);for(let i=0;i' + 36 | m3 + 37 | '' 38 | ); 39 | } 40 | ); 41 | // 获取所有转换好的链接 42 | var koe_open_url_class = document.querySelectorAll('.koe_open_url_class'); 43 | 44 | // 如果只有一个链接 则直接打开 45 | if (koe_open_url_class.length === 1) { 46 | window.open(koe_open_url_class[0].getAttribute('href')); 47 | } 48 | 49 | // [if-0] 非第一次点击则切换超链接 并打开 50 | } else { 51 | // [if-1] 如果只有一个链接 则直接打开 52 | if (koe_open_url_class.length === 1) { 53 | window.open(koe_open_url_class[0].getAttribute('href')); 54 | // [if-1] 否则会在多个链接中切换 55 | } else { 56 | // 判断点击次数 如果大于等于链接数 就让它等于 1 否则 +1 57 | koe_open_url_click_num = 58 | koe_open_url_click_num >= koe_open_url_data_id 59 | ? 1 60 | : ++koe_open_url_click_num; 61 | // 清除链接文字颜色 62 | koe_open_url_clear_color(); 63 | // 获取当前选中的链接 更改文本颜色 64 | var koe_open_url_a = document.querySelector( 65 | '.koe_open_url_class[data-id="' + koe_open_url_click_num + '"]' 66 | ); 67 | koe_open_url_a.style.color = '#F66'; 68 | // 开启 1秒延迟 69 | koe_open_url_timer = setTimeout(function () { 70 | // 时间到后打开链接、重置点击次数、清除颜色 71 | window.open(koe_open_url_a.getAttribute('href')); 72 | koe_open_url_click_num = 0; 73 | koe_open_url_clear_color(); 74 | }, 1000); 75 | } 76 | } 77 | // 清除颜色 选取所有链接 把 style color 设置为空 78 | if (typeof koe_open_url_clear_color === 'undefined') { 79 | function koe_open_url_clear_color() { 80 | koe_open_url_class.forEach(function (element) { 81 | element.style.color = ''; 82 | }); 83 | } 84 | } 85 | void 0; 86 | -------------------------------------------------------------------------------- /code/js-14.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_open_url_click_num==='undefined')var koe_open_url_click_num=-1;if(typeof koe_open_url_timer==='undefined')var koe_open_url_timer=null;if(koe_open_url_timer!==null)clearTimeout(koe_open_url_timer);if(typeof koe_open_url_data_id==='undefined'){var koe_open_url_data_id=-1;document.querySelector('#v_desc .info').innerHTML=document.querySelector('#v_desc .info').innerHTML.replace(/([^"]|^)((?:https?|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|])/g,function(m1,m2,m3){koe_open_url_data_id++;return m2+''+m3+''})}else{if(typeof koe_open_url_class==='undefined')var koe_open_url_class=document.querySelectorAll('.koe_open_url_class');koe_open_url_click_num=koe_open_url_click_num>=koe_open_url_data_id?0:++koe_open_url_click_num;koe_open_url_clear_color();var koe_open_url_a=document.querySelector('.koe_open_url_class[data-id="'+koe_open_url_click_num+'"]');koe_open_url_a.style.color='#F66';koe_open_url_timer=setTimeout(function(){window.open(koe_open_url_a.getAttribute('href'));koe_open_url_click_num=-1;koe_open_url_clear_color()},1000)}if(typeof koe_open_url_clear_color==='undefined'){function koe_open_url_clear_color(){koe_open_url_class.forEach(function(element){element.style.color=''})}};void(0);/*{"name":"转换简介链接"}*/ -------------------------------------------------------------------------------- /code/js-15.js: -------------------------------------------------------------------------------- 1 | // 最终请求:http://translate.google.cn/translate_a/single?client=gtx&dt=t&dj=1&ie=UTF-8&sl=auto&tl=zh_CN&q=test 2 | // 但无法跨域,于是自己写了个PHP 3 | 4 | // 根据浏览器获取 网络请求 对象 5 | var koe_xhr = null; 6 | if (window.XMLHttpRequest) koe_xhr = new XMLHttpRequest(); 7 | if (window.ActiveXObject) koe_xhr = new ActiveXObject('Microsoft.XMLHTTP'); 8 | 9 | // 如果成功获取 网络请求 对象 10 | if (koe_xhr !== null) { 11 | // 监听状态变化 12 | koe_xhr.onreadystatechange = function () { 13 | // 当 redayState 等于 4 并且 status 等于 200,就是请求成功 14 | if (koe_xhr.readyState === 4 && koe_xhr.status === 200) { 15 | // 将 json 字符串 转为 json 对象 16 | var json = JSON.parse(koe_xhr.responseText); 17 | 18 | // 获取 文本 显示的元素 19 | var koe_xhr_text = document.querySelector('#koe_xhr_text'); 20 | // 如果没获取到 21 | if (koe_xhr_text === null) { 22 | // 则创建 23 | koe_xhr_text = document.createElement('p'); 24 | koe_xhr_text.setAttribute('id', 'koe_xhr_text'); 25 | koe_xhr_text.setAttribute( 26 | 'style', 27 | 'position: fixed; top: 0; left: 0; padding: 3px; background-color: #000; color: #FFF; font-size: 26px;' 28 | ); 29 | document.body.appendChild(koe_xhr_text); 30 | } 31 | // 然后设置文本内容为 翻译结果 32 | koe_xhr_text.innerText = json.sentences[0].trans; 33 | } 34 | }; 35 | // 设置请求类型、请求链接、是否异步 36 | koe_xhr.open( 37 | 'GET', 38 | 'https://bili.imba97.cn/translate.php?kw=' + window.getSelection().toString(), 39 | true 40 | ); 41 | // 发送请求 42 | koe_xhr.send(null); 43 | } 44 | -------------------------------------------------------------------------------- /code/js-15.min.js: -------------------------------------------------------------------------------- 1 | var koe_xhr=null;if(window.XMLHttpRequest)koe_xhr=new XMLHttpRequest();if(window.ActiveXObject)koe_xhr=new ActiveXObject('Microsoft.XMLHTTP');if(koe_xhr!==null){koe_xhr.onreadystatechange=function(){if(koe_xhr.readyState===4&&koe_xhr.status===200){var json=JSON.parse(koe_xhr.responseText);var koe_xhr_text=document.querySelector('#koe_xhr_text');if(koe_xhr_text===null){koe_xhr_text=document.createElement('p');koe_xhr_text.setAttribute('id','koe_xhr_text');koe_xhr_text.setAttribute('style','position: fixed; top: 0; left: 0; padding: 3px; background-color: #000; color: #FFF; font-size: 26px;');document.body.appendChild(koe_xhr_text)}koe_xhr_text.innerText=json.sentences[0].trans}};koe_xhr.open('GET','https://bili.imba97.cn/translate.php?kw='+window.getSelection().toString(),true);koe_xhr.send(null)};/*{"name":"一键英译中"}*/ -------------------------------------------------------------------------------- /code/js-15.server.php: -------------------------------------------------------------------------------- 1 | 3 秒后将跳转至首页,如果您的浏览器没有跳转,请点击这里'; 26 | koe_16_text_2.setAttribute( 27 | 'style', 28 | 'margin-top: 50px; text-align: center; font-size: 16px; color: #999;' 29 | ); 30 | 31 | // 倒计时 3 秒 32 | var koe_16_n = 3; 33 | var koe_16_timer = setInterval(function () { 34 | // 设置第二行字中 span 内容为 --koe_16_n 35 | koe_16_text_2.children[0].innerText = --koe_16_n; 36 | // 减到 0 则跳转 37 | if (koe_16_n === 0) { 38 | koe_16_text_2.innerText = '有缘再会 _(•̀ᴗ•́ 」∠ ❀)_'; 39 | clearInterval(koe_16_timer); 40 | setTimeout('window.location.href = "/";', 1000); 41 | } 42 | }, 1000); 43 | 44 | // 在背景元素中添图片和两行字 45 | koe_16_background.appendChild(koe_16_img); 46 | koe_16_background.appendChild(koe_16_text_1); 47 | koe_16_background.appendChild(koe_16_text_2); 48 | 49 | // 把背景元素添加到 body 上 50 | document.body.appendChild(koe_16_background); 51 | // 设置 body 超出内容隐藏(隐藏滚动条) 52 | document.body.style.overflow = 'hidden'; 53 | void 0; 54 | -------------------------------------------------------------------------------- /code/js-16.min.js: -------------------------------------------------------------------------------- 1 | var koe_16_background=document.createElement('div');koe_16_background.setAttribute('style','position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #FFF; overflow-x: auto; z-index: 99999;');var koe_16_img=document.createElement('div');koe_16_img.setAttribute('style','margin: 50px auto; width: 800px; height: 414px; background-image: url(https://s1.hdslb.com/bfs/static/blive/blfe-live-room/static/img/room-block.abb1110.png);');var koe_16_text_1=document.createElement('p');koe_16_text_1.innerText='这个房间已经被封禁(至 1970-01-01 00:00:00)!(╯°口°)╯(┴—┴';koe_16_text_1.setAttribute('style','text-align: center; font-size: 18px; color: #666;');var koe_16_text_2=document.createElement('p');koe_16_text_2.innerHTML='3 秒后将跳转至首页,如果您的浏览器没有跳转,请点击这里';koe_16_text_2.setAttribute('style','margin-top: 50px; text-align: center; font-size: 16px; color: #999;');var koe_16_n=3;var koe_16_timer=setInterval(function(){koe_16_text_2.children[0].innerText=--koe_16_n;if(koe_16_n===0){koe_16_text_2.innerText='有缘再会 _(•̀ᴗ•́ 」∠ ❀)_';clearInterval(koe_16_timer);setTimeout('window.location.href = "/";',1000)}},1000);koe_16_background.appendChild(koe_16_img);koe_16_background.appendChild(koe_16_text_1);koe_16_background.appendChild(koe_16_text_2);document.body.appendChild(koe_16_background);document.body.style.overflow='hidden';void(0);/*{"name":"梅开二度(封禁页面效果)"}*/ -------------------------------------------------------------------------------- /code/js-17.js: -------------------------------------------------------------------------------- 1 | // 设置参数,aid、like、csrf 2 | var koe_17_param = 'aid=' + __INITIAL_STATE__.aid + '&like=1&csrf=' + getCookie('bili_jct'); 3 | // 新建 网络请求 对象 4 | var koe_17_xhr = new XMLHttpRequest(); 5 | // 设置请求类型、请求地址、是否异步 6 | koe_17_xhr.open( 7 | 'POST', 8 | 'https://api.bilibili.com/x/web-interface/archive/like', 9 | true 10 | ); 11 | // 携带验证 ( cookie ) 12 | koe_17_xhr.withCredentials = true; 13 | // 设置请求头 Content-Type 14 | koe_17_xhr.setRequestHeader( 15 | 'content-type', 16 | 'application/x-www-form-urlencoded' 17 | ); 18 | // 发送请求,并将参数传入其中 19 | koe_17_xhr.send(koe_17_param); 20 | // 监听状态变化 21 | koe_17_xhr.onreadystatechange = function () { 22 | // 判断是否请求成功 23 | if (koe_17_xhr.readyState === 4 && koe_17_xhr.status === 200) { 24 | // 打印结果 25 | console.log(koe_17_xhr.responseText); 26 | } 27 | }; 28 | void 0; 29 | -------------------------------------------------------------------------------- /code/js-17.min.js: -------------------------------------------------------------------------------- 1 | var koe_17_param='aid='+__INITIAL_STATE__.aid+'&like=1&csrf='+getCookie('bili_jct');var koe_17_xhr=new XMLHttpRequest();koe_17_xhr.open('POST','https://api.bilibili.com/x/web-interface/archive/like',true);koe_17_xhr.withCredentials=true;koe_17_xhr.setRequestHeader('content-type','application/x-www-form-urlencoded');koe_17_xhr.send(koe_17_param);koe_17_xhr.onreadystatechange=function(){if(koe_17_xhr.readyState===4&&koe_17_xhr.status===200){console.log(koe_17_xhr.responseText)}};void(0);/*{"name":"用网络请求给视频点赞"}*/ -------------------------------------------------------------------------------- /code/js-18.js: -------------------------------------------------------------------------------- 1 | // 如果没有 bv2av 则创建 2 | if (typeof bv2av_com_bv2av === 'undefined') { 3 | const bv2av_com_table = [...'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF']; 4 | const bv2av_com_s = [11, 10, 3, 8, 4, 6]; 5 | const bv2av_com_xor = 177451812; 6 | const bv2av_com_add = 8728348608; 7 | 8 | var bv2av_com_bv2av = (bv) => { 9 | let str = ''; 10 | if (bv.length === 12) { 11 | str = bv; 12 | } else if (bv.length === 10) { 13 | str = `BV${bv}`; 14 | // 根据官方 API,BV 号开头的 BV1 其实可以省略 15 | // 不过单独省略个 B 又不行( 16 | } else if (bv.length === 9) { 17 | str = `BV1${bv}`; 18 | } else { 19 | return '¿你在想桃子?'; 20 | } 21 | if ( 22 | !str.match( 23 | /[Bb][Vv][fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF]{10}/gu 24 | ) 25 | ) { 26 | return '¿你在想桃子?'; 27 | } 28 | 29 | let result = 0; 30 | let i = 0; 31 | while (i < 6) { 32 | result += bv2av_com_table.indexOf(str[bv2av_com_s[i]]) * 58 ** i; 33 | i += 1; 34 | } 35 | return (result - bv2av_com_add) ^ bv2av_com_xor; 36 | }; 37 | } 38 | 39 | // 选取视频列表 40 | document.querySelectorAll('.cube-list li').forEach(function (element) { 41 | // 获取 aid 42 | var aid = bv2av_com_bv2av(element.getAttribute('data-aid')); 43 | // 以下是 #17 中的网络请求 44 | var koe_18_param = 'aid=' + aid + '&like=1&csrf=' + getCookie('bili_jct'); 45 | var koe_18_xhr = new XMLHttpRequest(); 46 | koe_18_xhr.open( 47 | 'POST', 48 | 'https://api.bilibili.com/x/web-interface/archive/like', 49 | true 50 | ); 51 | koe_18_xhr.withCredentials = true; 52 | koe_18_xhr.setRequestHeader( 53 | 'content-type', 54 | 'application/x-www-form-urlencoded' 55 | ); 56 | koe_18_xhr.send(koe_18_param); 57 | koe_18_xhr.onreadystatechange = function () { 58 | if (koe_18_xhr.readyState === 4 && koe_18_xhr.status === 200) { 59 | var json = JSON.parse(koe_18_xhr.responseText); 60 | // code 等于 0 说明点赞成功 61 | if (json.code === 0) { 62 | console.log('成功'); 63 | } else { 64 | console.log('失败'); 65 | } 66 | } 67 | }; 68 | }); 69 | void 0; 70 | -------------------------------------------------------------------------------- /code/js-18.min.js: -------------------------------------------------------------------------------- 1 | if(typeof bv2av_com_bv2av==='undefined'){const bv2av_com_table=[...'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF'];const bv2av_com_s=[11,10,3,8,4,6];const bv2av_com_xor=177451812;const bv2av_com_add=8728348608;var bv2av_com_bv2av=(bv)=>{let str='';if(bv.length===12){str=bv}else if(bv.length===10){str=`BV${bv}`}else if(bv.length===9){str=`BV1${bv}`}else{return'¿你在想桃子?'}if(!str.match(/[Bb][Vv][fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF]{10}/gu)){return'¿你在想桃子?'}let result=0;let i=0;while(i<6){result+=bv2av_com_table.indexOf(str[bv2av_com_s[i]])*58**i;i+=1}return(result-bv2av_com_add)^bv2av_com_xor}}document.querySelectorAll('.cube-list li').forEach(function(element){var aid=bv2av_com_bv2av(element.getAttribute('data-aid'));var koe_18_param='aid='+aid+'&like=1&csrf='+getCookie('bili_jct');var koe_18_xhr=new XMLHttpRequest();koe_18_xhr.open('POST','https://api.bilibili.com/x/web-interface/archive/like',true);koe_18_xhr.withCredentials=true;koe_18_xhr.setRequestHeader('content-type','application/x-www-form-urlencoded');koe_18_xhr.send(koe_18_param);koe_18_xhr.onreadystatechange=function(){if(koe_18_xhr.readyState===4&&koe_18_xhr.status===200){var json=JSON.parse(koe_18_xhr.responseText);if(json.code===0){console.log('成功')}else{console.log('失败')}}}});void(0);/*{"name":"点赞一整页"}*/ -------------------------------------------------------------------------------- /code/js-19.js: -------------------------------------------------------------------------------- 1 | // 储存所有 aid 2 | var koe_19_aids = new Array(); 3 | // 页数 默认为 1 4 | var koe_19_page = 1; 5 | // 调用 网络请求函数 并传入 页数 6 | koe_19_search(koe_19_page); 7 | // 网络请求函数 8 | function koe_19_search(page) { 9 | // 新建 网络请求 10 | var koe_19_search_xhr = new XMLHttpRequest(); 11 | // 设置 请求类型、地址、异步,并将页数设置为传进来的参数 page 12 | koe_19_search_xhr.open('GET', 'https://api.bilibili.com/x/space/arc/search?mid=2198461&ps=30&tid=0&pn=' + page + '&keyword=&order=pubdate&jsonp=jsonp', true); 13 | // 发送网络请求 14 | koe_19_search_xhr.send(); 15 | // 监听状态 16 | koe_19_search_xhr.onreadystatechange = function() { 17 | // 如果请求成功 18 | if(koe_19_search_xhr.readyState === 4 && koe_19_search_xhr.status === 200) { 19 | // 获取 返回结果并转为 json 20 | var json = JSON.parse(koe_19_search_xhr.responseText); 21 | // 如果视频列表没视频,则输出所有 aid,并停止运行 22 | if(json.data.list.vlist.length === 0) { 23 | console.log(koe_19_aids); 24 | return; 25 | } 26 | // 循环视频列表,取出 aid,并将 aid 放入 aids 数组 27 | json.data.list.vlist.forEach(function(item) { 28 | koe_19_aids.push(item.aid); 29 | }); 30 | // 让 page + 1 并在此调用自身,执行下一次请求 31 | koe_19_search(++koe_19_page); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /code/js-19.min.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunsetMkt/js/6d522172fac6ccfd0e6fd7d3e1d881df959b3200/code/js-19.min.js -------------------------------------------------------------------------------- /code/js-2.js: -------------------------------------------------------------------------------- 1 | // koe_clicked 类型 和 #koe_msg 元素是否存在,避免重复创建音乐 2 | if (document.querySelector('#koe_msg') === null) { 3 | // [if-0] 判断是否有 video 标签,没有则创建 4 | if (document.querySelector('#koe_video') === null) { 5 | // 创建左上角提示 6 | var koe_msg = document.createElement('p'); 7 | koe_msg.innerText = '正在去世'; 8 | koe_msg.setAttribute('id', 'koe_msg'); 9 | koe_msg.setAttribute( 10 | 'style', 11 | 'position:fixed;top:0;left:0;width:130px;height:30px;line-height:30px;text-align:center;background-color:#000;color:#FFF;font-size:26px;z-index:99999999' 12 | ); 13 | document.body.appendChild(koe_msg); 14 | 15 | // 是否正在播放 16 | var koe_played = true; 17 | // 创建 video 标签 18 | var koe_video = document.createElement('video'); 19 | koe_video.setAttribute('id', 'koe_video'); 20 | koe_video.setAttribute('autoplay', ''); 21 | koe_video.setAttribute('name', 'media'); 22 | // 监听音乐加载成功事件 23 | koe_video.addEventListener('canplaythrough', function () { 24 | koe_msg.remove(); 25 | document.body.setAttribute( 26 | 'style', 27 | 'filter: grayscale(100%); -moz-filter: grayscale(100%); -o-filter: grayscale(100%); -webkit-filter: grayscale(100%);' 28 | ); 29 | }); 30 | // 监听暂停事件 31 | koe_video.addEventListener('pause', function () { 32 | // 暂停后设置页面 style 取消灰色 33 | document.body.setAttribute('style', ''); 34 | koe_played = false; 35 | }); 36 | // 监听播放事件 37 | koe_video.addEventListener('play', function () { 38 | // 设置页面为灰色 39 | document.body.setAttribute( 40 | 'style', 41 | 'filter: grayscale(100%); -moz-filter: grayscale(100%); -o-filter: grayscale(100%); -webkit-filter: grayscale(100%);' 42 | ); 43 | koe_played = true; 44 | }); 45 | // 添加音乐资源 46 | var koe_source = document.createElement('source'); 47 | koe_source.setAttribute( 48 | 'src', 49 | 'https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLWwtTk5nMVlSVlFJRThJclE/ZT1HbFZ5VHE=.mp3' 50 | ); 51 | koe_source.setAttribute('type', 'audio/mpeg'); 52 | koe_video.appendChild(koe_source); 53 | // 添加至 video 标签 54 | document.body.appendChild(koe_video); 55 | 56 | // [if-0] 有则根据是否正在播放,控制暂停和继续播放 57 | } else { 58 | if (koe_played) { 59 | document.querySelector('#koe_video').pause(); 60 | } else { 61 | document.querySelector('#koe_video').play(); 62 | } 63 | } 64 | } 65 | void 0; 66 | -------------------------------------------------------------------------------- /code/js-2.min.js: -------------------------------------------------------------------------------- 1 | if(document.querySelector('#koe_msg')===null){if(document.querySelector('#koe_video')===null){var koe_msg=document.createElement('p');koe_msg.innerText='正在去世';koe_msg.setAttribute('id','koe_msg');koe_msg.setAttribute('style','position:fixed;top:0;left:0;width:130px;height:30px;line-height:30px;text-align:center;background-color:#000;color:#FFF;font-size:26px;z-index:99999999');document.body.appendChild(koe_msg);var koe_played=true;var koe_video=document.createElement('video');koe_video.setAttribute('id','koe_video');koe_video.setAttribute('autoplay','');koe_video.setAttribute('name','media');koe_video.addEventListener('canplaythrough',function(){koe_msg.remove();document.body.setAttribute('style','filter: grayscale(100%); -moz-filter: grayscale(100%); -o-filter: grayscale(100%); -webkit-filter: grayscale(100%);')});koe_video.addEventListener('pause',function(){document.body.setAttribute('style','');koe_played=false});koe_video.addEventListener('play',function(){document.body.setAttribute('style','filter: grayscale(100%); -moz-filter: grayscale(100%); -o-filter: grayscale(100%); -webkit-filter: grayscale(100%);');koe_played=true});var koe_source=document.createElement('source');koe_source.setAttribute('src','https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLWwtTk5nMVlSVlFJRThJclE/ZT1HbFZ5VHE=.mp3');koe_source.setAttribute('type','audio/mpeg');koe_video.appendChild(koe_source);document.body.appendChild(koe_video)}else{if(koe_played){document.querySelector('#koe_video').pause()}else{document.querySelector('#koe_video').play()}}}void(0);/*{"name":"用JS抬走网页"}*/ -------------------------------------------------------------------------------- /code/js-20.js: -------------------------------------------------------------------------------- 1 | // 判断 背景 没被创建 2 | if (document.querySelector('#koe_20_background') === null) { 3 | 4 | // 选取所有 video 和 audio 标签 5 | var koe_20_videos = document.querySelectorAll('video,audio'); 6 | 7 | // 创建 背景 div 8 | var koe_20_background = document.createElement('div'); 9 | // 设置 背景 id 10 | koe_20_background.setAttribute('id', 'koe_20_background'); 11 | // 设置 背景 style,覆盖这个网页、黑色背景、最顶层、不显示 12 | koe_20_background.setAttribute( 13 | 'style', 14 | 'position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; z-index: 9999999; display: none;' 15 | ); 16 | 17 | // 创建 video 标签 18 | var koe_20_video = document.createElement('video'); 19 | 20 | // 设置 自动播放、name、style 21 | koe_20_video.setAttribute('autoplay', ''); 22 | koe_20_video.setAttribute('name', 'media'); 23 | koe_20_video.setAttribute( 24 | 'style', 25 | 'position: fixed; top: 0; left: 0; width: 100%; height: 100%;' 26 | ); 27 | 28 | // 监听视频播放结束 删除 背景 29 | koe_20_video.addEventListener('ended', function () { 30 | document.body.removeChild(koe_20_background); 31 | }); 32 | 33 | // 监听视频加载完成 让背景显示、让页面的 video 和 audio 暂停播放 34 | koe_20_video.addEventListener('canplaythrough', function () { 35 | koe_20_background.style.display = 'block'; 36 | koe_20_videos.forEach(function(element){element.pause()}); 37 | }); 38 | 39 | // 添加资源 40 | var koe_20_source = document.createElement('source'); 41 | // 视频地址 42 | koe_20_source.setAttribute( 43 | 'src', 44 | 'https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLW9IZklDRkRSYl9kYVJydnc/ZT1vQnZIRXY=.mp4' 45 | ); 46 | // 设置格式 47 | koe_20_source.setAttribute('type', 'video/mp4'); 48 | // 将 资源 添加至 视频标签 中 49 | koe_20_video.appendChild(koe_20_source); 50 | // 将 视频 添加至 背景 中 51 | koe_20_background.appendChild(koe_20_video); 52 | // 将 背景 添加至 body 中 53 | document.body.appendChild(koe_20_background); 54 | } 55 | -------------------------------------------------------------------------------- /code/js-20.min.js: -------------------------------------------------------------------------------- 1 | if(document.querySelector('#koe_20_background')===null){var koe_20_videos=document.querySelectorAll('video:not(.koe_20_video),audio');var koe_20_background=document.createElement('div');koe_20_background.setAttribute('id','koe_20_background');koe_20_background.setAttribute('style','position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; z-index: 9999999; display: none;');var koe_20_video=document.createElement('video');koe_20_video.setAttribute('autoplay','');koe_20_video.setAttribute('name','media');koe_20_video.setAttribute('style','position: fixed; top: 0; left: 0; width: 100%; height: 100%;');koe_20_video.addEventListener('ended',function(){document.body.removeChild(koe_20_background)});koe_20_video.addEventListener('canplaythrough',function(){koe_20_background.style.display='block';koe_20_videos.forEach(function(element){element.pause()})});var koe_20_source=document.createElement('source');koe_20_source.setAttribute('src','https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLW9IZklDRkRSYl9kYVJydnc/ZT1vQnZIRXY=.mp4');koe_20_source.setAttribute('type','video/mp4');koe_20_video.appendChild(koe_20_source);koe_20_background.appendChild(koe_20_video);document.body.appendChild(koe_20_background)};/*{"name":"美冴铁拳"}*/ -------------------------------------------------------------------------------- /code/js-21.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_21_jquery === 'undefined') { 2 | function koe_21_jquery() { 3 | if($('body').is(':hidden')) { 4 | $('body').fadeIn(); 5 | } else { 6 | $('body').fadeOut(); 7 | } 8 | } 9 | } 10 | 11 | if(typeof jQuery === 'function') { 12 | koe_21_jquery(); 13 | } else { 14 | if(document.querySelector('#koe_21_jquery') === null) { 15 | var koe_21_script = document.createElement('script'); 16 | koe_21_script.type = 'text/javascript'; 17 | koe_21_script.src = 'https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js'; 18 | koe_21_script.setAttribute('id', 'koe_21_jquery'); 19 | document.head.appendChild(koe_21_script); 20 | koe_21_script.onload = koe_21_jquery; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /code/js-21.min.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunsetMkt/js/6d522172fac6ccfd0e6fd7d3e1d881df959b3200/code/js-21.min.js -------------------------------------------------------------------------------- /code/js-22.js: -------------------------------------------------------------------------------- 1 | // 判断是否没添加 audio 2 | if(document.querySelector('#koe_22_audio') === null) { 3 | // 获取选中文本 并去除两端空格 4 | var koe_22_selected = window.getSelection().toString().replace(/(^\s+|\s+$)/, ''); 5 | // 选中文本 不等于 空 6 | if(koe_22_selected !== '') { 7 | // 创建 audio 标签 8 | var koe_22_audio = document.createElement('audio'); 9 | // 设置 自动播放 10 | koe_22_audio.setAttribute('autoplay', ''); 11 | // 设置 name 12 | koe_22_audio.setAttribute('name', 'media'); 13 | // 设置 id 14 | koe_22_audio.setAttribute('id', 'koe_22_audio'); 15 | 16 | // 监听播放结束,结束后删除 audio 标签 17 | koe_22_audio.addEventListener('ended', function() { 18 | this.remove(); 19 | }); 20 | 21 | // 创建 资源 22 | var koe_22_source = document.createElement('source'); 23 | // 设置 资源格式 24 | koe_22_source.setAttribute('type', 'audio/mpeg'); 25 | // 设置 src 等于 百度的文字转音频接口 26 | koe_22_source.src = 'http://tts.baidu.com/text2audio?lan=en&ie=UTF-8&spd=5&text=' + koe_22_selected; 27 | 28 | // 将 资源 添加至 audio 标签中 29 | koe_22_audio.appendChild(koe_22_source); 30 | // 将 audio 标签 添加至 body 中 31 | document.body.appendChild(koe_22_audio); 32 | } 33 | } -------------------------------------------------------------------------------- /code/js-22.min.js: -------------------------------------------------------------------------------- 1 | if(document.querySelector('#koe_22_audio')===null){var koe_22_selected=window.getSelection().toString().replace(/(^\s+|\s+$)/,'');if(koe_22_selected!==''){var koe_22_audio=document.createElement('audio');koe_22_audio.setAttribute('autoplay','');koe_22_audio.setAttribute('name','media');koe_22_audio.setAttribute('id','koe_22_audio');koe_22_audio.addEventListener('ended',function(){this.remove()});var koe_22_source=document.createElement('source');koe_22_source.setAttribute('type','audio/mpeg');koe_22_source.src='http://tts.baidu.com/text2audio?lan=en&ie=UTF-8&spd=5&text='+koe_22_selected;koe_22_audio.appendChild(koe_22_source);document.body.appendChild(koe_22_audio)}};/*{"name":"一键朗读英文"}*/ -------------------------------------------------------------------------------- /code/js-23.js: -------------------------------------------------------------------------------- 1 | if(document.querySelector('#koe_23_audio') === null) { 2 | 3 | // 选取页面视频 4 | var koe_23_videos = document.querySelectorAll('video'); 5 | 6 | // 提示 7 | var koe_23_msg = document.createElement('span'); 8 | koe_23_msg.setAttribute('style', 'position: fixed; top: 0; left: 0; padding: 3px 5px; background-color: #000; color: #FFF; font-size: 24px; z-index: 9999999'); 9 | koe_23_msg.innerText = '眼保健操准备开始'; 10 | document.body.appendChild(koe_23_msg); 11 | 12 | // 背景 13 | var koe_23_background = document.createElement('div'); 14 | koe_23_background.setAttribute('style', 'position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #FFF; z-index: 9999999; display: none;'); 15 | 16 | // 眼保健操 图 17 | var koe_23_img = document.createElement('img'); 18 | koe_23_img.src = 'https://pic.downk.cc/item/5eeda42f14195aa5946e45fb.jpg'; 19 | koe_23_img.setAttribute('style', 'margin: 0 auto; height: 100%; display: block;'); 20 | 21 | // 音频 22 | var koe_23_audio = document.createElement('audio'); 23 | koe_23_audio.src = 'https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLW9KYldlRjBpWXlMWG1rUWc=.mp3'; 24 | koe_23_audio.setAttribute('id', 'koe_23_audio'); 25 | // 监听 音频加载完成 26 | koe_23_audio.addEventListener('canplaythrough', function() { 27 | koe_23_background.appendChild(koe_23_img); 28 | document.body.appendChild(koe_23_background); 29 | }); 30 | // 监听 播放 31 | koe_23_audio.addEventListener('play', function() { 32 | koe_23_msg.style.display = 'none'; 33 | koe_23_background.style.display = 'block'; 34 | }); 35 | // 监听 音频播放完成 36 | koe_23_audio.addEventListener('ended', function() { 37 | koe_23_msg.style.display = 'block'; 38 | koe_23_background.style.display = 'none'; 39 | }); 40 | document.body.appendChild(koe_23_audio); 41 | // 设置 计时器 每过半小时执行一次 42 | setInterval(function() { 43 | // 暂停视频 44 | koe_23_videos.forEach(function(element) { 45 | element.pause(); 46 | }); 47 | 48 | // 取消全屏 49 | if(document.exitFullscreen) document.exitFullscreen(); 50 | if(document.mozCancelFullScreen) document.mozCancelFullScreen(); 51 | if(document.webkitCancelFullScreen) document.webkitCancelFullScreen(); 52 | 53 | // 重新将音频时间设置成 0 54 | koe_23_audio.currentTime = 0; 55 | // 播放音频 56 | koe_23_audio.play(); 57 | 58 | }, 1800000); 59 | 60 | } 61 | -------------------------------------------------------------------------------- /code/js-23.min.js: -------------------------------------------------------------------------------- 1 | if(document.querySelector('#koe_23_audio')===null){var koe_23_videos=document.querySelectorAll('video');var koe_23_msg=document.createElement('span');koe_23_msg.setAttribute('style','position: fixed; top: 0; left: 0; padding: 3px 5px; background-color: #000; color: #FFF; font-size: 24px; z-index: 9999999');koe_23_msg.innerText='眼保健操准备开始';document.body.appendChild(koe_23_msg);var koe_23_background=document.createElement('div');koe_23_background.setAttribute('style','position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #FFF; z-index: 9999999; display: none;');var koe_23_img=document.createElement('img');koe_23_img.src='https://pic.downk.cc/item/5eeda42f14195aa5946e45fb.jpg';koe_23_img.setAttribute('style','margin: 0 auto; height: 100%; display: block;');var koe_23_audio=document.createElement('audio');koe_23_audio.src='https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLW9KYldlRjBpWXlMWG1rUWc=.mp3';koe_23_audio.setAttribute('id','koe_23_audio');koe_23_audio.addEventListener('canplaythrough',function(){koe_23_background.appendChild(koe_23_img);document.body.appendChild(koe_23_background)});koe_23_audio.addEventListener('play',function(){koe_23_msg.style.display='none';koe_23_background.style.display='block'});koe_23_audio.addEventListener('ended',function(){koe_23_msg.style.display='block';koe_23_background.style.display='none'});document.body.appendChild(koe_23_audio);setInterval(function(){koe_23_videos.forEach(function(element){element.pause()});if(document.exitFullscreen)document.exitFullscreen();if(document.mozCancelFullScreen)document.mozCancelFullScreen();if(document.webkitCancelFullScreen)document.webkitCancelFullScreen();koe_23_audio.currentTime=0;koe_23_audio.play()},15000)};/*{"name":"眼保健操现在开始"}*/ -------------------------------------------------------------------------------- /code/js-24.min.js: -------------------------------------------------------------------------------- 1 | if(document.querySelector('#koe_24_search_box')===null){var koe_24_default_num=1;var koe_24_current_page=0;var is_search={upName:true,title:true,desc:true,dynamic:true,};var koe_24_style=document.createElement('style');koe_24_style.innerText=`#koe_24_search_box,.koe_24_background,.koe_24_search_text,.koe_24_search_button,.koe_24_search_list,.koe_24_current_page_p,.koe_24_search_setup{position:fixed}#koe_24_search_box{top:0;left:0;width:100%;height:100%;z-index:99999}.koe_24_background{top:0;left:0;width:100%;height:100%;background-color:#000;opacity:0.8;z-index:-1}.koe_24_search_text{top:50px;left:50px;padding:2px 5px;width:320px;height:30px;line-height:30px;font-size:24px;color:#FFF;background:none;border:none;border-bottom:2px#FFF solid}.koe_24_search_button{top:50px;left:400px;width:100px;height:32px;line-height:32px;font-size:22px;color:#FFF;background-color:#666;border:1px#000 solid;border-radius:5px}.koe_24_search_button:active{background-color:#999}.koe_24_search_list{top:130px;left:50px;height:760px;overflow-y:auto}.koe_24_search_list li{position:relative;margin:5px;width:210px;height:180px;list-style:none;float:left;overflow:hidden;cursor:pointer}.koe_24_search_list::after{clear:both}.koe_24_search_list li img{position:absolute;top:70px;left:50%;border-radius:5px;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);transform:translate(-50%,-50%);height:140px}.koe_24_search_list li .koe_24_search_li_title{position:absolute;bottom:0;left:0;padding:0 5px;width:100%;height:30px;line-height:30px;color:#FFF;font-size:20px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.koe_24_current_page_p{top:50px;right:50px;color:#FFF;font-size:20px}.koe_24_search_setup{top:50px;left:520px;height:30px;line-height:30px;color:#FFF;font-size:20px}.koe_24_search_setup input{transform:scale(1.5);-webkit-transform:scale(1.5);-moz-transform:scale(1.5);-ms-transform:scale(1.5);-o-transform:scale(1.5)}`;document.head.appendChild(koe_24_style);var koe_24_search_box=document.createElement('div');koe_24_search_box.setAttribute('id','koe_24_search_box');var koe_24_background=document.createElement('div');koe_24_background.setAttribute('class','koe_24_background');var koe_24_search_text=document.createElement('input');koe_24_search_text.type='text';koe_24_search_text.setAttribute('class','koe_24_search_text');koe_24_search_text.setAttribute('placeholder','请输入关键词,多个用“,”隔开');koe_24_search_text.onchange=function(){koe_24_search_list.innerHTML='';koe_24_search_button.innerText='搜索';koe_24_offset_dynamic_id='';koe_24_current_page=0;koe_24_current_page_p.innerText='';koe_24_num=koe_24_default_num};var koe_24_search_button=document.createElement('button');koe_24_search_button.setAttribute('class','koe_24_search_button');koe_24_search_button.innerText='搜索';koe_24_search_button.addEventListener('click',function(){koe_24_search_button.innerText='下一页';koe_24_getDynamic()});var koe_24_search_list=document.createElement('ul');koe_24_search_list.setAttribute('class','koe_24_search_list');var koe_24_current_page_p=document.createElement('p');koe_24_current_page_p.setAttribute('class','koe_24_current_page_p');var koe_24_search_setup=document.createElement('p');koe_24_search_setup.setAttribute('class','koe_24_search_setup');koe_24_search_setup.innerHTML='搜索设置:       ';koe_24_search_box.appendChild(koe_24_background);koe_24_search_box.appendChild(koe_24_search_text);koe_24_search_box.appendChild(koe_24_search_button);koe_24_search_box.appendChild(koe_24_search_list);koe_24_search_box.appendChild(koe_24_current_page_p);koe_24_search_box.appendChild(koe_24_search_setup);document.body.appendChild(koe_24_search_box);for(koe_setup_index in is_search){var koe_setup_element=document.querySelector('.koe_24_search_setup input[data-id="'+koe_setup_index+'"]');koe_setup_element.checked=is_search[koe_setup_index];koe_setup_element.onchange=function(){is_search[this.getAttribute('data-id')]=this.checked}}var koe_24_xhr_url='';var koe_24_offset_dynamic_id='';var koe_24_is_finished=true;var koe_24_num=koe_24_default_num;function koe_24_getDynamic(){if(!koe_24_is_finished)return;koe_24_is_finished=false;var koe_24_search_reg=new RegExp('('+koe_24_search_text.value.replace(',','|')+')');if(koe_24_offset_dynamic_id===''){koe_24_xhr_url='https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid='+/DedeUserID=(\d+)/.exec(document.cookie)[1]+'&type_list=8,512,4097,4098,4099,4100,4101'}else{koe_24_xhr_url='https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_history?uid='+/DedeUserID=(\d+)/.exec(document.cookie)[1]+'&type_list=8,512,4097,4098,4099,4100,4101&offset_dynamic_id='+koe_24_offset_dynamic_id}var koe_24_xhr=new XMLHttpRequest();koe_24_xhr.open('GET',koe_24_xhr_url,true);koe_24_xhr.withCredentials=true;koe_24_xhr.send();koe_24_xhr.onreadystatechange=function(){if(koe_24_xhr.readyState===4&&koe_24_xhr.status===200){koe_24_is_finished=true;koe_24_current_page_p.innerText='当前页数:'+ ++koe_24_current_page;var json=JSON.parse(koe_24_xhr.responseText);json.data.cards.forEach(function(item){var videoData=JSON.parse(item.card);if(typeof videoData.apiSeasonInfo!=='undefined'){var data={isAnime:true,title:videoData.apiSeasonInfo.title,pic:videoData.cover,url:videoData.url,}}else{var data={isAnime:false,upName:item.desc.user_profile.info.uname,title:videoData.title,desc:videoData.desc,dynamic:videoData.dynamic,pic:videoData.pic,url:'https://www.bilibili.com/video/'+item.desc.bvid,}}if((!data.isAnime&&is_search.upName&&koe_24_search_reg.test(data.upName))||(is_search.title&&koe_24_search_reg.test(data.title))||(!data.isAnime&&is_search.desc&&koe_24_search_reg.test(data.desc))||(!data.isAnime&&is_search.dynamic&&koe_24_search_reg.test(data.dynamic))){var koe_24_search_li=document.createElement('li');koe_24_search_li.innerHTML='

'+data.title+'

';koe_24_search_li.addEventListener('click',function(){window.open(data.url)});koe_24_search_list.appendChild(koe_24_search_li)}});koe_24_offset_dynamic_id=koe_24_offset_dynamic_id===''?json.data.history_offset:json.data.next_offset;if(--koe_24_num>0){koe_24_getDynamic()}}}}}else{if(koe_24_search_box.style.display===''||koe_24_search_box.style.display==='block'){koe_24_search_box.style.display='none'}else{koe_24_search_box.style.display='block'}}void(0);/*{"name":"搜索推送视频"}*/ -------------------------------------------------------------------------------- /code/js-25.js: -------------------------------------------------------------------------------- 1 | // 统计点赞、投币、收藏/播放量 比率最高 2 | 3 | var koe_25_mid = /space\.bilibili\.com\/(\d+)/.exec(window.location.href); 4 | 5 | // 储存所有 aid 6 | var koe_25_aids = new Array(); 7 | // 页数 默认为 1 8 | var koe_25_page = 1; 9 | // 调用 网络请求函数 并传入 页数 10 | if (koe_25_mid !== null) koe_25_search(koe_25_page); 11 | // 网络请求函数 12 | function koe_25_search(page) { 13 | // 新建 网络请求 14 | var koe_25_search_xhr = new XMLHttpRequest(); 15 | // 设置 请求类型、地址、异步,并将页数设置为传进来的参数 page 16 | koe_25_search_xhr.open( 17 | 'GET', 18 | 'https://api.bilibili.com/x/space/arc/search?mid=' + 19 | koe_25_mid[1] + 20 | '&ps=30&tid=0&pn=' + 21 | page + 22 | '&keyword=&order=pubdate&jsonp=jsonp', 23 | true 24 | ); 25 | // 发送网络请求 26 | koe_25_search_xhr.send(); 27 | // 监听状态 28 | koe_25_search_xhr.onreadystatechange = function () { 29 | // 如果请求成功 30 | if ( 31 | koe_25_search_xhr.readyState === 4 && 32 | koe_25_search_xhr.status === 200 33 | ) { 34 | // 获取 返回结果并转为 json 35 | var json = JSON.parse(koe_25_search_xhr.responseText); 36 | // 如果视频列表没视频,则输出所有 aid,并停止运行 37 | if (json.data.list.vlist.length === 0) { 38 | koe_25_stat(); 39 | return; 40 | } 41 | // 循环视频列表,取出 aid,并将 aid 放入 aids 数组 42 | json.data.list.vlist.forEach(function (item) { 43 | koe_25_aids.push(item.aid); 44 | }); 45 | // 让 page + 1 并在此调用自身,执行下一次请求 46 | koe_25_search(++koe_25_page); 47 | } 48 | }; 49 | } 50 | 51 | var koe_25_stat_info = { 52 | like: 0, 53 | coin: 0, 54 | favorite: 0, 55 | }; 56 | 57 | var koe_25_stat_video = { 58 | like: '', 59 | coin: '', 60 | favorite: '', 61 | }; 62 | 63 | var koe_25_index = 0; 64 | function koe_25_stat() { 65 | var koe_25_stat_xhr = new XMLHttpRequest(); 66 | koe_25_stat_xhr.open( 67 | 'GET', 68 | 'https://api.bilibili.com/x/web-interface/archive/stat?aid=' + 69 | koe_25_aids[koe_25_index], 70 | true 71 | ); 72 | koe_25_stat_xhr.send(); 73 | koe_25_stat_xhr.onreadystatechange = function () { 74 | if (koe_25_stat_xhr.readyState === 4 && koe_25_stat_xhr.status === 200) { 75 | var json = JSON.parse(koe_25_stat_xhr.responseText); 76 | for (index in koe_25_stat_info) { 77 | if (json.data[index] / json.data.view > koe_25_stat_info[index]) { 78 | koe_25_stat_info[index] = json.data[index] / json.data.view; 79 | koe_25_stat_video[index] = 80 | 'https://www.bilibili.com/video/' + json.data.bvid; 81 | } 82 | } 83 | 84 | koe_25_index++; 85 | if (koe_25_index < koe_25_aids.length) { 86 | koe_25_stat(); 87 | } else { 88 | for(index in koe_25_stat_info) { 89 | console.log(index + ': ' + koe_25_stat_info[index] + '\n' + koe_25_stat_video[index]); 90 | } 91 | } 92 | } 93 | }; 94 | } 95 | 96 | // 心态爆炸 97 | -------------------------------------------------------------------------------- /code/js-25.min.js: -------------------------------------------------------------------------------- 1 | var koe_25_mid=/space\.bilibili\.com\/(\d+)/.exec(window.location.href);var koe_25_aids=new Array();var koe_25_page=1;if(koe_25_mid!==null)koe_25_search(koe_25_page);function koe_25_search(page){var koe_25_search_xhr=new XMLHttpRequest();koe_25_search_xhr.open('GET','https://api.bilibili.com/x/space/arc/search?mid='+koe_25_mid[1]+'&ps=30&tid=0&pn='+page+'&keyword=&order=pubdate&jsonp=jsonp',true);koe_25_search_xhr.send();koe_25_search_xhr.onreadystatechange=function(){if(koe_25_search_xhr.readyState===4&&koe_25_search_xhr.status===200){var json=JSON.parse(koe_25_search_xhr.responseText);if(json.data.list.vlist.length===0){koe_25_stat();return}json.data.list.vlist.forEach(function(item){koe_25_aids.push(item.aid)});koe_25_search(++koe_25_page)}}}var koe_25_stat_info={like:0,coin:0,favorite:0,};var koe_25_stat_video={like:'',coin:'',favorite:'',};var koe_25_index=0;function koe_25_stat(){var koe_25_stat_xhr=new XMLHttpRequest();koe_25_stat_xhr.open('GET','https://api.bilibili.com/x/web-interface/archive/stat?aid='+koe_25_aids[koe_25_index],true);koe_25_stat_xhr.send();koe_25_stat_xhr.onreadystatechange=function(){if(koe_25_stat_xhr.readyState===4&&koe_25_stat_xhr.status===200){var json=JSON.parse(koe_25_stat_xhr.responseText);for(index in koe_25_stat_info){if(json.data[index]/json.data.view>koe_25_stat_info[index]){koe_25_stat_info[index]=json.data[index]/json.data.view;koe_25_stat_video[index]='https://www.bilibili.com/video/'+json.data.bvid}}koe_25_index++;if(koe_25_index' + koe_28_u.nickname + ''; 92 | clearInterval(koe_28_timer); 93 | koe_28_timer = null; 94 | } else { 95 | koe_28_page = 1; 96 | koe_28_users = new Array(); 97 | koe_28_div.style.display = 'block'; 98 | koe_28_like_detail(); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /code/js-28.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_28_like_detail==='undefined'){var koe_28_page=1;var koe_28_users=new Array();var koe_28_timer=null;var koe_28_u={};var koe_28_div=document.createElement('div');koe_28_div.setAttribute('style','position: fixed; top: 50%; left: 50%; width: 300px; height: 50px; transform: translate(-50%,-50%); background-color: #000;');document.body.appendChild(koe_28_div);var koe_28_img=document.createElement('img');koe_28_img.setAttribute('style','width: 50px; height: 50px; border-radius: 25px;');koe_28_div.appendChild(koe_28_img);var koe_28_p=document.createElement('p');koe_28_p.setAttribute('style','position: absolute; top: 0; left: 50px; width: 250px; height: 50px; line-height: 50px; text-align: center; font-size: 26px; font-weight: 700; color: #FFF;');koe_28_div.appendChild(koe_28_p);var koe_28_span=document.createElement('span');koe_28_span.innerText='×';koe_28_span.setAttribute('style','position: absolute; top: 0; right: 0; font-size: 20px; font-weight: 700; color: #FFF; cursor: pointer;');koe_28_div.appendChild(koe_28_span);koe_28_span.onclick=function(){koe_28_div.style.display='none';clearInterval(koe_28_timer);koe_28_timer=null};function koe_28_like_detail(){var koe_28_xhr=new XMLHttpRequest();koe_28_xhr.open('GET','https://api.bilibili.com/x/msgfeed/like_detail?card_id='+koe_28_get_card_id()+'&last_view_at=0&pn='+koe_28_page+'&build=0&mobi_app=web',true);koe_28_xhr.withCredentials=true;koe_28_xhr.send();koe_28_xhr.onreadystatechange=function(){if(koe_28_xhr.readyState===4&&koe_28_xhr.status===200){var json=JSON.parse(koe_28_xhr.responseText);json.data.items.forEach(function(userInfo){koe_28_users.push({avatar:userInfo.user.avatar,follow:userInfo.user.follow,mid:userInfo.user.mid,nickname:userInfo.user.nickname,})});if(!json.data.page.is_end){koe_28_page++;koe_28_like_detail()}else{koe_28_timer=setInterval(function(){koe_28_u=koe_28_users[w3school_getRndInteger(0,koe_28_users.length-1)];koe_28_img.src=koe_28_u.avatar;koe_28_p.innerText=koe_28_u.nickname},100)}}}}koe_28_like_detail();function koe_28_get_card_id(){return/\/love\/(\d+)/.exec(window.location.href)[1]}function w3school_getRndInteger(min,max){return Math.floor(Math.random()*(max-min+1))+min}}else{if(koe_28_timer!==null){koe_28_p.innerHTML=''+koe_28_u.nickname+'';clearInterval(koe_28_timer);koe_28_timer=null}else{koe_28_page=1;koe_28_users=new Array();koe_28_div.style.display='block';koe_28_like_detail()}};/*{"name":"点赞抽奖"}*/ -------------------------------------------------------------------------------- /code/js-29.js: -------------------------------------------------------------------------------- 1 | var koe_29_content = document.querySelector('.room-introduction-content'); 2 | if(koe_29_content !== null) { 3 | // 文字暂存 input 4 | var koe_29_input = document.createElement('input'); 5 | koe_29_input.value = koe_29_content.innerHTML; 6 | document.body.appendChild(koe_29_input); 7 | // 选中 8 | koe_29_input.select(); 9 | // 提示框 10 | var koe_29_tip = document.querySelector('#koe_29_tip'); 11 | if(koe_29_tip === null) { 12 | koe_29_tip = document.createElement('span'); 13 | koe_29_tip.setAttribute('id', 'koe_29_tip'); 14 | koe_29_tip.setAttribute('style', 'position: fixed; top: 0; right: 0; padding: 3px 5px; width: 200px; height: 30px; line-height: 30px; text-align: center; font-size: 26px; color: #FFF; z-index: 99999999;'); 15 | document.body.appendChild(koe_29_tip); 16 | } 17 | // 执行 copy 命令 18 | if(document.execCommand('copy')) { 19 | koe_29_tip.innerText = '复制成功'; 20 | koe_29_tip.style.backgroundColor = '#096' 21 | } else { 22 | koe_29_tip.innerText = '复制失败'; 23 | koe_29_tip.style.backgroundColor = '#F66' 24 | } 25 | koe_29_tip.style.display = 'block'; 26 | setTimeout(function() { 27 | koe_29_tip.style.display = 'none'; 28 | }, 1000); 29 | document.body.removeChild(koe_29_input); 30 | } 31 | void(0); -------------------------------------------------------------------------------- /code/js-29.min.js: -------------------------------------------------------------------------------- 1 | var koe_29_content=document.querySelector('.room-introduction-content');if(koe_29_content!==null){var koe_29_input=document.createElement('input');koe_29_input.value=koe_29_content.innerHTML;document.body.appendChild(koe_29_input);koe_29_input.select();var koe_29_tip=document.querySelector('#koe_29_tip');if(koe_29_tip===null){koe_29_tip=document.createElement('span');koe_29_tip.setAttribute('id','koe_29_tip');koe_29_tip.setAttribute('style','position: fixed; top: 0; right: 0; padding: 3px 5px; width: 200px; height: 30px; line-height: 30px; text-align: center; font-size: 26px; color: #FFF; z-index: 99999999;');document.body.appendChild(koe_29_tip)}if(document.execCommand('copy')){koe_29_tip.innerText='复制成功';koe_29_tip.style.backgroundColor='#096'}else{koe_29_tip.innerText='复制失败';koe_29_tip.style.backgroundColor='#F66'}koe_29_tip.style.display='block';setTimeout(function(){koe_29_tip.style.display='none'},1000);document.body.removeChild(koe_29_input)}void(0);/*{"name":"复制直播间简介"}*/ -------------------------------------------------------------------------------- /code/js-3.js: -------------------------------------------------------------------------------- 1 | // 设置一个变量 存储选择器字符串 2 | var koe_selector = ''; 3 | // 在空间页 4 | if (/^https:\/\/space\.bilibili\.com\/\d+/.test(window.location.href)) 5 | koe_selector = '#h-avatar'; 6 | // 在视频页 7 | else if (/^https:\/\/www\.bilibili\.com\/video/.test(window.location.href)) 8 | koe_selector = '.up-face'; 9 | // 用正则表达式匹配高清图,在用 window.open() 打开 10 | window.open( 11 | /^(\/\/.*\/bfs\/face\/([a-z0-9]|member\/noface)+\.(jpe?g|png|gif))/.exec( 12 | document.querySelector(koe_selector).getAttribute('src') 13 | )[1] 14 | ); 15 | -------------------------------------------------------------------------------- /code/js-3.min.js: -------------------------------------------------------------------------------- 1 | var koe_selector='';if(/^https:\/\/space\.bilibili\.com\/\d+/.test(window.location.href))koe_selector='#h-avatar';else if(/^https:\/\/www\.bilibili\.com\/video/.test(window.location.href))koe_selector='.up-face';window.open(/^(\/\/.*\/bfs\/face\/([a-z0-9]|member\/noface)+\.(jpe?g|png|gif))/.exec(document.querySelector(koe_selector).getAttribute('src'))[1]);/*{"name":"快速打开头像"}*/ -------------------------------------------------------------------------------- /code/js-30.js: -------------------------------------------------------------------------------- 1 | function Button(options) { 2 | var self = this; 3 | this.isAllowClick = true; 4 | this.setup = { 5 | set success(val) { 6 | if(val) { 7 | self.buttonElement.innerText = '成功'; 8 | self.buttonElement.style.backgroundColor = '#3F3'; 9 | } else { 10 | self.buttonElement.innerText = '失败'; 11 | self.buttonElement.style.backgroundColor = '#F33'; 12 | } 13 | }, 14 | set isAllowClick(val) { 15 | if(val) self.buttonElement.removeAttribute('disabled'); 16 | else self.buttonElement.setAttribute('disabled', ''); 17 | self.isAllowClick = val; 18 | } 19 | }; 20 | this.buttonElement = document.createElement('button'); 21 | this.buttonElement.innerText = options.value; 22 | this.buttonElement.style.backgroundColor = options.backgroundColor; 23 | this.buttonElement.onclick = function() { 24 | if(self.isAllowClick) options.onclick(); 25 | }; 26 | document.body.appendChild(this.buttonElement); 27 | } 28 | 29 | var b1 = new Button({ 30 | value: '一个按钮', 31 | backgroundColor: '#F66', 32 | onclick: function() { 33 | alert('click'); 34 | } 35 | }); 36 | 37 | var b2 = new Button({ 38 | value: '第二个按钮', 39 | backgroundColor: '#666', 40 | onclick: function() { 41 | alert('2'); 42 | } 43 | }); -------------------------------------------------------------------------------- /code/js-30.min.js: -------------------------------------------------------------------------------- 1 | // 无 -------------------------------------------------------------------------------- /code/js-31.js: -------------------------------------------------------------------------------- 1 | function Button(options) { 2 | var self = this; 3 | this.isAllowClick = true; 4 | this.setup = { 5 | set success(val) { 6 | if(val) { 7 | self.buttonElement.innerText = '成功'; 8 | self.buttonElement.style.backgroundColor = '#3F3'; 9 | } else { 10 | self.buttonElement.innerText = '失败'; 11 | self.buttonElement.style.backgroundColor = '#F33'; 12 | } 13 | }, 14 | set isAllowClick(val) { 15 | if(val) self.buttonElement.removeAttribute('disabled'); 16 | else self.buttonElement.setAttribute('disabled', ''); 17 | self.isAllowClick = val; 18 | }, 19 | set isLoading(val) { 20 | if(val) { 21 | self.buttonElement.innerHTML = Button.loadingSVG(options.color); 22 | } else { 23 | self.buttonElement.innerText = options.value; 24 | } 25 | } 26 | }; 27 | this.buttonElement = document.createElement('button'); 28 | this.buttonElement.innerText = options.value; 29 | this.buttonElement.setAttribute('style', 'width: 100px; height: 50px; line-height: 30px; border: 0; border-radius: 5px; font-size: 20px;'); 30 | this.buttonElement.style.color = options.color; 31 | this.buttonElement.style.backgroundColor = options.backgroundColor; 32 | this.buttonElement.onclick = function() { 33 | if(self.isAllowClick) options.onclick(self); 34 | }; 35 | document.body.appendChild(this.buttonElement); 36 | } 37 | 38 | Button.loadingSVG = function(color) { 39 | color = color || '#000'; 40 | return ''; 41 | } 42 | 43 | var b1 = new Button({ 44 | value: '一个按钮', 45 | color: '#FFF', 46 | backgroundColor: '#F66', 47 | onclick: function(thisBtn) { 48 | thisBtn.setup.isAllowClick = false; 49 | thisBtn.setup.isLoading = true; 50 | var xhr = new XMLHttpRequest(); 51 | xhr.open('GET', 'http://bili.imba97.cn/t.php', true); 52 | xhr.send(); 53 | xhr.onreadystatechange = function() { 54 | if(xhr.readyState === 4 && xhr.status === 200) { 55 | thisBtn.setup.isAllowClick = true; 56 | var json = JSON.parse(xhr.responseText); 57 | if(json.success === 1) { 58 | thisBtn.setup.success = true; 59 | } else { 60 | thisBtn.setup.success = false; 61 | } 62 | } 63 | } 64 | } 65 | }); 66 | 67 | var b2 = new Button({ 68 | value: '第二个按钮', 69 | color: '#000', 70 | backgroundColor: '#CCC', 71 | onclick: function(thisBtn) { 72 | thisBtn.setup.isAllowClick = false; 73 | thisBtn.setup.isLoading = true; 74 | var xhr = new XMLHttpRequest(); 75 | xhr.open('GET', 'http://bili.imba97.cn/t.php', true); 76 | xhr.send(); 77 | xhr.onreadystatechange = function() { 78 | if(xhr.readyState === 4 && xhr.status === 200) { 79 | thisBtn.setup.isAllowClick = true; 80 | var json = JSON.parse(xhr.responseText); 81 | if(json.success === 1) { 82 | thisBtn.setup.success = true; 83 | } else { 84 | thisBtn.setup.success = false; 85 | } 86 | } 87 | } 88 | } 89 | }); 90 | -------------------------------------------------------------------------------- /code/js-31.min.js: -------------------------------------------------------------------------------- 1 | // 无 -------------------------------------------------------------------------------- /code/js-31.server.php: -------------------------------------------------------------------------------- 1 | rand(0, 1) 10 | ])); -------------------------------------------------------------------------------- /code/js-32.js: -------------------------------------------------------------------------------- 1 | // 无 -------------------------------------------------------------------------------- /code/js-32.min.js: -------------------------------------------------------------------------------- 1 | // 无 -------------------------------------------------------------------------------- /code/js-33.min.js: -------------------------------------------------------------------------------- 1 | // 无 -------------------------------------------------------------------------------- /code/js-34.js: -------------------------------------------------------------------------------- 1 | var koe_34_xhr = new XMLHttpRequest() 2 | koe_34_xhr.open('GET','https://bili.imba97.cn/dwz.php?url=' + window.location.href, 'true'); 3 | koe_34_xhr.send(); 4 | koe_34_xhr.onreadystatechange = function () { 5 | if (koe_34_xhr.readyState === 4 && koe_34_xhr.status === 200) { 6 | var json = JSON.parse(koe_34_xhr.responseText); 7 | if(typeof json.url !== 'undefined') { 8 | prompt('短网址', json.url); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /code/js-34.min.js: -------------------------------------------------------------------------------- 1 | var koe_34_xhr=new XMLHttpRequest();koe_34_xhr.open('GET','https://bili.imba97.cn/dwz.php?url='+window.location.href,'true');koe_34_xhr.send();koe_34_xhr.onreadystatechange=function(){if(koe_34_xhr.readyState===4&&koe_34_xhr.status===200){var json=JSON.parse(koe_34_xhr.responseText);if(typeof json.url!=='undefined'){prompt('短网址',json.url)}}}/*{"name":"一键生成短网址"}*/ -------------------------------------------------------------------------------- /code/js-34.server.php: -------------------------------------------------------------------------------- 1 | $data 27 | ])); 28 | -------------------------------------------------------------------------------- /code/js-35.js: -------------------------------------------------------------------------------- 1 | if (typeof koe_35_p === 'undefined') { 2 | var koe_35_select = false; 3 | var koe_35_p = document.createElement('p'); 4 | koe_35_p.innerText = '请选择图片'; 5 | koe_35_p.setAttribute( 6 | 'style', 7 | 'position:fixed; top:0; left:0; padding: 3px 10px; height:30px; line-height:30px; text-align:center; background-color:#000; color:#FFF; font-size:26px; z-index:99999999' 8 | ); 9 | document.body.appendChild(koe_35_p); 10 | 11 | var koe_35_imgs = document.querySelectorAll('img'); 12 | 13 | koe_35_imgs.forEach(function (img) { 14 | img.addEventListener('click', koe_35_search); 15 | }); 16 | 17 | function koe_35_search() { 18 | var thisImg = this; 19 | var img_offset = getOffset(thisImg); 20 | 21 | koe_35_p.innerText = '正在搜索'; 22 | 23 | var newImg = new Image(); 24 | newImg.crossOrigin = '*'; 25 | newImg.onload = function () { 26 | var koe_35_canvas = document.createElement('canvas'); 27 | koe_35_canvas.width = newImg.naturalWidth; 28 | koe_35_canvas.height = newImg.naturalHeight; 29 | var koe_35_ctx = koe_35_canvas.getContext('2d'); 30 | koe_35_ctx.drawImage( 31 | newImg, 32 | 0, 33 | 0, 34 | koe_35_canvas.width, 35 | koe_35_canvas.height 36 | ); 37 | 38 | var koe_35_xhr = new XMLHttpRequest(); 39 | koe_35_xhr.open('POST', 'https://trace.moe/api/search', 'true'); 40 | koe_35_xhr.setRequestHeader('content-type', 'application/json'); 41 | koe_35_xhr.send( 42 | JSON.stringify({ image: koe_35_canvas.toDataURL('image/jpeg', 0.8) }) 43 | ); 44 | koe_35_xhr.onreadystatechange = function () { 45 | if (koe_35_xhr.readyState === 4 && koe_35_xhr.status === 200) { 46 | var json = JSON.parse(koe_35_xhr.responseText); 47 | if (json.docs.length > 0) { 48 | var at_m = parseInt(json.docs[0].at / 60); 49 | var at_s = parseInt(json.docs[0].at % (60)); 50 | koe_35_p.innerText = '成功!正在加载视频'; 51 | var src = 52 | 'https://trace.moe/preview.php?anilist_id=' + 53 | json.docs[0].anilist_id + 54 | '&file=' + 55 | encodeURIComponent(json.docs[0].filename) + 56 | '&t=' + 57 | json.docs[0].at + 58 | '&token=' + 59 | json.docs[0].tokenthumb; 60 | var videoElement = document.createElement('video'); 61 | videoElement.autoplay = true; 62 | videoElement.loop = true; 63 | videoElement.controls = true; 64 | videoElement.setAttribute( 65 | 'style', 66 | 'position: absolute; z-index: 9999999' 67 | ); 68 | videoElement.style.top = img_offset.top + 'px'; 69 | videoElement.style.left = img_offset.left + 'px'; 70 | videoElement.style.width = thisImg.style.width; 71 | videoElement.style.height = thisImg.style.height; 72 | videoElement.src = src; 73 | videoElement.addEventListener('canplaythrough', function () { 74 | // 播放视频后 才能再次选择图片 75 | koe_35_select = true; 76 | koe_35_p.innerText = json.docs[0].title + ',第' + json.docs[0].episode + '集,时间:' + at_m + ':' + at_s; 77 | }); 78 | document.body.appendChild(videoElement); 79 | } else { 80 | koe_35_p.innerText = '没有搜索到'; 81 | } 82 | } 83 | }; 84 | }; 85 | newImg.src = this.src; 86 | 87 | koe_35_imgs.forEach(function (img) { 88 | img.removeEventListener('click', koe_35_search); 89 | }); 90 | } 91 | 92 | // https://www.cnblogs.com/wenjiajia/p/5957070.html 93 | function getOffset(curEle) { 94 | var totalLeft = null, 95 | totalTop = null, 96 | par = curEle.offsetParent; 97 | //首先把自己本身的进行累加 98 | totalLeft += curEle.offsetLeft; 99 | totalTop += curEle.offsetTop; 100 | 101 | //只要没有找到body,我们就把父级参照物的边框和偏移量累加 102 | while (par) { 103 | if (navigator.userAgent.indexOf('MSIE 8.0') === -1) { 104 | //不是标准的ie8浏览器,才进行边框累加 105 | //累加父级参照物边框 106 | totalLeft += par.clientLeft; 107 | totalTop += par.clientTop; 108 | } 109 | //累加父级参照物本身的偏移 110 | totalLeft += par.offsetLeft; 111 | totalTop += par.offsetTop; 112 | par = par.offsetParent; 113 | } 114 | return { left: totalLeft, top: totalTop }; 115 | } 116 | } else { 117 | koe_35_p.innerText = '选择图片'; 118 | koe_35_p.style.display = 'block'; 119 | // 是否能选择图片 120 | if (koe_35_select) { 121 | koe_35_imgs.forEach(function (img) { 122 | img.addEventListener('click', koe_35_search); 123 | }); 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /code/js-35.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_35_p==='undefined'){var koe_35_select=false;var koe_35_p=document.createElement('p');koe_35_p.innerText='请选择图片';koe_35_p.setAttribute('style','position:fixed; top:0; left:0; padding: 3px 10px; height:30px; line-height:30px; text-align:center; background-color:#000; color:#FFF; font-size:26px; z-index:99999999');document.body.appendChild(koe_35_p);var koe_35_imgs=document.querySelectorAll('img');koe_35_imgs.forEach(function(img){img.addEventListener('click',koe_35_search)});function koe_35_search(){var thisImg=this;var img_offset=getOffset(thisImg);koe_35_p.innerText='正在搜索';var newImg=new Image();newImg.crossOrigin='*';newImg.onload=function(){var koe_35_canvas=document.createElement('canvas');koe_35_canvas.width=newImg.naturalWidth;koe_35_canvas.height=newImg.naturalHeight;var koe_35_ctx=koe_35_canvas.getContext('2d');koe_35_ctx.drawImage(newImg,0,0,koe_35_canvas.width,koe_35_canvas.height);var koe_35_xhr=new XMLHttpRequest();koe_35_xhr.open('POST','https://trace.moe/api/search','true');koe_35_xhr.setRequestHeader('content-type','application/json');koe_35_xhr.send(JSON.stringify({image:koe_35_canvas.toDataURL('image/jpeg',0.8)}));koe_35_xhr.onreadystatechange=function(){if(koe_35_xhr.readyState===4&&koe_35_xhr.status===200){var json=JSON.parse(koe_35_xhr.responseText);if(json.docs.length>0){var at_m=parseInt(json.docs[0].at/60);var at_s=parseInt(json.docs[0].at%(60));koe_35_p.innerText='成功!正在加载视频';var src='https://trace.moe/preview.php?anilist_id='+json.docs[0].anilist_id+'&file='+encodeURIComponent(json.docs[0].filename)+'&t='+json.docs[0].at+'&token='+json.docs[0].tokenthumb;var videoElement=document.createElement('video');videoElement.autoplay=true;videoElement.loop=true;videoElement.controls=true;videoElement.setAttribute('style','position: absolute; z-index: 9999999');videoElement.style.top=img_offset.top+'px';videoElement.style.left=img_offset.left+'px';videoElement.style.width=thisImg.style.width;videoElement.style.height=thisImg.style.height;videoElement.src=src;videoElement.addEventListener('canplaythrough',function(){koe_35_select=true;koe_35_p.innerText=json.docs[0].title+',第'+json.docs[0].episode+'集,时间:'+at_m+':'+at_s});document.body.appendChild(videoElement)}else{koe_35_p.innerText='没有搜索到'}}}};newImg.src=this.src;koe_35_imgs.forEach(function(img){img.removeEventListener('click',koe_35_search)})}function getOffset(curEle){var totalLeft=null,totalTop=null,par=curEle.offsetParent;totalLeft+=curEle.offsetLeft;totalTop+=curEle.offsetTop;while(par){if(navigator.userAgent.indexOf('MSIE 8.0')===-1){totalLeft+=par.clientLeft;totalTop+=par.clientTop}totalLeft+=par.offsetLeft;totalTop+=par.offsetTop;par=par.offsetParent}return{left:totalLeft,top:totalTop}}}else{koe_35_p.innerText='选择图片';koe_35_p.style.display='block';if(koe_35_select){koe_35_imgs.forEach(function(img){img.addEventListener('click',koe_35_search)})}}/*{"name":"以图搜番"}*/ -------------------------------------------------------------------------------- /code/js-36.js: -------------------------------------------------------------------------------- 1 | // data.arc_audits[0].Archive.ptime 2 | // data.arc_audits[0].stat.view 3 | // https://member.bilibili.com/x/web/archives?tid=36&status=is_pubing%2Cpubed%2Cnot_pubed&pn=1&ps=10&coop=1&interactive=1 4 | var koe_36_input_time = prompt('请输入时间').replace('-', '/'); 5 | var koe_36_end_time = new Date(koe_36_input_time).getTime() / 1000; 6 | var koe_36_view = 0; 7 | var koe_36_is_end = false; 8 | koe_36_getVideoInfo(1); 9 | function koe_36_getVideoInfo(page) { 10 | var koe_36_xhr = new XMLHttpRequest(); 11 | koe_36_xhr.open('GET', 'https://member.bilibili.com/x/web/archives?tid=36&status=is_pubing%2Cpubed%2Cnot_pubed&pn=' + page + '&ps=20&coop=1&interactive=1', 'true'); 12 | koe_36_xhr.setRequestHeader('content-type', 'application/json'); 13 | koe_36_xhr.send(); 14 | koe_36_xhr.onreadystatechange = function () { 15 | if (koe_36_xhr.readyState === 4 && koe_36_xhr.status === 200) { 16 | var json = JSON.parse(koe_36_xhr.responseText); 17 | if(json.data.arc_audits === null) return; 18 | json.data.arc_audits.forEach(function(videoInfo) { 19 | if(videoInfo.Archive.ptime >= koe_36_end_time) koe_36_view += videoInfo.stat.view; 20 | else koe_36_is_end = true; 21 | }); 22 | if(!koe_36_is_end) koe_36_getVideoInfo(++page); 23 | else alert('今日起到 ' + koe_36_input_time + ',总播放量' + koe_36_view); 24 | } 25 | }; 26 | } -------------------------------------------------------------------------------- /code/js-36.min.js: -------------------------------------------------------------------------------- 1 | var koe_36_input_time=prompt('请输入时间').replace('-','/');var koe_36_end_time=new Date(koe_36_input_time).getTime()/1000;var koe_36_view=0;var koe_36_is_end=false;koe_36_getVideoInfo(1);function koe_36_getVideoInfo(page){var koe_36_xhr=new XMLHttpRequest();koe_36_xhr.open('GET','https://member.bilibili.com/x/web/archives?tid=36&status=is_pubing%2Cpubed%2Cnot_pubed&pn='+page+'&ps=20&coop=1&interactive=1','true');koe_36_xhr.setRequestHeader('content-type','application/json');koe_36_xhr.send();koe_36_xhr.onreadystatechange=function(){if(koe_36_xhr.readyState===4&&koe_36_xhr.status===200){var json=JSON.parse(koe_36_xhr.responseText);if(json.data.arc_audits===null)return;json.data.arc_audits.forEach(function(videoInfo){if(videoInfo.Archive.ptime>=koe_36_end_time)koe_36_view+=videoInfo.stat.view;else koe_36_is_end=true});if(!koe_36_is_end)koe_36_getVideoInfo(++page);else alert('今日起到 '+koe_36_input_time+',总播放量'+koe_36_view)}}}/*{"name":"查询UP主认证资格"}*/ -------------------------------------------------------------------------------- /code/js-38.js: -------------------------------------------------------------------------------- 1 | var koe_38_money = window 2 | .getSelection() 3 | .toString() 4 | .replace(/[^\d^\.]+/g, ''); 5 | koe_38_money = koe_38_money === '' ? prompt('请输入日元金额') : koe_38_money; 6 | 7 | var koe_38_script = document.createElement('script'); 8 | koe_38_script.src = 9 | 'https://sapi.k780.com/?app=finance.rate&scur=JPY&tcur=CNY&appkey=XXXXX&sign=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&format=json&jsoncallback=koe_38_callback'; 10 | document.body.appendChild(koe_38_script); 11 | 12 | if (typeof koe_38_callback === 'undefined') { 13 | function koe_38_callback(json) { 14 | if (json.success === '1') { 15 | alert((parseFloat(json.result.rate) * parseFloat(koe_38_money)).toFixed(2)); 16 | } 17 | document.body.removeChild(koe_38_script); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /code/js-38.min.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunsetMkt/js/6d522172fac6ccfd0e6fd7d3e1d881df959b3200/code/js-38.min.js -------------------------------------------------------------------------------- /code/js-39-backward.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_39_forward_timer==='undefined'||koe_39_forward_timer===null){if(typeof koe_39_video==='undefined')var koe_39_video=document.querySelector('video');var koe_39_forward_timer=setInterval(function(){if(koe_39_video.currentTime-1>0){koe_39_video.currentTime-=1}else{koe_39_video.currentTime=0;clearInterval(koe_39_forward_timer);koe_39_forward_timer=null}koe_39_video.currentTime=koe_39_time>0?koe_39_time:0},50)}else{clearInterval(koe_39_forward_timer);koe_39_forward_timer=null}/*{"name":"快退"}*/ -------------------------------------------------------------------------------- /code/js-39-forward.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_39_forward_timer==='undefined'||koe_39_forward_timer===null){if(typeof koe_39_video==='undefined')var koe_39_video=document.querySelector('video');var koe_39_forward_timer=setInterval(function(){if(koe_39_video.currentTime+1 0) { 7 | koe_39_video.currentTime -= 1; 8 | } else { 9 | koe_39_video.currentTime = 0; 10 | clearInterval(koe_39_forward_timer); 11 | koe_39_forward_timer = null; 12 | } 13 | koe_39_video.currentTime = koe_39_time > 0 ? koe_39_time : 0; 14 | }, 50); 15 | } else { 16 | clearInterval(koe_39_forward_timer); 17 | koe_39_forward_timer = null; 18 | } 19 | 20 | 21 | // 快进 22 | 23 | if(typeof koe_39_forward_timer === 'undefined' || koe_39_forward_timer === null) { 24 | if(typeof koe_39_video === 'undefined') var koe_39_video = document.querySelector('video'); 25 | var koe_39_forward_timer = setInterval(function() { 26 | if(koe_39_video.currentTime + 1 < koe_39_video.duration) { 27 | koe_39_video.currentTime += 1; 28 | } else { 29 | koe_39_video.currentTime += koe_39_video.duration; 30 | clearInterval(koe_39_forward_timer); 31 | koe_39_forward_timer = null; 32 | } 33 | }, 50); 34 | } else { 35 | clearInterval(koe_39_forward_timer); 36 | koe_39_forward_timer = null; 37 | } 38 | -------------------------------------------------------------------------------- /code/js-4.js: -------------------------------------------------------------------------------- 1 | // 获取头图中的 style,用正则表达式匹配高清图的链接,用 window.open() 打开 2 | window.open( 3 | /https?:\/\/.*\/bfs\/article\/[a-z0-9]+\.(jpe?g|png|gif)/.exec( 4 | document.querySelector('.banner-img-holder').getAttribute('style') 5 | )[0] 6 | ); 7 | -------------------------------------------------------------------------------- /code/js-4.min.js: -------------------------------------------------------------------------------- 1 | window.open(/https?:\/\/.*\/bfs\/article\/[a-z0-9]+\.(jpe?g|png|gif)/.exec(document.querySelector('.banner-img-holder').getAttribute('style'))[0]);/*{"name":"快速打开文章头图"}*/ -------------------------------------------------------------------------------- /code/js-40.js: -------------------------------------------------------------------------------- 1 | if(window.location.host !== 'web.archive.org') window.open('https://web.archive.org/save/' + window.location.href); -------------------------------------------------------------------------------- /code/js-40.min.js: -------------------------------------------------------------------------------- 1 | if(window.location.host!=='web.archive.org') window.open('https://web.archive.org/save/'+window.location.href);/*{"name":"网页快照"}*/ -------------------------------------------------------------------------------- /code/js-41.js: -------------------------------------------------------------------------------- 1 | // https://api.bilibili.com/x/space/channel/video/sort 2 | 3 | var koe_41_cid = /cid=(\d+)/.exec(window.location.href)[1]; 4 | var koe_41_num = parseInt(prompt('请输入个数')); 5 | var koe_41_li = document.querySelectorAll('.video-list>li'); 6 | var koe_41_p = document.createElement('p'); 7 | koe_41_p.innerText = '正在排序'; 8 | koe_41_p.setAttribute( 9 | 'style', 10 | 'position:fixed; top:0; left:0; padding: 3px 10px; height:30px; line-height:30px; text-align:center; background-color:#000; color:#FFF; font-size:26px; z-index:99999999' 11 | ); 12 | document.body.appendChild(koe_41_p); 13 | 14 | if (typeof bv2av_com_bv2av === 'undefined') { 15 | const bv2av_com_table = [ 16 | ...'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF', 17 | ]; 18 | const bv2av_com_s = [11, 10, 3, 8, 4, 6]; 19 | const bv2av_com_xor = 177451812; 20 | const bv2av_com_add = 8728348608; 21 | 22 | var bv2av_com_bv2av = (bv) => { 23 | let str = ''; 24 | if (bv.length === 12) { 25 | str = bv; 26 | } else if (bv.length === 10) { 27 | str = `BV${bv}`; 28 | // 根据官方 API,BV 号开头的 BV1 其实可以省略 29 | // 不过单独省略个 B 又不行( 30 | } else if (bv.length === 9) { 31 | str = `BV1${bv}`; 32 | } else { 33 | return '¿你在想桃子?'; 34 | } 35 | if ( 36 | !str.match( 37 | /[Bb][Vv][fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF]{10}/gu 38 | ) 39 | ) { 40 | return '¿你在想桃子?'; 41 | } 42 | 43 | let result = 0; 44 | let i = 0; 45 | while (i < 6) { 46 | result += bv2av_com_table.indexOf(str[bv2av_com_s[i]]) * 58 ** i; 47 | i += 1; 48 | } 49 | return (result - bv2av_com_add) ^ bv2av_com_xor; 50 | }; 51 | } 52 | 53 | function koe_41_sort(aid, num) { 54 | koe_41_p.innerText = '正在排序,第' + num + '个'; 55 | // 设置参数,aid、like、csrf 56 | var koe_41_param = 57 | 'cid=' + 58 | koe_41_cid + 59 | '&aid=' + 60 | aid + 61 | '&to=1&csrf=' + 62 | getCookie('bili_jct'); 63 | // 新建 网络请求 对象 64 | var koe_41_xhr = new XMLHttpRequest(); 65 | // 设置请求类型、请求地址、是否异步 66 | koe_41_xhr.open( 67 | 'POST', 68 | 'https://api.bilibili.com/x/space/channel/video/sort', 69 | true 70 | ); 71 | // 携带验证 ( cookie ) 72 | koe_41_xhr.withCredentials = true; 73 | // 设置请求头 Content-Type 74 | koe_41_xhr.setRequestHeader( 75 | 'content-type', 76 | 'application/x-www-form-urlencoded' 77 | ); 78 | // 发送请求,并将参数传入其中 79 | koe_41_xhr.send(koe_41_param); 80 | // 监听状态变化 81 | koe_41_xhr.onreadystatechange = function () { 82 | // 判断是否请求成功 83 | if (koe_41_xhr.readyState === 4 && koe_41_xhr.status === 200 && koe_41_num === num) { 84 | koe_41_p.innerText = '排序完成,正在刷新页面'; 85 | setTimeout('window.location.reload()', 1000); 86 | } 87 | }; 88 | } 89 | 90 | for (i = 1; i <= koe_41_num; i++) { 91 | setTimeout( 92 | 'koe_41_sort(bv2av_com_bv2av(koe_41_li[' + 93 | i + 94 | "].getAttribute('data-aid')), " + i + ");", 95 | i * 500 96 | ); 97 | } 98 | -------------------------------------------------------------------------------- /code/js-41.min.js: -------------------------------------------------------------------------------- 1 | var koe_41_cid=/cid=(\d+)/.exec(window.location.href)[1];var koe_41_num=parseInt(prompt('请输入个数'));var koe_41_li=document.querySelectorAll('.video-list>li');var koe_41_p=document.createElement('p');koe_41_p.innerText='正在排序';koe_41_p.setAttribute('style','position:fixed; top:0; left:0; padding: 3px 10px; height:30px; line-height:30px; text-align:center; background-color:#000; color:#FFF; font-size:26px; z-index:99999999');document.body.appendChild(koe_41_p);if(typeof bv2av_com_bv2av==='undefined'){const bv2av_com_table=[...'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF',];const bv2av_com_s=[11,10,3,8,4,6];const bv2av_com_xor=177451812;const bv2av_com_add=8728348608;var bv2av_com_bv2av=(bv)=>{let str='';if(bv.length===12){str=bv}else if(bv.length===10){str=`BV${bv}`}else if(bv.length===9){str=`BV1${bv}`}else{return'¿你在想桃子?'}if(!str.match(/[Bb][Vv][fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF]{10}/gu)){return'¿你在想桃子?'}let result=0;let i=0;while(i<6){result+=bv2av_com_table.indexOf(str[bv2av_com_s[i]])*58**i;i+=1}return(result-bv2av_com_add)^bv2av_com_xor}}function koe_41_sort(aid,num){koe_41_p.innerText='正在排序,第'+num+'个';var koe_41_param='cid='+koe_41_cid+'&aid='+aid+'&to=1&csrf='+getCookie('bili_jct');var koe_41_xhr=new XMLHttpRequest();koe_41_xhr.open('POST','https://api.bilibili.com/x/space/channel/video/sort',true);koe_41_xhr.withCredentials=true;koe_41_xhr.setRequestHeader('content-type','application/x-www-form-urlencoded');koe_41_xhr.send(koe_41_param);koe_41_xhr.onreadystatechange=function(){if(koe_41_xhr.readyState===4&&koe_41_xhr.status===200&&koe_41_num===num){koe_41_p.innerText='排序完成,正在刷新页面';setTimeout('window.location.reload()',1000)}}}for(i=1;i<=koe_41_num;i++){setTimeout('koe_41_sort(bv2av_com_bv2av(koe_41_li['+i+'].getAttribute(\'data-aid\')), '+i+');',i*500)};/*{"name":"频道排序"}*/ -------------------------------------------------------------------------------- /code/js-42.js: -------------------------------------------------------------------------------- 1 | if (document.querySelector(".koe_42_a") === null) { 2 | // 判断 Github 还是 Gitee 3 | var koe_is_github = /github/.test(window.location.href); 4 | // 获取代码 5 | var koe_42_code = koe_is_github 6 | ? document.querySelector("#read-only-cursor-text-area").value 7 | : document 8 | .querySelector(".highlight .line") 9 | .innerText.replace(/[\r\n]$/, ""); 10 | // 创建 style 11 | var koe_42_style = document.createElement("style"); 12 | koe_42_style.innerText = 13 | ".koe_42_a { position:absolute;top:7px;left:200px;width:100px;height:30px;line-height:30px;text-align:center;background-color:#24aee6;cursor:move;font-size:0;border-radius:5px;text-decoration:none !important;z-index:999999; } .koe_42_a::before { content:'拖到收藏夹';font-size:16px;color:#FFF; }"; 14 | document.head.appendChild(koe_42_style); 15 | // 创建 a 标签 16 | var koe_42_a = document.createElement("a"); 17 | koe_42_a.setAttribute("class", "koe_42_a"); 18 | // 获取代码最后的注释,是程序信息 19 | var koe_42_data = JSON.parse(/\/\*(\{.*\})\*\//.exec(koe_42_code)[1]); 20 | koe_42_a.innerText = koe_42_data.name; 21 | koe_42_a.href = "javascript:" + koe_42_code; 22 | // 添加到相应的页面 23 | if (koe_is_github) { 24 | koe_42_a.setAttribute("style", "position: unset;"); 25 | document 26 | .querySelector('[data-testid="latest-commit"]') 27 | .appendChild(koe_42_a); 28 | } else { 29 | document.querySelector(".file_holder").appendChild(koe_42_a); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /code/js-42.min.js: -------------------------------------------------------------------------------- 1 | if(document.querySelector(".koe_42_a")===null){var koe_is_github=/github/.test(window.location.href);var koe_42_code=koe_is_github?document.querySelector("#read-only-cursor-text-area").value:document.querySelector(".highlight .line").innerText.replace(/[\r\n]$/,"");var koe_42_style=document.createElement("style");koe_42_style.innerText=".koe_42_a { position:absolute;top:7px;left:200px;width:100px;height:30px;line-height:30px;text-align:center;background-color:#24aee6;cursor:move;font-size:0;border-radius:5px;text-decoration:none !important;z-index:999999; } .koe_42_a::before { content:'拖到收藏夹';font-size:16px;color:#FFF; }";document.head.appendChild(koe_42_style);var koe_42_a=document.createElement("a");koe_42_a.setAttribute("class","koe_42_a");var koe_42_data=JSON.parse(/\/\*(\{.*\})\*\//.exec(koe_42_code)[1]);koe_42_a.innerText=koe_42_data.name;koe_42_a.href="javascript:"+koe_42_code;if(koe_is_github){koe_42_a.setAttribute("style","position: unset;");document.querySelector('[data-testid="latest-commit"]').appendChild(koe_42_a)}else{document.querySelector(".file_holder").appendChild(koe_42_a)}}/*{"name":"生成拖拽安装"}*/ -------------------------------------------------------------------------------- /code/js-43.js: -------------------------------------------------------------------------------- 1 | var koe_43_type_name = { 2 | 1: '播放', 3 | 3: '评论', 4 | 2: '弹幕', 5 | 8: '点赞', 6 | 4: '分享', 7 | 5: '硬币', 8 | 6: '收藏', 9 | 7: '充电', 10 | }; 11 | 12 | // 日期格式化 13 | if (typeof formatDate === 'undefined') { 14 | function formatDate(date) { 15 | var date = new Date(date * 1000); 16 | var YY = date.getFullYear() + '-'; 17 | var MM = 18 | (date.getMonth() + 1 < 10 19 | ? '0' + (date.getMonth() + 1) 20 | : date.getMonth() + 1) + '-'; 21 | var DD = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); 22 | return YY + MM + DD; 23 | } 24 | } 25 | 26 | // 当前 type name 的 index 27 | var koe_43_current_index = 0; 28 | 29 | // 表格数据 30 | var koe_43_data = new Array(); 31 | koe_43_data.push( 32 | ',' + 33 | Object.keys(koe_43_type_name) 34 | .map(function (item) { 35 | return koe_43_type_name[item]; 36 | }) 37 | .join(',') 38 | ); 39 | 40 | // 请求数据 41 | var koe_43_xhr_data = new Array(); 42 | // 日期 43 | var koe_43_date = new Array(); 44 | // 是否已经完成一次日期统计 日期只需要统计一次 45 | var koe_43_date_is_complete = false; 46 | koe_43_getData(); 47 | function koe_43_getData() { 48 | var koe_43_keys = Object.keys(koe_43_type_name); 49 | var koe_43_xhr = new XMLHttpRequest(); 50 | koe_43_xhr.open( 51 | 'GET', 52 | 'https://member.bilibili.com/x/web/data/pandect?type=' + 53 | koe_43_keys[koe_43_current_index], 54 | true 55 | ); 56 | koe_43_xhr.send(); 57 | koe_43_xhr.onreadystatechange = function () { 58 | if (koe_43_xhr.readyState === 4 && koe_43_xhr.status === 200) { 59 | var json = JSON.parse(koe_43_xhr.responseText); 60 | koe_43_xhr_data[koe_43_keys[koe_43_current_index]] = new Array(); 61 | 62 | json.data.forEach(function (item) { 63 | if (!koe_43_date_is_complete) { 64 | koe_43_date.push(formatDate(item.date_key)); 65 | } 66 | koe_43_xhr_data[koe_43_keys[koe_43_current_index]].push(item.total_inc); 67 | }); 68 | 69 | koe_43_date_is_complete = true; 70 | 71 | // 所有数据请求完成 72 | if (koe_43_keys.length - 1 === koe_43_current_index) { 73 | koe_43_date.forEach(function (item, index) { 74 | var data_everyday = new Array(); 75 | koe_43_keys.forEach(function (type_index) { 76 | data_everyday.push(koe_43_xhr_data[type_index][index]); 77 | }); 78 | koe_43_data.push(item + ',' + data_everyday.join(',')); 79 | }); 80 | 81 | // 创建Blob对象 传入一个合适的MIME类型 82 | const blob = new Blob(['\ufeff' + koe_43_data.join('\n')], { 83 | type: 'text/csv,charset=UTF-8', 84 | }); 85 | // 参考链接 https://developer.mozilla.org/zh-CN/docs/Web/API/Blob 86 | // 使用 Blob 创建一个指向类型化数组的URL 87 | const csvUrl = URL.createObjectURL(blob); // 参考链接 https://developer.mozilla.org/zh-CN/docs/Web/API/URL/createObjectURL 88 | let link = document.createElement('a'); 89 | link.download = 90 | koe_43_date[koe_43_date.length - 1].replace(/-/g, '') + 91 | '-' + 92 | koe_43_date[0].replace(/-/g, '') + 93 | '.csv'; //文件名字 94 | link.href = csvUrl; 95 | // 触发下载 96 | link.click(); 97 | } else { 98 | ++koe_43_current_index; 99 | koe_43_getData(); 100 | } 101 | } 102 | }; 103 | } 104 | -------------------------------------------------------------------------------- /code/js-43.min.js: -------------------------------------------------------------------------------- 1 | var koe_43_type_name={1:'播放',3:'评论',2:'弹幕',8:'点赞',4:'分享',5:'硬币',6:'收藏',7:'充电',};if(typeof formatDate==='undefined'){function formatDate(date){var date=new Date(date*1000);var YY=date.getFullYear()+'-';var MM=(date.getMonth()+1<10?'0'+(date.getMonth()+1):date.getMonth()+1)+'-';var DD=date.getDate()<10?'0'+date.getDate():date.getDate();return YY+MM+DD}}var koe_43_current_index=0;var koe_43_data=new Array();koe_43_data.push(','+Object.keys(koe_43_type_name).map(function(item){return koe_43_type_name[item]}).join(','));var koe_43_xhr_data=new Array();var koe_43_date=new Array();var koe_43_date_is_complete=false;koe_43_getData();function koe_43_getData(){var koe_43_keys=Object.keys(koe_43_type_name);var koe_43_xhr=new XMLHttpRequest();koe_43_xhr.open('GET','https://member.bilibili.com/x/web/data/pandect?type='+koe_43_keys[koe_43_current_index],'true');koe_43_xhr.send();koe_43_xhr.onreadystatechange=function(){if(koe_43_xhr.readyState===4&&koe_43_xhr.status===200){var json=JSON.parse(koe_43_xhr.responseText);koe_43_xhr_data[koe_43_keys[koe_43_current_index]]=new Array();json.data.forEach(function(item){if(!koe_43_date_is_complete){koe_43_date.push(formatDate(item.date_key))}koe_43_xhr_data[koe_43_keys[koe_43_current_index]].push(item.total_inc)});koe_43_date_is_complete=true;if(koe_43_keys.length-1===koe_43_current_index){koe_43_date.forEach(function(item,index){var data_everyday=new Array();koe_43_keys.forEach(function(type_index){data_everyday.push(koe_43_xhr_data[type_index][index])});koe_43_data.push(item+','+data_everyday.join(','))});const blob=new Blob(['\ufeff'+koe_43_data.join('\n')],{type:'text/csv,charset=UTF-8',});const csvUrl=URL.createObjectURL(blob);let link=document.createElement('a');link.download=koe_43_date[koe_43_date.length-1].replace(/-/g,'')+'-'+koe_43_date[0].replace(/-/g,'')+'.csv';link.href=csvUrl;link.click()}else{++koe_43_current_index;koe_43_getData()}}}};/*{"name":"视频数据保存"}*/ -------------------------------------------------------------------------------- /code/js-43.version-1.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 找回B站失效视频。B站视频没过审,所以重做。但程序依然可以用。 3 | */ 4 | 5 | // 记录点击次数 默认 0 6 | if (typeof koe_43_click_num === 'undefined') var koe_43_click_num = 0; 7 | 8 | // 延迟 计时器 9 | if (typeof koe_43_timer === 'undefined') var koe_43_timer = null; 10 | 11 | // 如果有计时器则删除(因为每次点击需要重置计时器) 12 | if (koe_43_timer !== null) clearTimeout(koe_43_timer); 13 | 14 | if (typeof bv2av_com_bv2av === 'undefined') { 15 | const bv2av_com_table = [ 16 | ...'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF', 17 | ]; 18 | const bv2av_com_s = [11, 10, 3, 8, 4, 6]; 19 | const bv2av_com_xor = 177451812; 20 | const bv2av_com_add = 8728348608; 21 | 22 | var bv2av_com_bv2av = (bv) => { 23 | let str = ''; 24 | if (bv.length === 12) { 25 | str = bv; 26 | } else if (bv.length === 10) { 27 | str = `BV${bv}`; 28 | // 根据官方 API,BV 号开头的 BV1 其实可以省略 29 | // 不过单独省略个 B 又不行( 30 | } else if (bv.length === 9) { 31 | str = `BV1${bv}`; 32 | } else { 33 | return '¿你在想桃子?'; 34 | } 35 | if ( 36 | !str.match( 37 | /[Bb][Vv][fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF]{10}/gu 38 | ) 39 | ) { 40 | return '¿你在想桃子?'; 41 | } 42 | 43 | let result = 0; 44 | let i = 0; 45 | while (i < 6) { 46 | result += bv2av_com_table.indexOf(str[bv2av_com_s[i]]) * 58 ** i; 47 | i += 1; 48 | } 49 | return (result - bv2av_com_add) ^ bv2av_com_xor; 50 | }; 51 | } 52 | 53 | if (document.querySelector('.koe_43_list') === null) { 54 | var koe_43_av = bv2av_com_bv2av(__INITIAL_STATE__.bvid); 55 | var koe_43_style = document.createElement('style'); 56 | koe_43_style.innerText = 57 | '.koe_43_list { position: fixed; top: 100px; left: 50px; width: 200px; height: 100px; border-radius: 10px; background-color: #CCC; overflow: hidden; z-index: 999999; } .koe_43_list a { display: block; width: 100%; height: 50px; line-height: 50px; text-align: center; font-size: 20px; }'; 58 | document.head.appendChild(koe_43_style); 59 | var koe_43_list = document.createElement('div'); 60 | koe_43_list.setAttribute('class', 'koe_43_list'); 61 | koe_43_list.innerHTML = 62 | 'bili+bili唧唧'; 63 | document.body.appendChild(koe_43_list); 64 | } else { 65 | document.querySelector('.koe_43_list a[data-id="' + koe_43_click_num + '"]').setAttribute('style', ''); 66 | koe_43_click_num = koe_43_click_num >= 1 ? 0 : ++koe_43_click_num; 67 | document.querySelector('.koe_43_list a[data-id="' + koe_43_click_num + '"]').setAttribute('style', 'background-color: #FB7299; color: #FFF'); 68 | } 69 | 70 | koe_43_timer = setTimeout(function () { 71 | document.querySelector('.koe_43_list a[data-id="' + koe_43_click_num + '"]').click(); 72 | }, 1500); 73 | -------------------------------------------------------------------------------- /code/js-43.version-1.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_43_click_num==='undefined')var koe_43_click_num=0;if(typeof koe_43_timer==='undefined')var koe_43_timer=null;if(koe_43_timer!==null)clearTimeout(koe_43_timer);if(typeof bv2av_com_bv2av==='undefined'){const bv2av_com_table=[...'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF',];const bv2av_com_s=[11,10,3,8,4,6];const bv2av_com_xor=177451812;const bv2av_com_add=8728348608;var bv2av_com_bv2av=(bv)=>{let str='';if(bv.length===12){str=bv}else if(bv.length===10){str=`BV${bv}`}else if(bv.length===9){str=`BV1${bv}`}else{return'¿你在想桃子?'}if(!str.match(/[Bb][Vv][fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF]{10}/gu)){return'¿你在想桃子?'}let result=0;let i=0;while(i<6){result+=bv2av_com_table.indexOf(str[bv2av_com_s[i]])*58**i;i+=1}return(result-bv2av_com_add)^bv2av_com_xor}}if(document.querySelector('.koe_43_list')===null){var koe_43_av=bv2av_com_bv2av(__INITIAL_STATE__.bvid);var koe_43_style=document.createElement('style');koe_43_style.innerText='.koe_43_list { position: fixed; top: 100px; left: 50px; width: 200px; height: 100px; border-radius: 10px; background-color: #CCC; overflow: hidden; z-index: 999999; } .koe_43_list a { display: block; width: 100%; height: 50px; line-height: 50px; text-align: center; font-size: 20px; }';document.head.appendChild(koe_43_style);var koe_43_list=document.createElement('div');koe_43_list.setAttribute('class','koe_43_list');koe_43_list.innerHTML='bili+bili唧唧';document.body.appendChild(koe_43_list)}else{document.querySelector('.koe_43_list a[data-id="'+koe_43_click_num+'"]').setAttribute('style','');koe_43_click_num=koe_43_click_num>=1?0:++koe_43_click_num;document.querySelector('.koe_43_list a[data-id="'+koe_43_click_num+'"]').setAttribute('style','background-color: #FB7299; color: #FFF')}koe_43_timer=setTimeout(function(){document.querySelector('.koe_43_list a[data-id="'+koe_43_click_num+'"]').click()},1500);/*{"name":"找回失效视频"}*/ -------------------------------------------------------------------------------- /code/js-44.js: -------------------------------------------------------------------------------- 1 | if (document.querySelector('#koe_44_audio') === null) { 2 | if (typeof koe_44_dbclick === 'undefined' || koe_44_dbclick === null) { 3 | var koe_44_dbclick = false; 4 | } else { 5 | if (koe_44_dbclick === false) koe_44_dbclick = true; 6 | } 7 | 8 | if (typeof koe_44_timer === 'undefined') var koe_44_timer = null; 9 | if (koe_44_timer !== null) clearTimeout(koe_44_timer); 10 | 11 | var koe_44_interval = null; 12 | var koe_44_p = null; 13 | 14 | koe_44_timer = setTimeout(function () { 15 | // 默认 10 分钟 16 | var koe_44_time = 600; 17 | if (koe_44_dbclick) { 18 | koe_44_time = (parseInt(prompt('请输入分钟')) || 10) * 60; 19 | } 20 | var koe_44_style = document.createElement('style'); 21 | koe_44_style.innerText = 22 | '.koe_44_p { position: fixed; top: 0; left: 0; padding: 5px; width: auto; height: 30px; line-height: 30px; font-size: 26px; text-align: center; color: #FFF; background-color: #000; z-index: 999999; }'; 23 | 24 | var koe_44_audio = document.createElement('audio'); 25 | koe_44_audio.setAttribute('id', 'koe_44_audio'); 26 | koe_44_audio.loop = true; 27 | koe_44_audio.src = 28 | 'https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLXNoUFZWTlB5Tk16LXRabGc=.mp3'; 29 | 30 | koe_44_p = document.createElement('p'); 31 | koe_44_p.setAttribute('class', 'koe_44_p'); 32 | 33 | document.head.appendChild(koe_44_style); 34 | 35 | document.body.appendChild(koe_44_p); 36 | document.body.appendChild(koe_44_audio); 37 | koe_44_interval = setInterval(function () { 38 | koe_44_p.innerText = --koe_44_time; 39 | if (koe_44_time <= 0) { 40 | koe_44_audio.play(); 41 | clearInterval(koe_44_interval); 42 | } 43 | }, 1000); 44 | koe_44_dbclick = null; 45 | }, 250); 46 | } else { 47 | clearInterval(koe_44_interval); 48 | if(koe_44_p !== null) koe_44_p.remove(); 49 | koe_44_audio.remove(); 50 | } 51 | -------------------------------------------------------------------------------- /code/js-44.min.js: -------------------------------------------------------------------------------- 1 | if(document.querySelector('#koe_44_audio')===null){if(typeof koe_44_dbclick==='undefined'||koe_44_dbclick===null){var koe_44_dbclick=false}else{if(koe_44_dbclick===false)koe_44_dbclick=true}if(typeof koe_44_timer==='undefined')var koe_44_timer=null;if(koe_44_timer!==null)clearTimeout(koe_44_timer);var koe_44_interval=null;var koe_44_p=null;koe_44_timer=setTimeout(function(){var koe_44_time=600;if(koe_44_dbclick){koe_44_time=(parseInt(prompt('请输入分钟'))||10)*60}var koe_44_style=document.createElement('style');koe_44_style.innerText='.koe_44_p { position: fixed; top: 0; left: 0; padding: 5px; width: auto; height: 30px; line-height: 30px; font-size: 26px; text-align: center; color: #FFF; background-color: #000; z-index: 999999; }';var koe_44_audio=document.createElement('audio');koe_44_audio.setAttribute('id','koe_44_audio');koe_44_audio.loop=true;koe_44_audio.src='https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLXNoUFZWTlB5Tk16LXRabGc=.mp3';koe_44_p=document.createElement('p');koe_44_p.setAttribute('class','koe_44_p');document.head.appendChild(koe_44_style);document.body.appendChild(koe_44_p);document.body.appendChild(koe_44_audio);koe_44_interval=setInterval(function(){koe_44_p.innerText=--koe_44_time;if(koe_44_time<=0){koe_44_audio.play();clearInterval(koe_44_interval)}},1000);koe_44_dbclick=null},250)}else{clearInterval(koe_44_interval);if(koe_44_p!==null)koe_44_p.remove();koe_44_audio.remove()};/*{"name":"先輩アラーム"}*/ -------------------------------------------------------------------------------- /code/js-45.js: -------------------------------------------------------------------------------- 1 | if (typeof koe_45_style === 'undefined') { 2 | var koe_45_is_show = true; 3 | var koe_45_style = document.createElement('style'); 4 | koe_45_style.innerText = 5 | '.koe_45_ul { position: absolute; width: 400px; -webkit-transform: translate(-33%, 5%); -moz-transform: translate(-33%, 5%); transform: translate(-33%, 5%); } .koe_45_ul li { color: #000; text-align: left; } .koe_45_ul li:nth-of-type(odd) { background-color: #EEE; } .koe_45_ul li:nth-of-type(even) { background-color: #DDD; }'; 6 | 7 | document.head.appendChild(koe_45_style); 8 | 9 | document 10 | .querySelectorAll('#tp-bought-root table a[action=a4]') 11 | .forEach(function (element) { 12 | element.parentElement.style.position = 'relative'; 13 | var koe_45_trade_id = /trade_id=(\d+)/.exec(element.href)[1]; 14 | var koe_45_xhr = new XMLHttpRequest(); 15 | koe_45_xhr.open( 16 | 'GET', 17 | 'https://buyertrade.taobao.com/trade/json/transit_step.do?bizOrderId=' + 18 | koe_45_trade_id, 19 | true 20 | ); 21 | koe_45_xhr.send(); 22 | koe_45_xhr.onreadystatechange = function () { 23 | if (koe_45_xhr.readyState === 4 && koe_45_xhr.status === 200) { 24 | var address_ul = document.createElement('ul'); 25 | address_ul.setAttribute('class', 'koe_45_ul'); 26 | var json = JSON.parse(koe_45_xhr.responseText); 27 | var address_li = ''; 28 | if (json.address.length > 0) { 29 | json.address.forEach(function (item, index) { 30 | if (index < 3) 31 | address_li += '
  • ' + item.time + ' ' + item.place + '
  • '; 32 | }); 33 | } else { 34 | address_li = '
  • 无记录
  • '; 35 | } 36 | address_ul.innerHTML = address_li; 37 | element.parentElement.appendChild(address_ul); 38 | } 39 | }; 40 | }); 41 | } else { 42 | if (koe_45_is_show) { 43 | koe_45_is_show = false; 44 | document.querySelectorAll('.koe_45_ul').forEach(function (element) { 45 | element.style.display = 'none'; 46 | }); 47 | } else { 48 | koe_45_is_show = true; 49 | document.querySelectorAll('.koe_45_ul').forEach(function (element) { 50 | element.style.display = 'block'; 51 | }); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /code/js-45.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_45_style==='undefined'){var koe_45_is_show=true;var koe_45_style=document.createElement('style');koe_45_style.innerText='.koe_45_ul { position: absolute; width: 400px; -webkit-transform: translate(-33%, 5%); -moz-transform: translate(-33%, 5%); transform: translate(-33%, 5%); } .koe_45_ul li { color: #000; text-align: left; } .koe_45_ul li:nth-of-type(odd) { background-color: #EEE; } .koe_45_ul li:nth-of-type(even) { background-color: #DDD; }';document.head.appendChild(koe_45_style);document.querySelectorAll('#tp-bought-root table a[action=a4]').forEach(function(element){element.parentElement.style.position='relative';var koe_45_trade_id=/trade_id=(\d+)/.exec(element.href)[1];var koe_45_xhr=new XMLHttpRequest();koe_45_xhr.open('GET','https://buyertrade.taobao.com/trade/json/transit_step.do?bizOrderId='+koe_45_trade_id,'true');koe_45_xhr.send();koe_45_xhr.onreadystatechange=function(){if(koe_45_xhr.readyState===4&&koe_45_xhr.status===200){var address_ul=document.createElement('ul');address_ul.setAttribute('class','koe_45_ul');var json=JSON.parse(koe_45_xhr.responseText);var address_li='';if(json.address.length>0){json.address.forEach(function(item,index){if(index<3)address_li+='
  • '+item.time+' '+item.place+'
  • '})}else{address_li='
  • 无记录
  • '}address_ul.innerHTML=address_li;element.parentElement.appendChild(address_ul)}}})}else{if(koe_45_is_show){koe_45_is_show=false;document.querySelectorAll('.koe_45_ul').forEach(function(element){element.style.display='none'})}else{koe_45_is_show=true;document.querySelectorAll('.koe_45_ul').forEach(function(element){element.style.display='block'})}};/*{"name":"显示所有物流信息"}*/ -------------------------------------------------------------------------------- /code/js-46.js: -------------------------------------------------------------------------------- 1 | if (typeof koe_46_is_add_listener === 'undefined') { 2 | document.title = '√ ' + document.title; 3 | var koe_46_is_add_listener = true; 4 | 5 | document.addEventListener('webkitvisibilitychange', function (e) { 6 | if (e.target.webkitHidden) { 7 | document.querySelectorAll('iframe').forEach(function (doc) { 8 | if ( 9 | doc.contentDocument !== null && 10 | doc.contentDocument.documentElement !== null 11 | ) { 12 | doc.contentDocument.documentElement 13 | .querySelectorAll('audio,video') 14 | .forEach(function (element) { 15 | element.pause(); 16 | }); 17 | } 18 | }); 19 | document.querySelectorAll('audio,video').forEach(function (element) { 20 | element.pause(); 21 | }); 22 | } else { 23 | document.querySelectorAll('iframe').forEach(function (doc) { 24 | if ( 25 | doc.contentDocument !== null && 26 | doc.contentDocument.documentElement !== null 27 | ) { 28 | doc.contentDocument.documentElement 29 | .querySelectorAll('audio,video') 30 | .forEach(function (element) { 31 | element.play(); 32 | }); 33 | } 34 | }); 35 | document.querySelectorAll('audio,video').forEach(function (element) { 36 | element.play(); 37 | }); 38 | } 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /code/js-46.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_46_is_add_listener==='undefined'){document.title='√ '+document.title;var koe_46_is_add_listener=true;document.addEventListener('webkitvisibilitychange',function(e){if(e.target.webkitHidden){document.querySelectorAll('iframe').forEach(function(doc){if(doc.contentDocument!==null&&doc.contentDocument.documentElement!==null){doc.contentDocument.documentElement.querySelectorAll('audio,video').forEach(function(element){element.pause()})}});document.querySelectorAll('audio,video').forEach(function(element){element.pause()})}else{document.querySelectorAll('iframe').forEach(function(doc){if(doc.contentDocument!==null&&doc.contentDocument.documentElement!==null){doc.contentDocument.documentElement.querySelectorAll('audio,video').forEach(function(element){element.play()})}});document.querySelectorAll('audio,video').forEach(function(element){element.play()})}})};/*{"name":"切换页面暂停播放"}*/ -------------------------------------------------------------------------------- /code/js-47.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_47_p === 'undefined') { 2 | var koe_47_p = document.createElement('p'); 3 | koe_47_p.setAttribute('style', 'position: fixed; top: 50%; left: 50%; padding: 10px; font-size: 20px; color: #FFF; background-color: #000; -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); transform: translate(-50%, -50%); z-index: 99999999; display: none;'); 4 | koe_47_p.ondblclick = function() { 5 | this.style.display = 'none'; 6 | } 7 | document.body.appendChild(koe_47_p); 8 | } 9 | var koe_47_selected = window 10 | .getSelection() 11 | .toString() 12 | .replace(/(^\s+|\s+$)/, ''); 13 | if (koe_47_selected !== '') { 14 | var koe_47_xhr = new XMLHttpRequest(); 15 | koe_47_xhr.open( 16 | 'GET', 17 | 'https://bili.imba97.cn/ji.php?kw=' + koe_47_selected, 18 | true 19 | ); 20 | koe_47_xhr.send(); 21 | koe_47_xhr.onreadystatechange = function () { 22 | if (koe_47_xhr.readyState === 4 && koe_47_xhr.status === 200) { 23 | var json = JSON.parse(koe_47_xhr.responseText); 24 | koe_47_p.innerHTML = json.data.replace(/(\\n|\\r)/g, '') + '【查看详情】'; 25 | koe_47_p.style.display = 'block'; 26 | } 27 | }; 28 | } else { 29 | koe_47_p.style.display = 'none'; 30 | } 31 | -------------------------------------------------------------------------------- /code/js-47.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_47_p==='undefined'){var koe_47_p=document.createElement('p');koe_47_p.setAttribute('style','position: fixed; top: 50%; left: 50%; padding: 10px; font-size: 20px; color: #FFF; background-color: #000; -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); transform: translate(-50%, -50%); z-index: 99999999; display: none;');koe_47_p.ondblclick=function(){this.style.display='none'};document.body.appendChild(koe_47_p)}var koe_47_selected=window.getSelection().toString().replace(/(^\s+|\s+$)/,'');if(koe_47_selected!==''){var koe_47_xhr=new XMLHttpRequest();koe_47_xhr.open('GET','https://bili.imba97.cn/ji.php?kw='+koe_47_selected,true);koe_47_xhr.send();koe_47_xhr.onreadystatechange=function(){if(koe_47_xhr.readyState===4&&koe_47_xhr.status===200){var json=JSON.parse(koe_47_xhr.responseText);koe_47_p.innerHTML=json.data.replace(/(\\n|\\r)/g,'')+'【查看详情】';koe_47_p.style.display='block'}}}else{koe_47_p.style.display='none'};void(0);/*{"name":"梗百科搜索"}*/ -------------------------------------------------------------------------------- /code/js-47.server.php: -------------------------------------------------------------------------------- 1 | 0) { 28 | die(json_encode([ 29 | 'status' => 0, 30 | 'data' => '暂未收录' 31 | ])); 32 | } 33 | 34 | preg_match_all('/plaintext:"(.*?)"/', $data, $match_data); 35 | 36 | if(count($match_data[0]) === 0) { 37 | die(json_encode([ 38 | 'status' => 0, 39 | 'data' => '未知错误' 40 | ])); 41 | } 42 | 43 | die(json_encode([ 44 | 'status' => 1, 45 | 'data' => $match_data[1][0] 46 | ])); -------------------------------------------------------------------------------- /code/js-48.js: -------------------------------------------------------------------------------- 1 | Number.prototype.km = function() { return this * 1000 } 2 | Number.prototype.m = function() { return Number(this) } 3 | Number.prototype.cm = function() { return this / 100 } 4 | Number.prototype.ft = function() { return this / 3.2808399 } -------------------------------------------------------------------------------- /code/js-48.min.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunsetMkt/js/6d522172fac6ccfd0e6fd7d3e1d881df959b3200/code/js-48.min.js -------------------------------------------------------------------------------- /code/js-49.js: -------------------------------------------------------------------------------- 1 | String.prototype.xhr = function(param) { 2 | var xhr = new XMLHttpRequest(); 3 | var stringObject = this; 4 | xhr.open('GET', this + '?' + param, true); 5 | xhr.send(); 6 | xhr.onreadystatechange = function() { 7 | if(xhr.readyState === 4 && xhr.status === 200) { 8 | stringObject.xhrCallback(JSON.parse(xhr.responseText)); 9 | } 10 | } 11 | 12 | return this; 13 | } 14 | 15 | String.prototype.xhrCallback = null; 16 | String.prototype.setXhrCallback = function(callback) { 17 | this.xhrCallback = callback; 18 | } 19 | 20 | 'https://bili.imba97.cn/ji.php' 21 | .xhr('kw=恶臭') 22 | .setXhrCallback(function(json) { 23 | console.log(json); 24 | }); -------------------------------------------------------------------------------- /code/js-49.min.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunsetMkt/js/6d522172fac6ccfd0e6fd7d3e1d881df959b3200/code/js-49.min.js -------------------------------------------------------------------------------- /code/js-5.js: -------------------------------------------------------------------------------- 1 | // [if-0] 第一次点击 初始化音频等 2 | if (document.querySelector('#koe_video_aaaaaaaaa') === null) { 3 | // 音乐是否完成加载 4 | var koe_loaded_aaaaaaaaa = false; 5 | // 计时器 6 | var koe_timer_aaaaaaaaa = null; 7 | // 弹幕的 top 8 | var koe_global_top = 0; 9 | // style 效果 10 | var koe_danmakuClass = document.createElement('style'); 11 | koe_danmakuClass.innerText = 12 | '.koe-danmakuBox { position: fixed; top: 0; left:0; width: 100%; height: 100%; overflow: hidden; z-index: 99999999999; } .koe-danmaku { position: absolute; margin: 0; padding: 0; -webkit-text-stroke:.8px #000; font-size: 30px; font-weight: 700; color: #FFF; white-space:nowrap; animation-fill-mode: forwards; } @keyframes move { from { } to { left: -1080px } }; @-webkit-keyframes move { from { } to { left: -1080px } }; @-moz-keyframes move { from { } to { left: -1080px } }; @-o-keyframes move { from { } to { left: -1080px } }'; 13 | // 弹幕容器 14 | var koe_danmakuBox = document.createElement('div'); 15 | koe_danmakuBox.setAttribute('class', 'koe-danmakuBox'); 16 | // 向 body 中添加 style 和 弹幕容器 17 | document.body.appendChild(koe_danmakuClass); 18 | document.body.appendChild(koe_danmakuBox); 19 | // 屏幕分辨率高度 20 | var koe_screen_height = 21 | window.screen.height > 300 ? window.screen.height : 1000; 22 | // 弹幕高度 23 | var koe_danmaku_lineHeight = 35; 24 | // 弹幕最大行数 用屏幕分辨率高度 除以 弹幕高度 25 | var koe_danmaku_max = Math.floor(koe_screen_height / koe_danmaku_lineHeight); 26 | 27 | // 来たぁぁぁぁぁぁぁぁぁぁ 28 | function koe_kitaaaaaaaaaa() { 29 | for (var i = 0; i < 1000; i++) { 30 | setTimeout(function () { 31 | koe_global_top = 0; 32 | for (var j = 0; j < koe_danmaku_max; j++) { 33 | setTimeout('koe_add_danmaku()', koe_rand(0, 2000)); 34 | } 35 | }, i * 3000); 36 | } 37 | } 38 | // 添加弹幕 39 | function koe_add_danmaku() { 40 | // 创建 p 标签,每个 p 标签是一行弹幕 41 | var koe_danmaku = document.createElement('p'); 42 | koe_danmaku.setAttribute('class', 'koe-danmaku'); 43 | koe_danmaku.innerText = koe_aaaaaaaaa(); 44 | // 获取 body 宽度 45 | var koe_bodyWidth = document.body.clientWidth; 46 | // 让 p 标签的 top 等于 koe_global_top,left 等于 随机取值 最小 ( body 宽度 + 100 ) 最大 ( body 宽度 + 500 ),并且设置动画,让 left 变成 -1080px,这样弹幕就会向左移动,时长 10 秒钟 47 | koe_danmaku.setAttribute( 48 | 'style', 49 | 'top:' + 50 | koe_global_top + 51 | 'px; left: ' + 52 | koe_rand(koe_bodyWidth + 100, koe_bodyWidth + 500) + 53 | 'px;' + 54 | 'animation: move linear 10s;-webkit-animation: move linear 10s;-moz-animation: move linear 10s;-o-animation: move linear 10s;' 55 | ); 56 | koe_danmakuBox.appendChild(koe_danmaku); 57 | // 10 秒后删除这条弹幕,如果不删会造成大量内存消耗,导致卡顿 58 | setTimeout(function () { 59 | koe_danmakuBox.removeChild(koe_danmaku); 60 | }, 10000); 61 | // 让 koe_global_top 增加一个弹幕高度 62 | koe_global_top += koe_danmaku_lineHeight; 63 | } 64 | // 获取随机数量的“啊”,最少 10 个,最多 100 个 65 | function koe_aaaaaaaaa() { 66 | var str = ''; 67 | for (var a = 0; a < koe_rand(10, 100); a++) { 68 | str += '啊'; 69 | } 70 | return str; 71 | } 72 | // 生成随机数 73 | function koe_rand(min, max) { 74 | return Math.floor(Math.random() * (max - min + 1) + min); 75 | } 76 | 77 | // 左上角的提示,在音乐加载完之前一直显示 78 | var koe_msg_aaaaaaaaa = document.createElement('p'); 79 | koe_msg_aaaaaaaaa.innerText = '正在啊啊啊啊啊啊啊啊'; 80 | koe_msg_aaaaaaaaa.setAttribute('id', 'koe_msg_aaaaaaaaa'); 81 | koe_msg_aaaaaaaaa.setAttribute( 82 | 'style', 83 | 'position:fixed;top:0;left:0;width:300px;height:30px;line-height:30px;text-align:center;background-color:#000;color:#FFF;font-size:26px;z-index:99999999' 84 | ); 85 | document.body.appendChild(koe_msg_aaaaaaaaa); 86 | 87 | // 是否正在播放 88 | var koe_played_aaaaaaaaa = true; 89 | // 加载音乐 90 | var koe_video_aaaaaaaaa = document.createElement('video'); 91 | koe_video_aaaaaaaaa.setAttribute('id', 'koe_video_aaaaaaaaa'); 92 | // 设置自动播放 93 | koe_video_aaaaaaaaa.setAttribute('autoplay', ''); 94 | koe_video_aaaaaaaaa.setAttribute('name', 'media'); 95 | // 监听音乐加载完成的事件 96 | koe_video_aaaaaaaaa.addEventListener('canplaythrough', function () { 97 | // 移除左上角提示 98 | koe_msg_aaaaaaaaa.remove(); 99 | // 设置加载完成 100 | koe_loaded_aaaaaaaaa = true; 101 | // 开启计时器,每 0.2 秒执行一次,检查音乐播放进度 102 | koe_timer_aaaaaaaaa = setInterval(function () { 103 | // 当音乐播放到 13.5 秒时 104 | if (koe_video_aaaaaaaaa.currentTime > 13.5) { 105 | // 调用 来たぁぁぁぁぁぁぁぁぁぁ 106 | koe_kitaaaaaaaaaa(); 107 | // 清除当前计时器 108 | clearInterval(koe_timer_aaaaaaaaa); 109 | // 将变量设置为空 110 | koe_timer_aaaaaaaaa = null; 111 | } 112 | }, 200); 113 | }); 114 | // 监听暂停 让正在播放设为 false 115 | koe_video_aaaaaaaaa.addEventListener('pause', function () { 116 | koe_played_aaaaaaaaa = false; 117 | }); 118 | // 监听播放 让正在播放设为 true 119 | koe_video_aaaaaaaaa.addEventListener('play', function () { 120 | koe_played_aaaaaaaaa = true; 121 | }); 122 | // 添加音乐资源 123 | var koe_source_aaaaaaaaa = document.createElement('source'); 124 | koe_source_aaaaaaaaa.setAttribute( 125 | 'src', 126 | 'https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLW9FUUlIVkVMMHo0eDhGSFE/ZT0xVE8zR3E=.mp3' 127 | ); 128 | koe_source_aaaaaaaaa.setAttribute('type', 'audio/mpeg'); 129 | koe_video_aaaaaaaaa.appendChild(koe_source_aaaaaaaaa); 130 | document.body.appendChild(koe_video_aaaaaaaaa); 131 | 132 | // [if-0] 否则判断一下是否加载完成 133 | } else { 134 | if (koe_loaded_aaaaaaaaa) { 135 | // 判断是否正在播放 控制暂停或继续播放 136 | if (koe_played_aaaaaaaaa) { 137 | document.querySelector('#koe_video_aaaaaaaaa').pause(); 138 | } else { 139 | document.querySelector('#koe_video_aaaaaaaaa').play(); 140 | } 141 | } 142 | } 143 | void(0); 144 | -------------------------------------------------------------------------------- /code/js-5.min.js: -------------------------------------------------------------------------------- 1 | if(document.querySelector('#koe_msg_aaaaaaaaa')===null){var koe_clicked_aaaaaaaaa=true;if(document.querySelector('#koe_video_aaaaaaaaa')===null){var koe_timer_aaaaaaaaa=null;var koe_global_top=0;var koe_danmakuClass=document.createElement('style');koe_danmakuClass.innerText='.koe-danmakuBox { position: fixed; top: 0; left:0; width: 100%; height: 100%; overflow: hidden; z-index: 99999999999; } .koe-danmaku { position: absolute; margin: 0; padding: 0; -webkit-text-stroke:.8px #000; font-size: 30px; font-weight: 700; color: #FFF; white-space:nowrap; animation-fill-mode: forwards; } @keyframes move { from { } to { left: -1080px } }; @-webkit-keyframes move { from { } to { left: -1080px } }; @-moz-keyframes move { from { } to { left: -1080px } }; @-o-keyframes move { from { } to { left: -1080px } }';var koe_danmakuBox=document.createElement('div');koe_danmakuBox.setAttribute('class','koe-danmakuBox');document.body.appendChild(koe_danmakuClass);document.body.appendChild(koe_danmakuBox);var koe_screen_height=window.screen.height>300?window.screen.height:1000;var koe_danmaku_lineHeight=35;var koe_danmaku_max=Math.floor(koe_screen_height/koe_danmaku_lineHeight);function koe_kittaaaaaaaaaa(){for(var i=0;i<1000;i++){setTimeout(function(){koe_global_top=0;for(var j=0;j13.5){koe_kittaaaaaaaaaa();clearInterval(koe_timer_aaaaaaaaa);koe_timer_aaaaaaaaa=null}},200)});koe_video_aaaaaaaaa.addEventListener('pause',function(){koe_played_aaaaaaaaa=false;koe_clicked_aaaaaaaaa=false});koe_video_aaaaaaaaa.addEventListener('play',function(){koe_played_aaaaaaaaa=true;koe_clicked_aaaaaaaaa=false});var koe_source_aaaaaaaaa=document.createElement('source');koe_source_aaaaaaaaa.setAttribute('src','https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLW9FUUlIVkVMMHo0eDhGSFE/ZT0xVE8zR3E=.mp3');koe_source_aaaaaaaaa.setAttribute('type','audio/mpeg');koe_video_aaaaaaaaa.appendChild(koe_source_aaaaaaaaa);document.body.appendChild(koe_video_aaaaaaaaa)}else{if(koe_played_aaaaaaaaa){document.querySelector('#koe_video_aaaaaaaaa').pause()}else{document.querySelector('#koe_video_aaaaaaaaa').play()}}}void(0);/*{"name":"JS啊啊啊啊啊啊啊啊啊"}*/ -------------------------------------------------------------------------------- /code/js-50.js: -------------------------------------------------------------------------------- 1 | window.open('http://tool.chinaz.com/speedtest/' + window.location.host); 2 | -------------------------------------------------------------------------------- /code/js-50.min.js: -------------------------------------------------------------------------------- 1 | window.open('http://tool.chinaz.com/speedtest/'+window.location.host);/*{"name":"跳转网站测速"}*/ -------------------------------------------------------------------------------- /code/js-51.js: -------------------------------------------------------------------------------- 1 | if (typeof koe_51_style === 'undefined') { 2 | var koe_51_is_show = true; 3 | var koe_51_style = document.createElement('style'); 4 | koe_51_style.innerText = ` 5 | 6 | .koe_51_search_box, 7 | .koe_51_search_msg, 8 | .koe_51_background, 9 | .koe_51_search_text, 10 | .koe_51_search_button, 11 | .koe_51_search_list { 12 | position: fixed; 13 | } 14 | 15 | .koe_51_search_box { 16 | top: 0; 17 | left: 0; 18 | width: 100%; 19 | height: 100%; 20 | z-index: 99999; 21 | } 22 | 23 | .koe_51_search_msg { 24 | top: 10px; 25 | left: 10px; 26 | height: 50px; 27 | line-height: 30px; 28 | font-size: 20px; 29 | color: #FFF; 30 | } 31 | 32 | .koe_51_background { 33 | top: 0; 34 | left: 0; 35 | width: 100%; 36 | height: 100%; 37 | background-color: #000; 38 | opacity: 0.8; 39 | z-index: -1; 40 | } 41 | 42 | .koe_51_search_text { 43 | top: 50px; 44 | left: 50px; 45 | padding: 2px 5px; 46 | width: 320px; 47 | height: 30px; 48 | line-height: 30px; 49 | font-size: 24px; 50 | color: #FFF; 51 | background: none; 52 | border: none; 53 | border-bottom: 2px #FFF solid; 54 | } 55 | 56 | .koe_51_search_button { 57 | top: 50px; 58 | left: 400px; 59 | width: 100px; 60 | height: 32px; 61 | line-height: 32px; 62 | font-size: 22px; 63 | color: #FFF; 64 | background-color: #666; 65 | border: 1px #000 solid; 66 | border-radius: 5px; 67 | } 68 | 69 | .koe_51_search_button:active { 70 | background-color: #999; 71 | } 72 | 73 | .koe_51_search_list { 74 | top: 130px; 75 | left: 50px; 76 | height: 760px; 77 | overflow-y: auto; 78 | } 79 | 80 | .koe_51_search_list li { 81 | position: relative; 82 | margin: 5px; 83 | width: 210px; 84 | height: 180px; 85 | list-style: none; 86 | float: left; 87 | overflow: hidden; 88 | cursor: pointer; 89 | } 90 | 91 | .koe_51_search_list::after { 92 | clear:both; 93 | } 94 | 95 | .koe_51_search_list li img { 96 | position: absolute; 97 | top: 70px; 98 | left: 50%; 99 | border-radius: 5px; 100 | -webkit-transform: translate(-50%,-50%); 101 | -moz-transform: translate(-50%,-50%); 102 | transform:translate(-50%,-50%); 103 | height: 140px; 104 | } 105 | 106 | .koe_51_search_list li .koe_51_search_li_title { 107 | position: absolute; 108 | bottom: 0; 109 | left: 0; 110 | padding: 0 5px; 111 | width: 100%; 112 | height: 30px; 113 | line-height: 30px; 114 | 115 | color: #FFF; 116 | font-size: 20px; 117 | 118 | display: -webkit-box; 119 | -webkit-box-orient: vertical; 120 | -webkit-line-clamp: 3; 121 | overflow: hidden; 122 | } 123 | `; 124 | 125 | var koe_51_search_box = document.createElement('div'); 126 | koe_51_search_box.innerHTML = '
    '; 127 | koe_51_search_box.setAttribute('class', 'koe_51_search_box'); 128 | 129 | var koe_51_search_msg = document.createElement('p'); 130 | koe_51_search_msg.setAttribute('class', 'koe_51_search_msg'); 131 | koe_51_search_msg.innerText = '正在获取收藏夹视频...'; 132 | 133 | var koe_51_search_text = document.createElement('input'); 134 | koe_51_search_text.setAttribute('class', 'koe_51_search_text'); 135 | koe_51_search_text.setAttribute('type', 'text'); 136 | 137 | var koe_51_search_button = document.createElement('button'); 138 | koe_51_search_button.setAttribute('class', 'koe_51_search_button'); 139 | koe_51_search_button.innerText = '搜索'; 140 | 141 | var koe_51_search_list = document.createElement('ul'); 142 | koe_51_search_list.setAttribute('class', 'koe_51_search_list'); 143 | 144 | koe_51_search_box.appendChild(koe_51_search_msg); 145 | koe_51_search_box.appendChild(koe_51_search_list); 146 | 147 | document.head.appendChild(koe_51_style); 148 | document.body.appendChild(koe_51_search_box); 149 | 150 | koe_51_search_button.addEventListener('click', function () { 151 | 152 | koe_51_search_list.innerHTML = ''; 153 | 154 | var koe_51_reg = new RegExp( 155 | '(' + koe_51_search_text.value.replace(',', '|') + ')' 156 | ); 157 | koe_51_videos.forEach(function (item) { 158 | if (koe_51_reg.test(item.title) || koe_51_reg.test(item.intro)) { 159 | var koe_51_search_li = document.createElement('li'); 160 | koe_51_search_li.innerHTML = 161 | '

    ' + 164 | item.title + 165 | '

    '; 166 | koe_51_search_li.addEventListener('click', function () { 167 | window.open('https://b23.tv/' + item.bvid); 168 | }); 169 | koe_51_search_list.appendChild(koe_51_search_li); 170 | } 171 | }); 172 | }); 173 | 174 | var koe_51_videos = new Array(); 175 | var koe_51_fid_index = 0; 176 | var koe_51_fids = new Array(); 177 | document 178 | .querySelectorAll('.fav-container .fav-list-container .fav-item') 179 | .forEach(function (element) { 180 | koe_51_fids.push(element.getAttribute('fid')); 181 | }); 182 | 183 | koe_51_xhr(1); 184 | function koe_51_xhr(page) { 185 | if (typeof koe_51_fids[koe_51_fid_index] === 'undefined') { 186 | koe_51_search_box.appendChild(koe_51_search_text); 187 | koe_51_search_box.appendChild(koe_51_search_button); 188 | koe_51_search_msg.innerText = '获取视频完成'; 189 | return; 190 | } 191 | var url = 192 | 'https://api.bilibili.com/x/v3/fav/resource/list?media_id=' + 193 | koe_51_fids[koe_51_fid_index] + 194 | '&pn=' + 195 | page + 196 | '&ps=20&keyword=&order=mtime&type=0&tid=0&jsonp=jsonp'; 197 | var xhr = new XMLHttpRequest(); 198 | xhr.open('GET', url, true); 199 | xhr.withCredentials = true; 200 | xhr.send(); 201 | xhr.onreadystatechange = function () { 202 | if (xhr.readyState === 4 && xhr.status === 200) { 203 | var json = JSON.parse(xhr.responseText); 204 | if (json.data.medias === null) { 205 | if (koe_51_fid_index < koe_51_fids.length) { 206 | ++koe_51_fid_index; 207 | koe_51_xhr(1); 208 | } 209 | return; 210 | } 211 | json.data.medias.forEach(function (item) { 212 | koe_51_videos.push({ 213 | bvid: item.bvid, 214 | cover: item.cover, 215 | title: item.title, 216 | intro: item.intro, 217 | }); 218 | }); 219 | if (json.data.medias.length < 20) { 220 | ++koe_51_fid_index; 221 | koe_51_xhr(1); 222 | } else { 223 | koe_51_xhr(++page); 224 | } 225 | } 226 | }; 227 | } 228 | } else { 229 | if(koe_51_is_show) { 230 | koe_51_search_box.style.display = 'none'; 231 | koe_51_is_show = false; 232 | } else { 233 | koe_51_search_box.style.display = 'block'; 234 | koe_51_is_show = true; 235 | } 236 | } 237 | -------------------------------------------------------------------------------- /code/js-51.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_51_style==='undefined'){var koe_51_is_show=true;var koe_51_style=document.createElement('style');koe_51_style.innerText=`.koe_51_search_box,.koe_51_search_msg,.koe_51_background,.koe_51_search_text,.koe_51_search_button,.koe_51_search_list{position:fixed}.koe_51_search_box{top:0;left:0;width:100%;height:100%;z-index:99999}.koe_51_search_msg{top:10px;left:10px;height:50px;line-height:30px;font-size:20px;color:#FFF}.koe_51_background{top:0;left:0;width:100%;height:100%;background-color:#000;opacity:0.8;z-index:-1}.koe_51_search_text{top:50px;left:50px;padding:2px 5px;width:320px;height:30px;line-height:30px;font-size:24px;color:#FFF;background:none;border:none;border-bottom:2px#FFF solid}.koe_51_search_button{top:50px;left:400px;width:100px;height:32px;line-height:32px;font-size:22px;color:#FFF;background-color:#666;border:1px#000 solid;border-radius:5px}.koe_51_search_button:active{background-color:#999}.koe_51_search_list{top:130px;left:50px;height:760px;overflow-y:auto}.koe_51_search_list li{position:relative;margin:5px;width:210px;height:180px;list-style:none;float:left;overflow:hidden;cursor:pointer}.koe_51_search_list::after{clear:both}.koe_51_search_list li img{position:absolute;top:70px;left:50%;border-radius:5px;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);transform:translate(-50%,-50%);height:140px}.koe_51_search_list li .koe_51_search_li_title{position:absolute;bottom:0;left:0;padding:0 5px;width:100%;height:30px;line-height:30px;color:#FFF;font-size:20px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}`;var koe_51_search_box=document.createElement('div');koe_51_search_box.innerHTML='
    ';koe_51_search_box.setAttribute('class','koe_51_search_box');var koe_51_search_msg=document.createElement('p');koe_51_search_msg.setAttribute('class','koe_51_search_msg');koe_51_search_msg.innerText='正在获取收藏夹视频...';var koe_51_search_text=document.createElement('input');koe_51_search_text.setAttribute('class','koe_51_search_text');koe_51_search_text.setAttribute('type','text');var koe_51_search_button=document.createElement('button');koe_51_search_button.setAttribute('class','koe_51_search_button');koe_51_search_button.innerText='搜索';var koe_51_search_list=document.createElement('ul');koe_51_search_list.setAttribute('class','koe_51_search_list');koe_51_search_box.appendChild(koe_51_search_msg);koe_51_search_box.appendChild(koe_51_search_list);document.head.appendChild(koe_51_style);document.body.appendChild(koe_51_search_box);koe_51_search_button.addEventListener('click',function(){koe_51_search_list.innerHTML='';var koe_51_reg=new RegExp('('+koe_51_search_text.value.replace(',','|')+')');koe_51_videos.forEach(function(item){if(koe_51_reg.test(item.title)||koe_51_reg.test(item.intro)){var koe_51_search_li=document.createElement('li');koe_51_search_li.innerHTML='

    '+item.title+'

    ';koe_51_search_li.addEventListener('click',function(){window.open('https://b23.tv/'+item.bvid)});koe_51_search_list.appendChild(koe_51_search_li)}})});var koe_51_videos=new Array();var koe_51_fid_index=0;var koe_51_fids=new Array();document.querySelectorAll('.fav-container .fav-list-container .fav-item').forEach(function(element){koe_51_fids.push(element.getAttribute('fid'))});koe_51_xhr(1);function koe_51_xhr(page){if(typeof koe_51_fids[koe_51_fid_index]==='undefined'){koe_51_search_box.appendChild(koe_51_search_text);koe_51_search_box.appendChild(koe_51_search_button);koe_51_search_msg.innerText='获取视频完成';return}var url='https://api.bilibili.com/x/v3/fav/resource/list?media_id='+koe_51_fids[koe_51_fid_index]+'&pn='+page+'&ps=20&keyword=&order=mtime&type=0&tid=0&jsonp=jsonp';var xhr=new XMLHttpRequest();xhr.open('GET',url,true);xhr.withCredentials=true;xhr.send();xhr.onreadystatechange=function(){if(xhr.readyState===4&&xhr.status===200){var json=JSON.parse(xhr.responseText);if(json.data.medias===null){if(koe_51_fid_index 164 | 165 | 166 |
  • 167 |

    搜索范围

    168 |

    169 |

    170 |

    171 |
  • 172 | `; 173 | 174 | var koe_52_progress = document.createElement('div'); 175 | koe_52_progress.setAttribute('class', 'koe_52_progress'); 176 | 177 | var koe_52_progress_p = document.createElement('p'); 178 | var koe_52_progress_span = document.createElement('span'); 179 | koe_52_progress.appendChild(koe_52_progress_p); 180 | koe_52_progress.appendChild(koe_52_progress_span); 181 | 182 | koe_52_box.append(koe_52_replys_ul); 183 | koe_52_box.append(koe_52_options); 184 | koe_52_box.append(koe_52_progress); 185 | 186 | document.head.appendChild(koe_52_style); 187 | document.body.appendChild(koe_52_box); 188 | 189 | var koe_52_text = document.querySelector('.koe_52_text'); 190 | var koe_52_checkbox_uname = document.querySelector('.koe_52_checkbox_uname'); 191 | var koe_52_checkbox_message = document.querySelector( 192 | '.koe_52_checkbox_message' 193 | ); 194 | var koe_52_checkbox_sign = document.querySelector('.koe_52_checkbox_sign'); 195 | 196 | koe_52_text.addEventListener('keydown', function(e) { 197 | e = e || window.event; 198 | if(e.keyCode === 13) { 199 | koe_52_search(); 200 | } 201 | }); 202 | 203 | var koe_52_replys = new Array(); 204 | var koe_52_reg = null; 205 | 206 | function koe_52_search() { 207 | koe_52_reg = new RegExp( 208 | '(' + koe_52_text.value.replace(',', '|') + ')', 209 | 'g' 210 | ); 211 | koe_52_replys_ul.innerHTML = ''; 212 | 213 | koe_52_replys.forEach(function (item) { 214 | if ( 215 | (koe_52_reg.test(item.uname) && koe_52_checkbox_uname.checked) || 216 | (koe_52_reg.test(item.message) && koe_52_checkbox_message.checked) || 217 | (koe_52_reg.test(item.sign) && koe_52_checkbox_sign.checked) 218 | ) { 219 | var koe_52_li = document.createElement('li'); 220 | koe_52_li.innerHTML = 221 | '' + 224 | koe_52_highlight(item.uname) + 225 | '

    ' + 226 | koe_52_highlight(item.message) + 227 | '

    '; 228 | 229 | koe_52_li.addEventListener('click', function () { 230 | window.open( 231 | 'https://www.bilibili.com/video/' + 232 | __INITIAL_STATE__.bvid + 233 | '#reply' + 234 | item.rpid 235 | ); 236 | }); 237 | koe_52_replys_ul.appendChild(koe_52_li); 238 | } 239 | }); 240 | } 241 | 242 | function koe_52_highlight(str) { 243 | if(koe_52_reg === null) return str; 244 | return str.replace( 245 | koe_52_reg, 246 | '$1' 247 | ); 248 | } 249 | 250 | function koe_52_getReply(page) { 251 | var url = 252 | 'https://api.bilibili.com/x/v2/reply?jsonp=jsonp&type=1&sort=2&ps=40&pn=' + 253 | page + 254 | '&oid=' + 255 | __INITIAL_STATE__.videoData.aid; 256 | var xhr = new XMLHttpRequest(); 257 | xhr.open('GET', url, true); 258 | xhr.withCredentials = true; 259 | xhr.send(); 260 | xhr.onreadystatechange = function () { 261 | if (xhr.readyState === 4 && xhr.status === 200) { 262 | var json = JSON.parse(xhr.responseText); 263 | if (json.data.replies === null) { 264 | return; 265 | } 266 | 267 | json.data.replies.forEach(function (item) { 268 | koe_52_replys.push({ 269 | rpid: item.rpid, 270 | message: item.content.message, 271 | avatar: item.member.avatar, 272 | uname: item.member.uname, 273 | sign: item.member.sign, 274 | }); 275 | }); 276 | 277 | if (page * 40 <= json.data.page.count) { 278 | var progress = parseInt(((page * 40) / json.data.page.count) * 100); 279 | koe_52_progress_p.innerText = progress + '%'; 280 | koe_52_progress_span.style.width = progress + '%'; 281 | koe_52_getReply(++page); 282 | } else { 283 | koe_52_progress_p.innerText = '100%'; 284 | koe_52_progress_span.style.width = '100%'; 285 | koe_52_text.style.opacity = 1; 286 | setTimeout(function () { 287 | console.log(koe_52_text); 288 | koe_52_text.focus(); 289 | koe_52_progress.style.display = 'none'; 290 | }, 500); 291 | } 292 | } 293 | }; 294 | } 295 | koe_52_getReply(1); 296 | } else { 297 | if (koe_52_is_show) { 298 | koe_52_box.style.display = 'none'; 299 | koe_52_is_show = false; 300 | } else { 301 | koe_52_box.style.display = 'block'; 302 | koe_52_is_show = true; 303 | } 304 | } 305 | -------------------------------------------------------------------------------- /code/js-52.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_52_style==='undefined'){var koe_52_is_show=true;var koe_52_style=document.createElement('style');koe_52_style.innerText=`.koe_52_box,.koe_52_background,.koe_52_options,.koe_52_replys_ul,.koe_52_progress{position:fixed}.koe_52_box{top:0;left:0;width:100%;height:100%;z-index:99999}.koe_52_background{top:0;left:0;width:100%;height:100%;background-color:#000;opacity:0.8;z-index:-1}.koe_52_options{top:20px;left:50px;width:300px}.koe_52_options li{margin-top:30px;font-size:24px;color:#FFF}.koe_52_progress{top:51px;left:50px}.koe_52_progress p{padding:2px 5px;width:180px;height:30px;line-height:30px;font-size:26px;color:#FFF;text-align:center;border-bottom:2px#666 solid}.koe_52_progress span{position:absolute;bottom:0;left:0;height:2px;background-color:#FFF}.koe_52_text{padding:2px 5px;width:180px;height:30px;line-height:30px;font-size:24px;color:#FFF;background:none;border:none;border-bottom:2px#FFF solid;opacity:0}.koe_52_button{width:100px;height:32px;line-height:32px;font-size:22px;color:#FFF;background-color:#666;border:1px#000 solid;border-radius:5px}.koe_52_button:active{background-color:#999}.koe_52_replys_ul{top:50px;left:500px;width:700px;height:800px;overflow-y:auto}.koe_52_replys_ul::-webkit-scrollbar{width:5px;height:1px}.koe_52_replys_ul::-webkit-scrollbar-thumb{border-radius:4px;background:#FFF}.koe_52_replys_ul::-webkit-scrollbar-track{border-radius:4px;background:#666}.koe_52_replys_ul li{position:relative;margin-top:100px;cursor:pointer}.koe_52_replys_ul li img{position:absolute;top:-35px;left:0;width:30px;height:30px;border-radius:100%}.koe_52_replys_ul li span{position:absolute;top:-35px;left:35px;width:300px;height:30px;line-height:30px;font-size:22px;color:#FFF}.koe_52_replys_ul li p{margin:35px 0 0 35px;font-size:18px;color:#FFF}.koe_52_search_options input{zoom:1.5}`;var koe_52_box=document.createElement('div');koe_52_box.setAttribute('class','koe_52_box');koe_52_box.innerHTML='
    ';var koe_52_replys_ul=document.createElement('ul');koe_52_replys_ul.setAttribute('class','koe_52_replys_ul');var koe_52_options=document.createElement('ul');koe_52_options.setAttribute('class','koe_52_options');koe_52_options.innerHTML=`
  • 搜索范围

  • `;var koe_52_progress=document.createElement('div');koe_52_progress.setAttribute('class','koe_52_progress');var koe_52_progress_p=document.createElement('p');var koe_52_progress_span=document.createElement('span');koe_52_progress.appendChild(koe_52_progress_p);koe_52_progress.appendChild(koe_52_progress_span);koe_52_box.append(koe_52_replys_ul);koe_52_box.append(koe_52_options);koe_52_box.append(koe_52_progress);document.head.appendChild(koe_52_style);document.body.appendChild(koe_52_box);var koe_52_text=document.querySelector('.koe_52_text');var koe_52_checkbox_uname=document.querySelector('.koe_52_checkbox_uname');var koe_52_checkbox_message=document.querySelector('.koe_52_checkbox_message');var koe_52_checkbox_sign=document.querySelector('.koe_52_checkbox_sign');koe_52_text.addEventListener('keydown',function(e){e=e||window.event;if(e.keyCode===13){koe_52_search()}});var koe_52_replys=new Array();var koe_52_reg=null;function koe_52_search(){koe_52_reg=new RegExp('('+koe_52_text.value.replace(',','|')+')','g');koe_52_replys_ul.innerHTML='';koe_52_replys.forEach(function(item){if((koe_52_reg.test(item.uname)&&koe_52_checkbox_uname.checked)||(koe_52_reg.test(item.message)&&koe_52_checkbox_message.checked)||(koe_52_reg.test(item.sign)&&koe_52_checkbox_sign.checked)){var koe_52_li=document.createElement('li');koe_52_li.innerHTML=''+koe_52_highlight(item.uname)+'

    '+koe_52_highlight(item.message)+'

    ';koe_52_li.addEventListener('click',function(){window.open('https://www.bilibili.com/video/'+__INITIAL_STATE__.bvid+'#reply'+item.rpid)});koe_52_replys_ul.appendChild(koe_52_li)}})}function koe_52_highlight(str){if(koe_52_reg===null)return str;return str.replace(koe_52_reg,'$1')}function koe_52_getReply(page){var url='https://api.bilibili.com/x/v2/reply?jsonp=jsonp&type=1&sort=2&ps=40&pn='+page+'&oid='+__INITIAL_STATE__.videoData.aid;var xhr=new XMLHttpRequest();xhr.open('GET',url,true);xhr.withCredentials=true;xhr.send();xhr.onreadystatechange=function(){if(xhr.readyState===4&&xhr.status===200){var json=JSON.parse(xhr.responseText);if(json.data.replies===null){return}json.data.replies.forEach(function(item){koe_52_replys.push({rpid:item.rpid,message:item.content.message,avatar:item.member.avatar,uname:item.member.uname,sign:item.member.sign,})});if(page*40<=json.data.page.count){var progress=parseInt(((page*40)/json.data.page.count)*100);koe_52_progress_p.innerText=progress+'%';koe_52_progress_span.style.width=progress+'%';koe_52_getReply(++page)}else{koe_52_progress_p.innerText='100%';koe_52_progress_span.style.width='100%';koe_52_text.style.opacity=1;setTimeout(function(){console.log(koe_52_text);koe_52_text.focus();koe_52_progress.style.display='none'},500)}}}}koe_52_getReply(1)}else{if(koe_52_is_show){koe_52_box.style.display='none';koe_52_is_show=false}else{koe_52_box.style.display='block';koe_52_is_show=true}};void(0);/*{"name":"搜索评论"}*/ -------------------------------------------------------------------------------- /code/js-53.js: -------------------------------------------------------------------------------- 1 | if (typeof koe_53_style === 'undefined') { 2 | var koe_53_style = document.createElement('style'); 3 | koe_53_style.innerText = ` 4 | .koe_53_iframe_box_1, 5 | .koe_53_iframe_box_2 { 6 | position: fixed; 7 | top: 50%; 8 | left: 50%; 9 | width: 50%; 10 | height: 50%; 11 | overflow: hidden; 12 | z-index: 9999999; 13 | } 14 | 15 | .koe_53_iframe_box_1 { 16 | -webkit-transform: translate(-100%,-50%); 17 | -moz-transform: translate(-100%,-50%); 18 | transform:translate(-100%,-50%); 19 | } 20 | 21 | .koe_53_iframe_box_2 { 22 | -webkit-transform: translate(0,-50%); 23 | -moz-transform: translate(0,-50%); 24 | transform:translate(0,-50%); 25 | } 26 | 27 | .koe_53_iframe_1, 28 | .koe_53_iframe_2 { 29 | width: 100%; 30 | height: 100%; 31 | } 32 | `; 33 | 34 | document.head.appendChild(koe_53_style); 35 | 36 | var koe_53_iframe_box_1 = document.createElement('div'); 37 | var koe_53_iframe_box_2 = document.createElement('div'); 38 | 39 | koe_53_iframe_box_1.setAttribute('class', 'koe_53_iframe_box_1'); 40 | koe_53_iframe_box_2.setAttribute('class', 'koe_53_iframe_box_2'); 41 | 42 | var koe_53_audio = document.createElement('audio'); 43 | koe_53_audio.src = 44 | 'https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLXNuaTJjNlQzVFk2aHBtWnc=.mp3'; 45 | koe_53_audio.setAttribute('autoplay', ''); 46 | koe_53_audio.addEventListener('canplaythrough', function () { 47 | koe_53_create_iframe(); 48 | setInterval(function () { 49 | koe_53_create_iframe(); 50 | }, 3350); 51 | }); 52 | document.body.appendChild(koe_53_audio); 53 | 54 | function koe_53_create_iframe() { 55 | koe_53_scale(1, 0); 56 | 57 | koe_53_iframe_box_2.style.width = '50%'; 58 | koe_53_iframe_box_2.style.height = '50%'; 59 | 60 | var koe_53_iframe_1 = document.createElement('iframe'); 61 | var koe_53_iframe_2 = document.createElement('iframe'); 62 | 63 | koe_53_iframe_1.setAttribute('class', 'koe_53_iframe_1'); 64 | koe_53_iframe_2.setAttribute('class', 'koe_53_iframe_2'); 65 | 66 | koe_53_iframe_1.src = window.location.href; 67 | koe_53_iframe_2.src = window.location.href; 68 | 69 | koe_53_iframe_1.onload = function () { 70 | koe_53_iframe_1.contentDocument.documentElement 71 | .querySelector('body') 72 | .setAttribute('style', 'zoom: 0.5'); 73 | }; 74 | 75 | koe_53_iframe_2.onload = function () { 76 | koe_53_iframe_2.contentDocument.documentElement 77 | .querySelector('body') 78 | .setAttribute('style', 'zoom: 0.5'); 79 | }; 80 | 81 | koe_53_iframe_box_1.appendChild(koe_53_iframe_1); 82 | koe_53_iframe_box_2.appendChild(koe_53_iframe_2); 83 | 84 | document.body.appendChild(koe_53_iframe_box_1); 85 | document.body.appendChild(koe_53_iframe_box_2); 86 | 87 | setTimeout('koe_53_scale(1.1, -25)', 300); 88 | setTimeout('koe_53_scale(1.2, -50)', 700); 89 | 90 | setTimeout(function () { 91 | var cale = 50; 92 | var i_cale = 0.5; 93 | var koe_53_timer_2 = setInterval(function () { 94 | i_cale += 0.05; 95 | cale += 2; 96 | if (i_cale <= 1) { 97 | if ( 98 | koe_53_iframe_2.contentDocument && 99 | koe_53_iframe_2.contentDocument.documentElement 100 | ) 101 | koe_53_iframe_2.contentDocument.documentElement 102 | .querySelector('body') 103 | .setAttribute('style', 'zoom: ' + i_cale); 104 | } 105 | 106 | koe_53_iframe_box_2.style.width = cale + '%'; 107 | koe_53_iframe_box_2.style.height = cale + '%'; 108 | if (cale >= 85) { 109 | koe_53_scale(1, 0); 110 | koe_53_iframe_1.remove(); 111 | koe_53_iframe_2.remove(); 112 | clearInterval(koe_53_timer_2); 113 | } 114 | }, 50); 115 | }, 1300); 116 | } 117 | 118 | function koe_53_scale(cale, translate) { 119 | koe_53_iframe_box_2.setAttribute( 120 | 'style', 121 | '-webkit-transform:translate(' + 122 | translate + 123 | '%,-50%);-moz-transform:translate(' + 124 | translate + 125 | '%,-50%);transform:translate(' + 126 | translate + 127 | '%,-50%)' 128 | ); 129 | document.body.setAttribute( 130 | 'style', 131 | 'transform:scale(' + 132 | cale + 133 | '); -webkit-transform:scale(' + 134 | cale + 135 | '); -moz-transform:scale(' + 136 | cale + 137 | ');' 138 | ); 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /code/js-53.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_53_style==='undefined'){var koe_53_style=document.createElement('style');koe_53_style.innerText=`.koe_53_iframe_box_1,.koe_53_iframe_box_2{position:fixed;top:50%;left:50%;width:50%;height:50%;overflow:hidden;z-index:9999999}.koe_53_iframe_box_1{-webkit-transform:translate(-100%,-50%);-moz-transform:translate(-100%,-50%);transform:translate(-100%,-50%)}.koe_53_iframe_box_2{-webkit-transform:translate(0,-50%);-moz-transform:translate(0,-50%);transform:translate(0,-50%)}.koe_53_iframe_1,.koe_53_iframe_2{width:100%;height:100%}`;document.head.appendChild(koe_53_style);var koe_53_iframe_box_1=document.createElement('div');var koe_53_iframe_box_2=document.createElement('div');koe_53_iframe_box_1.setAttribute('class','koe_53_iframe_box_1');koe_53_iframe_box_2.setAttribute('class','koe_53_iframe_box_2');var koe_53_audio=document.createElement('audio');koe_53_audio.src='https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcDVHUVdqS1ViZm5nLXNuaTJjNlQzVFk2aHBtWnc=.mp3';koe_53_audio.setAttribute('autoplay','');koe_53_audio.addEventListener('canplaythrough',function(){koe_53_create_iframe();setInterval(function(){koe_53_create_iframe()},3350)});document.body.appendChild(koe_53_audio);function koe_53_create_iframe(){koe_53_scale(1,0);koe_53_iframe_box_2.style.width='50%';koe_53_iframe_box_2.style.height='50%';var koe_53_iframe_1=document.createElement('iframe');var koe_53_iframe_2=document.createElement('iframe');koe_53_iframe_1.setAttribute('class','koe_53_iframe_1');koe_53_iframe_2.setAttribute('class','koe_53_iframe_2');koe_53_iframe_1.src=window.location.href;koe_53_iframe_2.src=window.location.href;koe_53_iframe_1.onload=function(){koe_53_iframe_1.contentDocument.documentElement.querySelector('body').setAttribute('style','zoom: 0.5')};koe_53_iframe_2.onload=function(){koe_53_iframe_2.contentDocument.documentElement.querySelector('body').setAttribute('style','zoom: 0.5')};koe_53_iframe_box_1.appendChild(koe_53_iframe_1);koe_53_iframe_box_2.appendChild(koe_53_iframe_2);document.body.appendChild(koe_53_iframe_box_1);document.body.appendChild(koe_53_iframe_box_2);setTimeout('koe_53_scale(1.1, -25)',300);setTimeout('koe_53_scale(1.2, -50)',700);setTimeout(function(){var cale=50;var i_cale=0.5;var koe_53_timer_2=setInterval(function(){i_cale+=0.05;cale+=2;if(i_cale<=1){if(koe_53_iframe_2.contentDocument&&koe_53_iframe_2.contentDocument.documentElement)koe_53_iframe_2.contentDocument.documentElement.querySelector('body').setAttribute('style','zoom: '+i_cale)}koe_53_iframe_box_2.style.width=cale+'%';koe_53_iframe_box_2.style.height=cale+'%';if(cale>=85){koe_53_scale(1,0);koe_53_iframe_1.remove();koe_53_iframe_2.remove();clearInterval(koe_53_timer_2)}},50)},1300)}function koe_53_scale(cale,translate){koe_53_iframe_box_2.setAttribute('style','-webkit-transform:translate('+translate+'%,-50%);-moz-transform:translate('+translate+'%,-50%);transform:translate('+translate+'%,-50%)');document.body.setAttribute('style','transform:scale('+cale+'); -webkit-transform:scale('+cale+'); -moz-transform:scale('+cale+');')}};void(0);/*{"name":"禁止套娃"}*/ -------------------------------------------------------------------------------- /code/js-54.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | if(!/member\.bilibili\.com/.test(window.location.href)) { 3 | alert('需要在 member.bilibili.com 域名下使用,点击确认后自动打开,如果未能打开请手动打开'); 4 | window.open('https://member.bilibili.com'); 5 | return; 6 | } 7 | var view_list = document.querySelector('#viewBox .list'); 8 | if (view_list === null) { 9 | // 显示 10 | var view_box = document.createElement('div'); 11 | view_box.setAttribute('id', 'viewBox'); 12 | view_box.setAttribute( 13 | 'style', 14 | 'position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow-y: auto; z-index: 100000' 15 | ); 16 | view_list = document.createElement('ul'); 17 | view_list.setAttribute('class', 'list'); 18 | var otherInfo = document.createElement('div'); 19 | otherInfo.setAttribute('class', 'otherInfo'); 20 | var view_background = document.createElement('div'); 21 | view_background.setAttribute('id', 'viewBackground'); 22 | view_background.setAttribute( 23 | 'style', 24 | 'position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; opacity: 0.75; z-index: 10000' 25 | ); 26 | view_box.appendChild(view_list); 27 | document.body.appendChild(view_box); 28 | document.body.appendChild(otherInfo); 29 | document.body.appendChild(view_background); 30 | 31 | var style = document.createElement('style'); 32 | style.innerText = 33 | '.list { position: absolute; top: 20px; left: 0; } .list li { height: 40px; list-style: none; color: #FFF; font-size: 30px; font-weight: 700; } .otherInfo { position: fixed; top: 0; right: 0; width: 300px; font-size: 26px; color: #FFF; z-index: 100000; display: none; } .otherInfo img { width: 30px; height: 30px; border-radius: 100%; } .otherInfo a { text-decoration: none; color: #999 }'; 34 | document.head.appendChild(style); 35 | } else { 36 | var view_box = document.querySelector('#viewBox'); 37 | var view_background = document.querySelector('#viewBackground'); 38 | 39 | if (view_box.style.display !== 'none') { 40 | view_box.style.display = 'none'; 41 | view_background.style.display = 'none'; 42 | return; 43 | } else { 44 | view_list.innerHTML = ''; 45 | view_box.style.display = 'block'; 46 | view_background.style.display = 'block'; 47 | } 48 | } 49 | 50 | var page = 1; 51 | var noface = 0; 52 | var noname = 0; 53 | var last = ''; 54 | var showText = []; 55 | 56 | setInterval(function () { 57 | if (showText.length > 0) { 58 | addListItem(showText[0]); 59 | showText.shift(); 60 | if (showText.length === 0) { 61 | otherInfo.style.display = 'block'; 62 | } 63 | view_box.scrollTop = view_list.clientHeight; 64 | } 65 | }, 100); 66 | 67 | addListItem('运行开始,每页为 20 人'); 68 | 69 | function addListItem(text) { 70 | var li = document.createElement('li'); 71 | li.innerText = text; 72 | view_list.appendChild(li); 73 | } 74 | 75 | function request(last_id) { 76 | last = last_id; 77 | var xhr = new XMLHttpRequest(); 78 | xhr.open( 79 | 'GET', 80 | 'https://member.bilibili.com/x/h5/data/fan/list?ps=500&last_id=' + 81 | (last_id !== undefined ? last_id : ''), 82 | true 83 | ); 84 | xhr.withCredentials = true; 85 | xhr.send(); 86 | xhr.onreadystatechange = function () { 87 | if (xhr.readyState === 4 && xhr.status === 200) { 88 | var json = JSON.parse(xhr.responseText); 89 | console.log(json); 90 | 91 | if (json.code !== 0) { 92 | request(last); 93 | return; 94 | } 95 | 96 | var isEnd = false; 97 | 98 | if (json.data.result.length === 500) { 99 | setTimeout(function () { 100 | request(json.data.result[json.data.result.length - 1].mtime_id); 101 | }, 1000); 102 | } else { 103 | isEnd = true; 104 | } 105 | 106 | var curNoface = 0; 107 | var curNoname = 0; 108 | json.data.result.forEach(function (item, index) { 109 | if (/noface\.jpg$/.test(item.card.face)) { 110 | ++noface; 111 | ++curNoface; 112 | } 113 | if (/^(bili_(\d+)|(\d+)_bili)$/.test(item.card.name)) { 114 | ++noname; 115 | ++curNoname; 116 | } 117 | 118 | if ( 119 | (index + 1) % (20) === 0 || 120 | (index + 1 === json.data.result.length && (index + 1) % (20) >= 0) 121 | ) { 122 | showText.push( 123 | '第' + 124 | page + 125 | '页:未设置头像 ' + 126 | curNoface + 127 | ' 人;未设置昵称 ' + 128 | curNoname + 129 | ' 人' 130 | ); 131 | curNoface = 0; 132 | curNoname = 0; 133 | ++page; 134 | } 135 | 136 | if (isEnd) { 137 | otherInfo.innerHTML = 138 | '你的第一位粉丝:
    ' + 143 | item.card.name + 144 | '
    于 ' + 145 | item.mtime + 146 | ' 关注了你'; 147 | } 148 | }); 149 | 150 | // request(++page) 151 | } else { 152 | if (xhr.readyState !== 4) return; 153 | request(last); 154 | } 155 | }; 156 | } 157 | 158 | request(); 159 | })(); 160 | -------------------------------------------------------------------------------- /code/js-54.min.js: -------------------------------------------------------------------------------- 1 | (function(){if(!/member\.bilibili\.com/.test(window.location.href)){alert('需要在 member.bilibili.com 域名下使用,点击确认后自动打开,如果未能打开请手动打开');window.open('https://member.bilibili.com');return}var view_list=document.querySelector('#viewBox .list');if(view_list===null){var view_box=document.createElement('div');view_box.setAttribute('id','viewBox');view_box.setAttribute('style','position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow-y: auto; z-index: 100000');view_list=document.createElement('ul');view_list.setAttribute('class','list');var otherInfo=document.createElement('div');otherInfo.setAttribute('class','otherInfo');var view_background=document.createElement('div');view_background.setAttribute('id','viewBackground');view_background.setAttribute('style','position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; opacity: 0.75; z-index: 10000');view_box.appendChild(view_list);document.body.appendChild(view_box);document.body.appendChild(otherInfo);document.body.appendChild(view_background);var style=document.createElement('style');style.innerText='.list { position: absolute; top: 20px; left: 0; } .list li { height: 40px; list-style: none; color: #FFF; font-size: 30px; font-weight: 700; } .otherInfo { position: fixed; top: 0; right: 0; width: 300px; font-size: 26px; color: #FFF; z-index: 100000; display: none; } .otherInfo img { width: 30px; height: 30px; border-radius: 100%; } .otherInfo a { text-decoration: none; color: #999 }';document.head.appendChild(style)}else{var view_box=document.querySelector('#viewBox');var view_background=document.querySelector('#viewBackground');if(view_box.style.display!=='none'){view_box.style.display='none';view_background.style.display='none';return}else{view_list.innerHTML='';view_box.style.display='block';view_background.style.display='block'}}var page=1;var noface=0;var noname=0;var last='';var showText=[];setInterval(function(){if(showText.length>0){addListItem(showText[0]);showText.shift();if(showText.length===0){otherInfo.style.display='block'}view_box.scrollTop=view_list.clientHeight}},100);addListItem('运行开始,每页为 20 人');function addListItem(text){var li=document.createElement('li');li.innerText=text;view_list.appendChild(li)}function request(last_id){last=last_id;var xhr=new XMLHttpRequest();xhr.open('GET','https://member.bilibili.com/x/h5/data/fan/list?ps=500&last_id='+(last_id!==undefined?last_id:''),true);xhr.withCredentials=true;xhr.send();xhr.onreadystatechange=function(){if(xhr.readyState===4&&xhr.status===200){var json=JSON.parse(xhr.responseText);console.log(json);if(json.code!==0){request(last);return}var isEnd=false;if(json.data.result.length===500){setTimeout(function(){request(json.data.result[json.data.result.length-1].mtime_id)},1000)}else{isEnd=true}var curNoface=0;var curNoname=0;json.data.result.forEach(function(item,index){if(/noface\.jpg$/.test(item.card.face)){++noface;++curNoface}if(/^(bili_(\d+)|(\d+)_bili)$/.test(item.card.name)){++noname;++curNoname}if((index+1)%(20)===0||(index+1===json.data.result.length&&(index+1)%(20)>=0)){showText.push('第'+page+'页:未设置头像 '+curNoface+' 人;未设置昵称 '+curNoname+' 人');curNoface=0;curNoname=0;++page}if(isEnd){otherInfo.innerHTML='你的第一位粉丝:
    '+item.card.name+'
    于 '+item.mtime+' 关注了你'}})}else{if(xhr.readyState!==4)return;request(last)}}}request()})();void(0);/*{"name":"统计未改名粉丝"}*/ -------------------------------------------------------------------------------- /code/js-55.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | // 已获取的评论 ID 3 | var rpids = []; 4 | var options = {}; 5 | 6 | var box = document.querySelector('#bnj2021'); 7 | var list = document.querySelector('.bnj2021-list'); 8 | 9 | if (box === null) { 10 | var style = document.createElement('style'); 11 | style.innerText = 12 | '#bnj2021 { position: fixed; top: 0; left: 0; z-index: 9999999; } .bnj2021-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.75; background-color: #000; z-index: -1; } .bnj2021-list { list-style: none; } .bnj2021-list li { color: #FFF; font-size: 30px; } '; 13 | document.head.appendChild(style); 14 | 15 | box = document.createElement('div'); 16 | box.setAttribute('id', 'bnj2021'); 17 | 18 | var bg = document.createElement('div'); 19 | bg.setAttribute('class', 'bnj2021-bg'); 20 | 21 | list = document.createElement('ul'); 22 | list.setAttribute('class', 'bnj2021-list'); 23 | list.innerHTML = '
  • 已开启
  • '; 24 | 25 | box.appendChild(bg); 26 | box.appendChild(list); 27 | 28 | document.body.appendChild(box); 29 | 30 | setInterval(function () { 31 | request(); 32 | }, 10000); 33 | } 34 | 35 | function view() { 36 | list.innerHTML = '
  • 已开启
  • '; 37 | Object.keys(options).forEach(function (key) { 38 | var li = document.createElement('li'); 39 | li.innerHTML = 40 | '第' + 41 | key + 42 | '题预测:A: ' + 43 | options[key].A + 44 | ', B: ' + 45 | options[key].B + 46 | ', C: ' + 47 | options[key].C + 48 | ', D: ' + 49 | options[key].D; 50 | list.appendChild(li); 51 | }); 52 | } 53 | 54 | function request() { 55 | var xhr = new XMLHttpRequest(); 56 | xhr.open( 57 | 'GET', 58 | 'https://api.bilibili.com/x/v2/reply?jsonp=jsonp&type=1&oid=373561162&sort=0&ps=30&pn=1', 59 | true 60 | ); 61 | xhr.withCredentials = true; 62 | xhr.send(); 63 | xhr.onreadystatechange = function () { 64 | if (xhr.readyState === 4 && xhr.status === 200) { 65 | var json = JSON.parse(xhr.responseText); 66 | json.data.replies.forEach(function (item, index) { 67 | if (rpids.indexOf(item.rpid) === -1) { 68 | var reg = /第?(一|二|三|四|五|六|七|八|九|十|0-9)题([^abcdABCD])(a|b|c|d|A|B|C|D)/.exec( 69 | item.content.message 70 | ); 71 | console.log(reg); 72 | if (reg !== null) { 73 | var number = 0; 74 | switch (reg[1]) { 75 | case '一': 76 | number = 1; 77 | break; 78 | case '二': 79 | number = 2; 80 | break; 81 | case '三': 82 | number = 3; 83 | break; 84 | case '四': 85 | number = 4; 86 | break; 87 | case '五': 88 | number = 5; 89 | break; 90 | case '六': 91 | number = 6; 92 | break; 93 | case '七': 94 | number = 7; 95 | break; 96 | case '八': 97 | number = 8; 98 | break; 99 | case '九': 100 | number = 9; 101 | break; 102 | case '十': 103 | number = 10; 104 | break; 105 | } 106 | 107 | if (typeof options[number] === 'undefined') { 108 | options[number] = { 109 | A: 0, 110 | B: 0, 111 | C: 0, 112 | D: 0 113 | }; 114 | } 115 | 116 | var opt = reg[3].toUpperCase(); 117 | options[number][opt] += 1; 118 | } 119 | rpids.push(item.rpid); 120 | } 121 | }); 122 | console.log(options); 123 | view(); 124 | } 125 | }; 126 | } 127 | })(); 128 | void 0; 129 | -------------------------------------------------------------------------------- /code/js-55.min.js: -------------------------------------------------------------------------------- 1 | (function(){var rpids=[];var options={};var box=document.querySelector('#bnj2021');var list=document.querySelector('.bnj2021-list');if(box===null){var style=document.createElement('style');style.innerText='#bnj2021 { position: fixed; top: 0; left: 0; z-index: 9999999; } .bnj2021-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.75; background-color: #000; z-index: -1; } .bnj2021-list { list-style: none; } .bnj2021-list li { color: #FFF; font-size: 30px; } ';document.head.appendChild(style);box=document.createElement('div');box.setAttribute('id','bnj2021');var bg=document.createElement('div');bg.setAttribute('class','bnj2021-bg');list=document.createElement('ul');list.setAttribute('class','bnj2021-list');list.innerHTML='
  • 已开启
  • ';box.appendChild(bg);box.appendChild(list);document.body.appendChild(box);setInterval(function(){request()},10000)}function view(){list.innerHTML='
  • 已开启
  • ';Object.keys(options).forEach(function(key){var li=document.createElement('li');li.innerHTML='第'+key+'题预测:A: '+options[key].A+', B: '+options[key].B+', C: '+options[key].C+', D: '+options[key].D;list.appendChild(li)})}function request(){var xhr=new XMLHttpRequest();xhr.open('GET','https://api.bilibili.com/x/v2/reply?jsonp=jsonp&type=1&oid=373561162&sort=0&ps=30&pn=1',true);xhr.withCredentials=true;xhr.send();xhr.onreadystatechange=function(){if(xhr.readyState===4&&xhr.status===200){var json=JSON.parse(xhr.responseText);json.data.replies.forEach(function(item,index){if(rpids.indexOf(item.rpid)===-1){var reg=/第?(一|二|三|四|五|六|七|八|九|十|0-9)题([^abcdABCD])(a|b|c|d|A|B|C|D)/.exec(item.content.message);if(reg!==null){var number=0;switch(reg[1]){case'一':number=1;break;case'二':number=2;break;case'三':number=3;break;case'四':number=4;break;case'五':number=5;break;case'六':number=6;break;case'七':number=7;break;case'八':number=8;break;case'九':number=9;break;case'十':number=10;break}if(typeof options[number]==='undefined'){options[number]={A:0,B:0,C:0,D:0}}var opt=reg[3].toUpperCase();options[number][opt]+=1}rpids.push(item.rpid)}});console.log(options);view()}}}})();void(0);/*{"name":"2021拜年纪答题预测"}*/ -------------------------------------------------------------------------------- /code/js-56.js: -------------------------------------------------------------------------------- 1 | // if (document.querySelector('#find-li-tang-style')) { 2 | // document.querySelector('#find-li-tang-style').remove() 3 | // } 4 | 5 | // if (document.querySelector('.find-li-tang-container')) { 6 | // document.querySelector('.find-li-tang-container').remove() 7 | // } 8 | 9 | // var findLiTang = undefined 10 | if (typeof findLiTang === 'undefined') { 11 | var findLiTang = { 12 | style: document.createElement('style'), 13 | container: document.createElement('div'), 14 | ul: document.createElement('ul'), 15 | index: 0, 16 | // 当前视频UP主(每次查询不同UP主,概率会大点) 17 | currentOwner: 0, 18 | // 最匹配的 bvid 19 | bvids: [], 20 | // 查找过的 bvid 21 | found: [], 22 | // 是否取消 23 | pause: false 24 | }; 25 | 26 | // style 27 | findLiTang.style.setAttribute('id', 'find-li-tang-style'); 28 | 29 | findLiTang.style.innerText = ` 30 | .find-li-tang-container { 31 | position: fixed; 32 | top: 0; 33 | left: 0; 34 | width: 100%; 35 | height: 100%; 36 | display: flex; 37 | justify-content: center; 38 | align-items: center; 39 | background-color: rgba(0, 0, 0, 0.8); 40 | z-index: 9999999; 41 | } 42 | 43 | .find-li-tang-container ul { 44 | padding: 20px; 45 | width: 80%; 46 | height: 100%; 47 | overflow-y: auto; 48 | box-sizing: border-box; 49 | } 50 | 51 | .find-li-tang-container ul li { 52 | margin: 0 0 30px 35px; 53 | width: 180px; 54 | height: 180px; 55 | display: flex; 56 | justify-content: center; 57 | align-items: center; 58 | float: left; 59 | } 60 | 61 | .find-li-tang-container ul li a { 62 | width: 180px; 63 | height: 180px; 64 | padding: 10px; 65 | display: flex; 66 | flex-direction: column; 67 | justify-content: center; 68 | align-items: center; 69 | border-radius: 5px; 70 | background-color: rgba(150, 150, 150, 0.5); 71 | } 72 | 73 | .find-li-tang-container ul li .index { 74 | font-size: 18px; 75 | font-weight: 700; 76 | color: #fff; 77 | text-align: center; 78 | } 79 | 80 | .find-li-tang-container ul li .image { 81 | width: 180px; 82 | height: 112px; 83 | display: flex; 84 | justify-content: center; 85 | align-items: center; 86 | overflow: hidden; 87 | } 88 | 89 | .find-li-tang-container ul li img { 90 | margin-top: 10px; 91 | width: 180px; 92 | } 93 | 94 | .find-li-tang-container ul li .title { 95 | margin-top: 10px; 96 | width: 100%; 97 | overflow: hidden; 98 | text-overflow: ellipsis; 99 | white-space: nowrap; 100 | color: #fff; 101 | } 102 | `; 103 | 104 | document.head.appendChild(findLiTang.style); 105 | 106 | // 主体 107 | findLiTang.container.setAttribute('class', 'find-li-tang-container'); 108 | 109 | findLiTang.container.appendChild(findLiTang.ul); 110 | document.body.appendChild(findLiTang.container); 111 | 112 | findLiTang.request = function(url, withCredentials = false) { 113 | return new Promise(function(resolve) { 114 | // 发送请求 115 | var xhr = new XMLHttpRequest(); 116 | xhr.open('GET', url, true); 117 | xhr.withCredentials = withCredentials; 118 | xhr.send(); 119 | xhr.onreadystatechange = function () { 120 | if (xhr.readyState === 4 && xhr.status === 200) { 121 | resolve(JSON.parse(xhr.responseText)) 122 | } 123 | } 124 | }) 125 | }; 126 | 127 | findLiTang.doFind = function(bvid) { 128 | findLiTang.request(`https://api.bilibili.com/x/web-interface/view/detail?bvid=${bvid}`, true).then(function(res) { 129 | if (!res.data || !res.data.Related) { 130 | return 131 | } 132 | 133 | let maxPoint = -1; 134 | let video; 135 | 136 | for (let i = 0; i < res.data.Related.length; i++) { 137 | const bvid = res.data.Related[i].bvid; 138 | 139 | // 如果发现匹配视频 寻找结束 140 | if (~findLiTang.bvids.indexOf(bvid)) { 141 | findLiTang.addItem(res.data.Related[i]); 142 | return 143 | }; 144 | 145 | // 已查找过的视频 146 | if (~findLiTang.found.indexOf(bvid)) continue; 147 | 148 | // 排除两次相同UP 149 | if ( 150 | findLiTang.currentOwner !== 0 || 151 | findLiTang.currentOwner === res.data.Related[i].owner.mid 152 | ) { 153 | continue 154 | } 155 | 156 | const title = res.data.Related[i].title.replace(/^\s+|\s+$/g, ''); 157 | const desc = res.data.Related[i].desc.replace(/^\s+|\s+$/g, ''); 158 | // 视频分类 159 | const tname = res.data.Related[i].tname; 160 | 161 | // 分数 162 | let point = 0; 163 | // 评判标准 164 | 165 | // 整活类、玩梗类视频 +1 166 | ;[ 167 | '梗', 168 | '整活', 169 | '土味', 170 | '大佐', 171 | '篮子', 172 | '华强', 173 | '买瓜', 174 | '萨日朗', 175 | '鸡你太美', 176 | '年纪轻轻', 177 | '野兽先辈', 178 | '24岁', 179 | '哼哼啊', 180 | '昏睡红茶' 181 | ].forEach(function(keyword) { 182 | if (~title.indexOf(keyword)) point += 1; 183 | if (~desc.indexOf(keyword)) point += 1; 184 | }) 185 | 186 | // 相关视频 +5 187 | ;[ 188 | '央视', 189 | '刀哥', 190 | '刀酱', 191 | '好果子', 192 | '好果汁', 193 | '虎哥', 194 | '我徒弟呢', 195 | '这一脚', 196 | '踢出', 197 | '整个夏天' 198 | ].forEach(function(keyword) { 199 | if (~title.indexOf(keyword)) point += 5; 200 | if (~desc.indexOf(keyword)) point += 5; 201 | }); 202 | 203 | // 精准视频 +5 204 | ;[ 205 | ('赵三金', '理塘', '太美丽了', '还是看一下', '丽丽', '丁真', '顶针', '最高城', '速通', '哎呀', '皮痒') 206 | ].forEach(function(keyword) { 207 | if (~title.indexOf(keyword)) point += 10; 208 | if (~desc.indexOf(keyword)) point += 10; 209 | }); 210 | 211 | // 视频分类 + 20 212 | if (~['搞笑'].indexOf(tname)) { 213 | point += 20 214 | }; 215 | 216 | // 扣分关键词 217 | ;[ 218 | '女朋友', 219 | '女生', 220 | '男朋友', 221 | '男生', 222 | '声控', 223 | '相亲', 224 | '结婚', 225 | '彩礼', 226 | '怀孕', 227 | '孕', 228 | '指甲', 229 | '痛风', 230 | '朱一旦', 231 | '小姐姐', 232 | '老婆', 233 | '老公', 234 | '王雷' 235 | ].forEach(function(keyword) { 236 | if (~title.indexOf(keyword)) point -= 5; 237 | if (~desc.indexOf(keyword)) point -= 5; 238 | }); 239 | 240 | if (point > maxPoint) { 241 | maxPoint = point; 242 | video = res.data.Related[i]; 243 | }; 244 | } 245 | 246 | findLiTang.found.push(video.bvid); 247 | findLiTang.addItem(video); 248 | 249 | // 滚动条滚动到最底下 250 | findLiTang.ul.scrollTop = findLiTang.ul.scrollHeight; 251 | 252 | // 暂停寻找 253 | if (findLiTang.pause) return; 254 | 255 | // 否则继续下次请求 256 | findLiTang.doFind(video.bvid) 257 | }) 258 | }; 259 | 260 | findLiTang.addItem = function(item) { 261 | const itemContainer = document.createElement('li'); 262 | itemContainer.innerHTML = ` 263 | 264 |

    步数 ${++findLiTang.index}

    265 |
    266 |

    ${item.title}

    267 |
    268 | `; 269 | 270 | findLiTang.ul.appendChild(itemContainer) 271 | }; 272 | 273 | // 获取目标视频合集 274 | findLiTang.request('https://bili.imba97.cn/litang/videos.php').then(function(res) { 275 | findLiTang.bvids = res.bvids; 276 | // 开始查找 277 | findLiTang.doFind(window.__INITIAL_STATE__.bvid) 278 | }) 279 | } else { 280 | // 是否是取消状态 281 | if (findLiTang.pause) { 282 | // 是取消状态 则继续查找已查找视频的最后一个 283 | findLiTang.doFind(findLiTang.found[findLiTang.found.length - 1]) 284 | } 285 | 286 | // 反向状态 287 | findLiTang.pause = !findLiTang.pause 288 | }; 289 | 290 | void(0) 291 | -------------------------------------------------------------------------------- /code/js-56.min.js: -------------------------------------------------------------------------------- 1 | if(typeof findLiTang==='undefined'){var findLiTang={style:document.createElement('style'),container:document.createElement('div'),ul:document.createElement('ul'),index:0,currentOwner:0,bvids:[],found:[],pause:false};findLiTang.style.setAttribute('id','find-li-tang-style');findLiTang.style.innerText=`.find-li-tang-container{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.8);z-index:9999999}.find-li-tang-container ul{padding:20px;width:80%;height:100%;overflow-y:auto;box-sizing:border-box}.find-li-tang-container ul li{margin:0 0 30px 35px;width:180px;height:180px;display:flex;justify-content:center;align-items:center;float:left}.find-li-tang-container ul li a{width:180px;height:180px;padding:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:5px;background-color:rgba(150,150,150,0.5)}.find-li-tang-container ul li .index{font-size:18px;font-weight:700;color:#fff;text-align:center}.find-li-tang-container ul li .image{width:180px;height:112px;display:flex;justify-content:center;align-items:center;overflow:hidden}.find-li-tang-container ul li img{margin-top:10px;width:180px}.find-li-tang-container ul li .title{margin-top:10px;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff}`;document.head.appendChild(findLiTang.style);findLiTang.container.setAttribute('class','find-li-tang-container');findLiTang.container.appendChild(findLiTang.ul);document.body.appendChild(findLiTang.container);findLiTang.request=function(url,withCredentials=false){return new Promise(function(resolve){var xhr=new XMLHttpRequest();xhr.open('GET',url,true);xhr.withCredentials=withCredentials;xhr.send();xhr.onreadystatechange=function(){if(xhr.readyState===4&&xhr.status===200){resolve(JSON.parse(xhr.responseText))}}})};findLiTang.doFind=function(bvid){findLiTang.request(`https://api.bilibili.com/x/web-interface/view/detail?bvid=${bvid}`, true).then(function(res) {if(!res.data||!res.data.Related){return}let maxPoint=-1;let video;for(let i=0;imaxPoint){maxPoint=point;video=res.data.Related[i]}}findLiTang.found.push(video.bvid);findLiTang.addItem(video);findLiTang.ul.scrollTop=findLiTang.ul.scrollHeight;if(findLiTang.pause)return;findLiTang.doFind(video.bvid)})};findLiTang.addItem=function(item){const itemContainer=document.createElement('li');itemContainer.innerHTML=`

    步数${++findLiTang.index}

    ${item.title}

    `;findLiTang.ul.appendChild(itemContainer)};findLiTang.request('https://bili.imba97.cn/litang/videos.php').then(function(res){findLiTang.bvids=res.bvids;findLiTang.doFind(window.__INITIAL_STATE__.bvid)})}else{if(findLiTang.pause){findLiTang.doFind(findLiTang.found[findLiTang.found.length-1])}findLiTang.pause=!findLiTang.pause};void(0);/*{"name":"寻找最美理塘"}*/ -------------------------------------------------------------------------------- /code/js-57.js: -------------------------------------------------------------------------------- 1 | (function (w) { 2 | if (typeof w.continueClickTimer !== 'undefined') { 3 | clearInterval(w.continueClickTimer); 4 | w.continueClickTimer = undefined; 5 | console.log("关闭"); 6 | return; 7 | } 8 | 9 | console.log("开启"); 10 | w.continueClickTimer = setInterval(() => { 11 | w.ec.wait.continueWait() 12 | }, 10000); 13 | })(window); 14 | -------------------------------------------------------------------------------- /code/js-57.min.js: -------------------------------------------------------------------------------- 1 | (function(w){if(typeof w.continueClickTimer!=='undefined'){clearInterval(w.continueClickTimer);w.continueClickTimer=undefined;console.log("关闭");return}console.log("开启");w.continueClickTimer=setInterval(()=>{w.ec.wait.continueWait()},10000)})(window);/*{"name":"继续排队"}*/ -------------------------------------------------------------------------------- /code/js-6.js: -------------------------------------------------------------------------------- 1 | // 判断是否已经召唤懂王 2 | if (typeof koe_knowking_clicked === 'undefined') { 3 | // 设为 已召唤 4 | var koe_knowking_clicked = true 5 | // 判断获取选择文本函数是否已创建 6 | if (typeof koe_knowking_get_select_text === 'undefined') { 7 | // 没有则创建,用于获取选中的文本 8 | function koe_knowking_get_select_text() { 9 | var resultText = window.getSelection().toString() 10 | if (selecter != null && koe_knowking_trim(selecter) != '') { 11 | resultText = selecter 12 | } else if (typeof document.selection !== 'undefined') { 13 | var selecter = document.selection.createRange() 14 | var s = selecter.text 15 | if (s != null && functionkoe_knowking_trim(s) != '') { 16 | resultText = s 17 | } 18 | } 19 | return resultText 20 | } 21 | // 去除两端空格 22 | function koe_knowking_trim() { 23 | return this.replace(/(^\s*)|(\s*$)/g, '') 24 | } 25 | // 关闭窗口时停止播放 26 | window.addEventListener('beforeunload', function () { 27 | window.open('https://baidu.com') 28 | }) 29 | } 30 | // 把选中的文本赋值给变量 31 | var koe_knowking_selected_text = koe_knowking_get_select_text() 32 | // [if-0] 判断选中文本不能为空(如果选了空格,最后返回的就是空)并且不等于 null(如果啥都没选就是 null ) 33 | if ( 34 | koe_knowking_selected_text !== '' && 35 | document.querySelector('#koe_knowking_audio') === null 36 | ) { 37 | // 判断左上角提示有没有创建,没有的话创建,有的话设置显示 38 | if (typeof koe_knowking_msg === 'undefined') { 39 | var koe_knowking_msg = document.createElement('p') 40 | koe_knowking_msg.setAttribute( 41 | 'style', 42 | 'position:fixed;top:0;left:0;padding:5px 10px;height:30px !important;line-height:30px;text-align:center;background-color:#000;color:#FFF;font-size:26px;z-index:99999999' 43 | ) 44 | document.body.appendChild(koe_knowking_msg) 45 | } else { 46 | koe_knowking_msg.style.display = 'block' 47 | } 48 | // 设置提示文本 49 | koe_knowking_msg.innerText = '懂王祈祷中🙏' 50 | // 判断样式有没有创建 51 | if (typeof koe_knowking_style === 'undefined') { 52 | // 创建样式 53 | var koe_knowking_style = document.createElement('style') 54 | koe_knowking_style.innerText = 55 | '.koe_knowking_content,.koe_knowking_image_1,.koe_knowking_image_2{ position: fixed; left: 50%; transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); z-index: 99999999; display: none; } .koe_knowking_content { top: calc(50% + 200px); padding: 10px; font-size: 20px; color: #FFF; background-color: #000; } .koe_knowking_image_1,.koe_knowking_image_2{ top: 50%; height: 200px; }' 56 | document.head.appendChild(koe_knowking_style) 57 | // 创建懂王 content,用于显示文字 58 | var koe_knowking_content = document.createElement('div') 59 | koe_knowking_content.setAttribute('class', 'koe_knowking_content') 60 | document.body.appendChild(koe_knowking_content) 61 | // 创建两个图片,两个手开合的图 62 | var koe_knowking_image_1 = document.createElement('img') 63 | var koe_knowking_image_2 = document.createElement('img') 64 | koe_knowking_image_1.setAttribute( 65 | 'src', 66 | 'https://pic.downk.cc/item/5ed520b8c2a9a83be55a3848.png' 67 | ) 68 | koe_knowking_image_2.setAttribute( 69 | 'src', 70 | 'https://pic.downk.cc/item/5ed520b8c2a9a83be55a3843.png' 71 | ) 72 | koe_knowking_image_1.setAttribute('class', 'koe_knowking_image_1') 73 | koe_knowking_image_2.setAttribute('class', 'koe_knowking_image_2') 74 | document.body.appendChild(koe_knowking_image_1) 75 | document.body.appendChild(koe_knowking_image_2) 76 | // 设置计时器,用于切换两张图 77 | var koe_knowking_timer = null 78 | // 判断是否是第一张图片 79 | var koe_knowking_is_1 = true 80 | } 81 | // 创建网络请求,去查询词义 82 | var koe_knowking_xhr = new XMLHttpRequest() 83 | koe_knowking_xhr.open( 84 | 'GET', 85 | 'https://bili.imba97.cn/baike.php?kw=' + koe_knowking_selected_text, 86 | true 87 | ) 88 | koe_knowking_xhr.onreadystatechange = function () { 89 | if ( 90 | (koe_knowking_xhr.readyState == 4 && koe_knowking_xhr.status == 200) || 91 | koe_knowking_xhr.status == 304 92 | ) { 93 | // 转为 json 对象 94 | var json = JSON.parse(koe_knowking_xhr.responseText) 95 | // 调用百度文字转音频接口,默认是懂了个寂寞 96 | var au = '没有人比我更懂,懂了个寂寞' 97 | // 如果返回结果正确 98 | if (json.status === 1) { 99 | au = 100 | '没有人比我更懂' + koe_knowking_selected_text + ',' + json.content 101 | // 创建音频 102 | var audio = new SpeechSynthesisUtterance(au) 103 | speechSynthesis.speak(audio) 104 | 105 | // 让左上角的提示隐藏 106 | koe_knowking_msg.style.display = 'none' 107 | // 将内容显示 108 | koe_knowking_content.innerText = json.content 109 | koe_knowking_content.style.display = 'block' 110 | // 将图片 1 显示 111 | koe_knowking_image_1.style.display = 'block' 112 | // 设置计时器,每 0.3 秒切换图片显示 113 | koe_knowking_timer = setInterval(function () { 114 | if (koe_knowking_is_1) { 115 | koe_knowking_image_1.style.display = 'none' 116 | koe_knowking_image_2.style.display = 'block' 117 | } else { 118 | koe_knowking_image_1.style.display = 'block' 119 | koe_knowking_image_2.style.display = 'none' 120 | } 121 | koe_knowking_is_1 = !koe_knowking_is_1 122 | }, 300) 123 | 124 | audio.onend = function () { 125 | // 将懂王设置为 未召唤 126 | koe_knowking_clicked = undefined 127 | speechSynthesis.resume() 128 | // 隐藏词义内容、图片 129 | koe_knowking_content.style.display = 'none' 130 | koe_knowking_image_1.style.display = 'none' 131 | koe_knowking_image_2.style.display = 'none' 132 | // 重新设置 是否是第一张图片 为 true 133 | koe_knowking_is_1 = true 134 | // 清除计时器 135 | clearInterval(koe_knowking_timer) 136 | koe_knowking_timer = null 137 | } 138 | } else { 139 | // 如果获取返回内容失败 则让左上角提示 140 | koe_knowking_msg.innerText = json.content 141 | } 142 | } 143 | } 144 | // 发送请求 145 | koe_knowking_xhr.send() 146 | 147 | // [if-0] 没选中文本 则直接设置 懂王未召唤 148 | } else { 149 | koe_knowking_clicked = undefined 150 | } 151 | } 152 | void 0 153 | -------------------------------------------------------------------------------- /code/js-6.min.js: -------------------------------------------------------------------------------- 1 | if(typeof koe_knowking_clicked==='undefined'){var koe_knowking_clicked=true;if(typeof koe_knowking_get_select_text==='undefined'){function koe_knowking_get_select_text(){var resultText=window.getSelection().toString();if(selecter!=null&&koe_knowking_trim(selecter)!=""){resultText=selecter}else if(typeof document.selection!=='undefined'){var selecter=document.selection.createRange();var s=selecter.text;if(s!=null&&functionkoe_knowking_trim(s)!=""){resultText=s}}return resultText}function koe_knowking_trim(){return this.replace(/(^\s*)|(\s*$)/g,"")}}var koe_knowking_selected_text=koe_knowking_get_select_text();if(koe_knowking_selected_text!==''&&document.querySelector('#koe_knowking_audio')===null){if(typeof koe_knowking_msg==='undefined'){var koe_knowking_msg=document.createElement('p');koe_knowking_msg.setAttribute('style','position:fixed;top:0;left:0;padding:5px 10px;height:30px;line-height:30px;text-align:center;background-color:#000;color:#FFF;font-size:26px;z-index:99999999');document.body.appendChild(koe_knowking_msg)}else{koe_knowking_msg.style.display='block'}koe_knowking_msg.innerText='懂王祈祷中🙏';if(typeof koe_knowking_style==='undefined'){var koe_knowking_style=document.createElement('style');koe_knowking_style.innerText='.koe_knowking_content,.koe_knowking_image_1,.koe_knowking_image_2{ position: fixed; left: 50%; transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); z-index: 99999999; display: none; } .koe_knowking_content { top: calc(50% + 200px); padding: 10px; font-size: 20px; color: #FFF; background-color: #000; } .koe_knowking_image_1,.koe_knowking_image_2{ top: 50%; height: 200px; }';document.head.appendChild(koe_knowking_style);var koe_knowking_content=document.createElement('div');koe_knowking_content.setAttribute('class','koe_knowking_content');document.body.appendChild(koe_knowking_content);var koe_knowking_image_1=document.createElement('img');var koe_knowking_image_2=document.createElement('img');koe_knowking_image_1.setAttribute('src','https://pic.downk.cc/item/5ed520b8c2a9a83be55a3848.png');koe_knowking_image_2.setAttribute('src','https://pic.downk.cc/item/5ed520b8c2a9a83be55a3843.png');koe_knowking_image_1.setAttribute('class','koe_knowking_image_1');koe_knowking_image_2.setAttribute('class','koe_knowking_image_2');document.body.appendChild(koe_knowking_image_1);document.body.appendChild(koe_knowking_image_2);var koe_knowking_timer=null;var koe_knowking_is_1=true}var koe_knowking_xhr=new XMLHttpRequest();koe_knowking_xhr.open('GET','https://bili.imba97.cn/baike.php?kw='+koe_knowking_selected_text,true);koe_knowking_xhr.onreadystatechange=function(){if(koe_knowking_xhr.readyState==4&&koe_knowking_xhr.status==200||koe_knowking_xhr.status==304){var json=JSON.parse(koe_knowking_xhr.responseText);var audio_url='http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=5&text=没有人比我更懂,懂了个寂寞';if(json.status===1){audio_url='http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=5&text=没有人比我更懂'+koe_knowking_selected_text+','+json.content;var audio=document.createElement('audio');audio.setAttribute('id','koe_knowking_audio');audio.setAttribute('autoplay','');var source=document.createElement('source');source.setAttribute('src',audio_url);audio.appendChild(source);audio.addEventListener('canplaythrough',function(){koe_knowking_msg.style.display='none';koe_knowking_content.innerText=json.content;koe_knowking_content.style.display='block';koe_knowking_image_1.style.display='block';koe_knowking_timer=setInterval(function(){if(koe_knowking_is_1){koe_knowking_image_1.style.display='none';koe_knowking_image_2.style.display='block'}else{koe_knowking_image_1.style.display='block';koe_knowking_image_2.style.display='none'}koe_knowking_is_1=!koe_knowking_is_1},300)});audio.addEventListener('ended',function(){koe_knowking_clicked=undefined;document.body.removeChild(audio);koe_knowking_content.style.display='none';koe_knowking_image_1.style.display='none';koe_knowking_image_2.style.display='none';koe_knowking_is_1=true;clearInterval(koe_knowking_timer);koe_knowking_timer=null});document.body.appendChild(audio)}else{koe_knowking_msg.innerText=json.content}}};koe_knowking_xhr.send()}else{koe_knowking_clicked=undefined}}void(0);/*{"name":"懂王"}*/ -------------------------------------------------------------------------------- /code/js-6.server.php: -------------------------------------------------------------------------------- 1 | 0, 27 | 'content' => '无百科或其他错误' 28 | ); 29 | 30 | preg_match_all('/百度百科错误页/', $data, $pregError); 31 | 32 | if($pregError[0][0] !== NULL) { 33 | $resultJsonArray['status'] = 1; 34 | $resultJsonArray['content'] = '这个我是懂的,但我没有查到,这很可能是C国搞的鬼。'; 35 | die(json_encode($resultJsonArray)); 36 | } 37 | 38 | preg_match_all('/ { 9 | let str = ''; 10 | if (bv.length === 12) { 11 | str = bv; 12 | } else if (bv.length === 10) { 13 | str = `BV${bv}`; 14 | } else if (bv.length === 9) { 15 | str = `BV1${bv}`; 16 | } else { 17 | return '¿你在想桃子?'; 18 | } 19 | if ( 20 | !str.match( 21 | /[Bb][Vv][fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF]{10}/gu 22 | ) 23 | ) { 24 | return '¿你在想桃子?'; 25 | } 26 | let result = 0; 27 | let i = 0; 28 | while (i < 6) { 29 | result += bv2av_com_table.indexOf(str[bv2av_com_s[i]]) * 58 ** i; 30 | i += 1; 31 | } 32 | return `av${(result - bv2av_com_add) ^ bv2av_com_xor}`; 33 | }; 34 | } 35 | // 获取BV号将其转为AV号,再用弹出框将其显示 36 | prompt('AV号', bv2av_com_bv2av(__INITIAL_STATE__.bvid)); 37 | -------------------------------------------------------------------------------- /code/js-7.min.js: -------------------------------------------------------------------------------- 1 | if(typeof bv2av_com_bv2av==='undefined'){const bv2av_com_table=[...'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF'];const bv2av_com_s=[11,10,3,8,4,6];const bv2av_com_xor=177451812;const bv2av_com_add=8728348608;var bv2av_com_bv2av=(bv)=>{let str='';if(bv.length===12){str=bv}else if(bv.length===10){str=`BV${bv}`}else if(bv.length===9){str=`BV1${bv}`}else{return'¿你在想桃子?'};if(!str.match(/[Bb][Vv][fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF]{10}/gu)){return'¿你在想桃子?'};let result=0;let i=0;while(i<6){result+=bv2av_com_table.indexOf(str[bv2av_com_s[i]])*58**i;i+=1};return`av${result-bv2av_com_add^bv2av_com_xor}`}}prompt('AV号',bv2av_com_bv2av(__INITIAL_STATE__.bvid));/*{"name":"BV转AV"}*/ -------------------------------------------------------------------------------- /code/js-8.js: -------------------------------------------------------------------------------- 1 | // 获取淘宝、天猫的链接 2 | var koe_item_url = /(https:\/\/(item\.taobao|detail\.tmall)\.com\/item\.htm)(\?|.*&)(id=\d+)/.exec( 3 | window.location.href 4 | ); 5 | // 将网址部分和参数 id 拼接,并放在弹出框中显示 6 | prompt('短网址', koe_item_url[1] + '?' + koe_item_url[4]); 7 | -------------------------------------------------------------------------------- /code/js-8.min.js: -------------------------------------------------------------------------------- 1 | var koe_item_url = /(https:\/\/(item\.taobao|detail\.tmall)\.com\/item\.htm)(\?|.*&)(id=\d+)/.exec(window.location.href);prompt('短网址',koe_item_url[1]+'?'+koe_item_url[4]);/*{"name":"简化淘宝天猫链接"}*/ -------------------------------------------------------------------------------- /code/js-9.js: -------------------------------------------------------------------------------- 1 | // 连点器 无代码 -------------------------------------------------------------------------------- /code/js-9.min.js: -------------------------------------------------------------------------------- 1 | // 连点器 无代码 -------------------------------------------------------------------------------- /code/js_ranking.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 排行榜 3 | */ 4 | function Ranking(element) { 5 | var style = document.createElement('style'); 6 | style.innerText = ` 7 | 8 | body { 9 | overflow-x: hidden; 10 | } 11 | 12 | .ranking { 13 | position: relative; 14 | padding-left: 0; 15 | width: 100%; 16 | } 17 | 18 | .ranking li { 19 | position: relative; 20 | list-style: none; 21 | } 22 | 23 | .ranking li p { 24 | overflow: hidden; 25 | text-overflow:ellipsis; 26 | white-space: nowrap; 27 | } 28 | 29 | .ranking li p a { 30 | display: block; 31 | } 32 | 33 | .ranking li p { 34 | position: absolute; 35 | } 36 | 37 | .ranking li:nth-child(1), 38 | .ranking li:nth-child(2), 39 | .ranking li:nth-child(3) { 40 | position: absolute; 41 | left: 50%; 42 | } 43 | 44 | .ranking li:nth-child(1) { 45 | top: 0; 46 | width: 40%; 47 | max-width: 800px; 48 | -webkit-transform: translate(-50%,0); 49 | -moz-transform: translate(-50%,0); 50 | transform: translate(-50%,0); 51 | } 52 | 53 | .ranking li:nth-child(2) { 54 | top: 12vw; 55 | width: 20%; 56 | max-width: 400px; 57 | -webkit-transform: translate(-220%,0); 58 | -moz-transform: translate(-220%,0); 59 | transform: translate(-220%,0); 60 | } 61 | 62 | .ranking li:nth-child(3) { 63 | top: 12vw; 64 | width: 20%; 65 | max-width: 400px; 66 | -webkit-transform: translate(120%,0); 67 | -moz-transform: translate(120%,0); 68 | transform: translate(120%,0); 69 | } 70 | 71 | @media screen and (max-width: 1200px) { 72 | 73 | .ranking { 74 | padding-top: calc(36vw + 60px); 75 | } 76 | 77 | .ranking li .title, 78 | .ranking li .count { 79 | font-size: 10px; 80 | } 81 | 82 | .ranking li:nth-of-type(n+4) .title { 83 | width: calc(100% - 100px) 84 | } 85 | 86 | .ranking li:nth-of-type(n+4) { 87 | height: 60px; 88 | } 89 | 90 | .ranking li:nth-of-type(n+4) .title { 91 | left: 100px; 92 | } 93 | 94 | .ranking li:nth-of-type(n+4) .count { 95 | top: 30px; 96 | left: 100px; 97 | } 98 | 99 | .ranking li:nth-child(1) .title, 100 | .ranking li:nth-child(2) .title, 101 | .ranking li:nth-child(3) .title { 102 | bottom: -40px; 103 | left: 0; 104 | } 105 | 106 | .ranking li:nth-child(1) .count, 107 | .ranking li:nth-child(2) .count, 108 | .ranking li:nth-child(3) .count { 109 | bottom: -70px; 110 | left: 0; 111 | } 112 | } 113 | 114 | @media screen and (min-width:1201px){ 115 | 116 | .ranking { 117 | padding-top: calc(23vw + 120px); 118 | } 119 | 120 | .ranking li .title, 121 | .ranking li .count { 122 | font-size: 20px; 123 | } 124 | 125 | .ranking li:nth-of-type(n+4) { 126 | height: 100px; 127 | } 128 | 129 | .ranking li:nth-of-type(n+4) .title { 130 | left: 200px; 131 | } 132 | 133 | .ranking li:nth-of-type(n+4) .count { 134 | top: 50px; 135 | left: 200px; 136 | } 137 | 138 | .ranking li:nth-child(1) .title, 139 | .ranking li:nth-child(2) .title, 140 | .ranking li:nth-child(3) .title { 141 | bottom: -80px; 142 | left: 0; 143 | } 144 | 145 | .ranking li:nth-child(1) .count, 146 | .ranking li:nth-child(2) .count, 147 | .ranking li:nth-child(3) .count { 148 | bottom: -110px; 149 | left: 0; 150 | } 151 | } 152 | 153 | .ranking li:nth-child(1) img, 154 | .ranking li:nth-child(2) img, 155 | .ranking li:nth-child(3) img { 156 | width: 100%; 157 | } 158 | 159 | .ranking li:nth-of-type(n+4) { 160 | width: 100%; 161 | border-bottom: 1px #000 solid; 162 | } 163 | 164 | .ranking li:nth-of-type(n+4) img { 165 | height: 100%; 166 | } 167 | 168 | .ranking li:nth-of-type(n+4) .title { 169 | top: 0; 170 | } 171 | `; 172 | document.head.appendChild(style); 173 | 174 | if (typeof element !== 'undefined') { 175 | this.element = 176 | typeof element === 'string' ? document.querySelector(element) : element; 177 | } else { 178 | this.element = null; 179 | } 180 | } 181 | 182 | Ranking.prototype.getDataWithURL = function (url) { 183 | var self = this; 184 | var xhr = new XMLHttpRequest(); 185 | xhr.open('GET', url, true); 186 | xhr.send(); 187 | xhr.onreadystatechange = function () { 188 | if (xhr.readyState === 4 && xhr.status === 200) { 189 | var json = JSON.parse(xhr.responseText); 190 | self.createList(json); 191 | } 192 | }; 193 | 194 | return this; 195 | }; 196 | 197 | Ranking.prototype.createList = function (json) { 198 | var ranking_ul = document.createElement('ul'); 199 | ranking_ul.setAttribute('class', 'ranking'); 200 | var html = ''; 201 | 202 | json.forEach(function (item) { 203 | var url = 204 | typeof item.url === 'undefined' 205 | ? 'https://b23.tv/av' + item.aid 206 | : item.url; 207 | 208 | html += 209 | '
  • ' + 214 | item.title.replace('每天一个JS程序', '') + 215 | '

    '; 216 | 217 | if (typeof item.message !== 'undefined') { 218 | html += '

    ' + item.message + '

    '; 219 | } else { 220 | html += 221 | '

    总分:' + 222 | (item.view + item.like * 2 + item.coin * 5 + item.favorite * 3) + 223 | '

    '; 224 | } 225 | 226 | html += '
  • '; 227 | }); 228 | 229 | ranking_ul.innerHTML = html; 230 | 231 | this.element.appendChild(ranking_ul); 232 | }; 233 | -------------------------------------------------------------------------------- /code/js_ranking.min.js: -------------------------------------------------------------------------------- 1 | function Ranking(element){var style=document.createElement('style');style.innerText='body{overflow-x:hidden}.ranking{position:relative;padding-left:0;width:100%}.ranking li{position:relative;list-style:none}.ranking li p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ranking li p a{display:block}.ranking li p{position:absolute}.ranking li:nth-child(1),.ranking li:nth-child(2),.ranking li:nth-child(3){position:absolute;left:50%}.ranking li:nth-child(1){top:0;width:40%;max-width:800px;-webkit-transform:translate(-50%,0);-moz-transform:translate(-50%,0);transform:translate(-50%,0)}.ranking li:nth-child(2){top:12vw;width:20%;max-width:400px;-webkit-transform:translate(-220%,0);-moz-transform:translate(-220%,0);transform:translate(-220%,0)}.ranking li:nth-child(3){top:12vw;width:20%;max-width:400px;-webkit-transform:translate(120%,0);-moz-transform:translate(120%,0);transform:translate(120%,0)}@media screen and (max-width:1200px){.ranking{padding-top:calc(36vw + 60px)}.ranking li .count,.ranking li .title{font-size:10px}.ranking li:nth-of-type(n+4) .title{width:calc(100% - 100px)}.ranking li:nth-of-type(n+4){height:60px}.ranking li:nth-of-type(n+4) .title{left:100px}.ranking li:nth-of-type(n+4) .count{top:30px;left:100px}.ranking li:nth-child(1) .title,.ranking li:nth-child(2) .title,.ranking li:nth-child(3) .title{bottom:-40px;left:0}.ranking li:nth-child(1) .count,.ranking li:nth-child(2) .count,.ranking li:nth-child(3) .count{bottom:-70px;left:0}}@media screen and (min-width:1201px){.ranking{padding-top:calc(23vw + 120px)}.ranking li .count,.ranking li .title{font-size:20px}.ranking li:nth-of-type(n+4){height:100px}.ranking li:nth-of-type(n+4) .title{left:200px}.ranking li:nth-of-type(n+4) .count{top:50px;left:200px}.ranking li:nth-child(1) .title,.ranking li:nth-child(2) .title,.ranking li:nth-child(3) .title{bottom:-80px;left:0}.ranking li:nth-child(1) .count,.ranking li:nth-child(2) .count,.ranking li:nth-child(3) .count{bottom:-110px;left:0}}.ranking li:nth-child(1) img,.ranking li:nth-child(2) img,.ranking li:nth-child(3) img{width:100%}.ranking li:nth-of-type(n+4){width:100%;border-bottom:1px #000 solid}.ranking li:nth-of-type(n+4) img{height:100%}.ranking li:nth-of-type(n+4) .title{top:0}';document.head.appendChild(style);if(typeof element!=='undefined'){this.element=typeof element==='string'?document.querySelector(element):element}else{this.element=null}}Ranking.prototype.getDataWithURL=function(url){var self=this;var xhr=new XMLHttpRequest();xhr.open('GET',url,true);xhr.send();xhr.onreadystatechange=function(){if(xhr.readyState===4&&xhr.status===200){var json=JSON.parse(xhr.responseText);self.createList(json)}};return this};Ranking.prototype.createList=function(json){var ranking_ul=document.createElement('ul');ranking_ul.setAttribute('class','ranking');var html='';json.forEach(function(item){var url=typeof item.url==='undefined'?'https://b23.tv/av'+item.aid:item.url;html+='
  • '+item .title.replace('每天一个JS程序','')+'

    ';if(typeof item.message!=='undefined'){html+='

    '+item.message+'

    '}else{html+='

    总分:'+(item.view+item.like*2+item.coin*5+item.favorite*3)+'

    '}html+='
  • '});ranking_ul.innerHTML=html;this.element.appendChild(ranking_ul)}; -------------------------------------------------------------------------------- /code/js_ranking.php: -------------------------------------------------------------------------------- 1 | connect('127.0.0.1', 6379); 8 | $rankingDataModify = $redis->get('rankingDataModify'); 9 | if($rankingDataModify === date('Ymd', time())) { 10 | $redis->close(); 11 | die($redis->get('rankingData')); 12 | } 13 | 14 | function curlRequest($url) 15 | { 16 | 17 | $curl = curl_init(); 18 | curl_setopt($curl, CURLOPT_URL, $url); 19 | curl_setopt($curl, CURLOPT_HEADER, 0); 20 | curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 21 | curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); 22 | curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.2) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13'); 23 | $resultData = curl_exec($curl); 24 | curl_close($curl); 25 | 26 | return $resultData; 27 | 28 | } 29 | 30 | define('DS', DIRECTORY_SEPARATOR); 31 | define('__ROOT__', realpath('./')); 32 | 33 | $imageDirName = 'ranking_images'; 34 | $imageDirPath = __ROOT__ . DS . $imageDirName; 35 | 36 | if(!is_dir($imageDirPath)) mkdir($imageDirPath); 37 | 38 | function getImage($imageUrl) { 39 | 40 | global $imageDirPath; 41 | global $imageDirName; 42 | 43 | preg_match('/[a-z0-9]{40}\.(jpe?g|png|webp)$/', $imageUrl, $imageFileNamePreg); 44 | $imagePath = $imageDirPath . DS . $imageFileNamePreg[0]; 45 | 46 | if(!file_exists($imagePath)) { 47 | $imageData = curlRequest($imageUrl); 48 | $imageFile = fopen($imagePath, 'w'); 49 | fwrite($imageFile, $imageData); 50 | fclose($imageFile); 51 | } 52 | 53 | return '//' . $_SERVER['SERVER_NAME'] . preg_replace('/[a-zA-Z0-9_]+\.php$/', '', $_SERVER['PHP_SELF']) . $imageDirName . '/' . $imageFileNamePreg[0]; 54 | } 55 | 56 | $videosInfoTemp = array(); 57 | $videosSort = array(); 58 | $videosInfo = array(); 59 | 60 | getChannelInfo(1); 61 | 62 | function getChannelInfo($page) { 63 | global $videosInfoTemp; 64 | global $videosSort; 65 | 66 | $channelUrl = 'https://api.bilibili.com/x/space/channel/video?mid=2198461&cid=132081&pn=1&ps=100&order=0&jsonp=jsonp'; 67 | $data = curlRequest($channelUrl); 68 | $arr = json_decode($data, true); 69 | if(count($arr['data']['list']['archives']) === 0) { 70 | return false; 71 | } 72 | foreach($arr['data']['list']['archives'] as $videoInfo) { 73 | $videosInfoTemp['a'.$videoInfo['aid']] = [ 74 | 'aid' => $videoInfo['aid'], 75 | 'pic' => getImage($videoInfo['pic']), 76 | 'title' => $videoInfo['title'], 77 | 'view' => $videoInfo['stat']['view'], 78 | 'like' => $videoInfo['stat']['like'], 79 | 'coin' => $videoInfo['stat']['coin'], 80 | 'favorite' => $videoInfo['stat']['favorite'], 81 | ]; 82 | // 播放 = 1分; 点赞 = 2分; 硬币 = 5分; 收藏 = 3分; 83 | $videosSort['a'.$videoInfo['aid']] = $videoInfo['stat']['view'] + ($videoInfo['stat']['like'] * 2) + ($videoInfo['stat']['coin']*5) + ($videoInfo['stat']['favorite']*3); 84 | } 85 | if(count($arr['data']['list']['archives']) < 100) return false; 86 | getChannelInfo(++$page); 87 | } 88 | 89 | array_multisort($videosSort, SORT_DESC); 90 | foreach($videosSort as $key => $val) { 91 | $videosInfo[] = $videosInfoTemp[$key]; 92 | } 93 | 94 | $resultJsonData = json_encode($videosInfo); 95 | $resultModifyTime = date('Ymd', time()); 96 | 97 | $redis->set('rankingDataModify', $resultModifyTime); 98 | $redis->set('rankingData', $resultJsonData); 99 | $redis->close(); 100 | 101 | die($resultJsonData); 102 | --------------------------------------------------------------------------------