commit 16eb07d9aa07ba8f12da8462a48f04306a1d6bbf Author: kdxcxs Date: Sat Mar 28 09:11:35 2020 +0800 Init diff --git a/ReplaceXueKeWangUploader/README.md b/ReplaceXueKeWangUploader/README.md new file mode 100644 index 0000000..93a5ffd --- /dev/null +++ b/ReplaceXueKeWangUploader/README.md @@ -0,0 +1,29 @@ +# Ⅰ.安装Tampermonkey + +1. [下载](./tampermonkey_4_9_0_0.crx)Tampermonkey + +2. 用Chrome打开[扩展程序管理页面](chrome://extensions/) + + ![screenshot_3](./screenshot_3.png) + +3. 打开右上角的`开发者模式`开关 + + ![screenshot_4](./screenshot_4.png) + +4. `刷新`扩展程序页面 + +5. 将下载的crx文件拖到浏览器内 + + ![screenshot_1](./screenshot_1.png) + +# Ⅱ.安装去除限制脚本 + +1. 点击[安装](./replaceUploader_0_2.user.js)脚本 + + ![screenshot_2](./screenshot_2.png) + +# Ⅲ.验证安装 + +1. [刷新](javascript:location.reload();)本页面,有如下窗口弹出即为安装成功 + + ![screenshot_5](./screenshot_5.png) \ No newline at end of file diff --git a/ReplaceXueKeWangUploader/replaceUploader_0_2.user.js b/ReplaceXueKeWangUploader/replaceUploader_0_2.user.js new file mode 100644 index 0000000..78eb4ae --- /dev/null +++ b/ReplaceXueKeWangUploader/replaceUploader_0_2.user.js @@ -0,0 +1,35 @@ +// ==UserScript== +// @name 去除精准教学通上传限制 +// @namespace https://removelimit.kdxcxs.com/ +// @version 0.2 +// @description 去除精准教学通上传限制 +// @author kdxcxs +// @include http://jqzy.zxxk.com/* +// @include https://removelimit.kdxcxs.com/ +// @grant none +// ==/UserScript== + +(function() { + if (document.URL === "https://removelimit.kdxcxs.com/") { + alert('已安装成功,无需再次安装!'); + } + document.addEventListener('readystatechange', () =>{ + window.uploadFile = (obj) =>{ + var file = obj.files[0]; + var fileSize = file.size; + var allowExtention = ".jpg,.jpeg,.bmp,.gif,.png"; + var extention = $("#myfile").val().substring($("#myfile").val().lastIndexOf(".") + 1).toLowerCase(); + if (allowExtention.indexOf(extention) < 0) { + alert("请选择正确的图片格式"); + return false + } + this.imgFile = file; + $("#btnupload").val("图片上传中……"); + getOssToken(extention); + return false + }; + //alert('已去除上传限制'); + console.log('已去除上传限制\n _ _ _____ __ __ _____ __ __ _____ \n| | / / | _ \\ \\ \\ / / / ___| \\ \\ / / / ___/ \n| |/ / | | | | \\ \\/ / | | \\ \\/ / | |___ \n| |\\ \\ | | | | } { | | } { \\___ \\ \n| | \\ \\ | |_| | / /\\ \\ | |___ / /\\ \\ ___| | \n|_| \\_\\ |_____/ /_/ \\_\\ \\_____| /_/ \\_\\ /_____/ '); + + }) +})(); \ No newline at end of file diff --git a/ReplaceXueKeWangUploader/screenshot_1.png b/ReplaceXueKeWangUploader/screenshot_1.png new file mode 100644 index 0000000..985bbf1 Binary files /dev/null and b/ReplaceXueKeWangUploader/screenshot_1.png differ diff --git a/ReplaceXueKeWangUploader/screenshot_2.png b/ReplaceXueKeWangUploader/screenshot_2.png new file mode 100644 index 0000000..63e55b0 Binary files /dev/null and b/ReplaceXueKeWangUploader/screenshot_2.png differ diff --git a/ReplaceXueKeWangUploader/screenshot_3.png b/ReplaceXueKeWangUploader/screenshot_3.png new file mode 100644 index 0000000..2e40934 Binary files /dev/null and b/ReplaceXueKeWangUploader/screenshot_3.png differ diff --git a/ReplaceXueKeWangUploader/screenshot_4.png b/ReplaceXueKeWangUploader/screenshot_4.png new file mode 100644 index 0000000..92810ef Binary files /dev/null and b/ReplaceXueKeWangUploader/screenshot_4.png differ diff --git a/ReplaceXueKeWangUploader/screenshot_5.png b/ReplaceXueKeWangUploader/screenshot_5.png new file mode 100644 index 0000000..0912633 Binary files /dev/null and b/ReplaceXueKeWangUploader/screenshot_5.png differ diff --git a/ReplaceXueKeWangUploader/tampermonkey_4_9_0_0.crx b/ReplaceXueKeWangUploader/tampermonkey_4_9_0_0.crx new file mode 100644 index 0000000..be650c8 Binary files /dev/null and b/ReplaceXueKeWangUploader/tampermonkey_4_9_0_0.crx differ diff --git a/bilibiliHotkey.js b/bilibiliHotkey.js new file mode 100644 index 0000000..ebfad2a --- /dev/null +++ b/bilibiliHotkey.js @@ -0,0 +1,60 @@ +// ==UserScript== +// @name bilibili播放器快捷键 +// @namespace https://kdxcxs.com/ +// @version 0.1 +// @description 为bilibili web播放器增加快捷键 +// @author kdxcxs +// @include https://www.bilibili.com/* +// @grant none +// ==/UserScript== + +(function() { + 'use strict'; + document.onreadystatechange = function(){ + const initVideoInfo = ()=>{ // https://www.v2ex.com/t/640663 + const wrap = document.getElementsByClassName('bilibili-player-video-wrap')[0]; + wrap.dispatchEvent(new MouseEvent("contextmenu", { + bubbles: true, + cancelable: false, + view: window, + button: 2, + buttons: 0, + clientX: wrap.getBoundingClientRect().x+10, + clientY: wrap.getBoundingClientRect().y+10 + })); + const menu = document.getElementsByClassName('bilibili-player-context-menu-origin')[0]; + const a = menu.getElementsByTagName('a'); + a[a.length - 1].click();} + // 绑定按键 + if(document.readyState == "complete"){ + document.addEventListener('keydown', (event) => { + const code = event.keyCode + if (code === 53) { // 键盘5 + // 网页端全屏 + document.getElementsByClassName('bilibili-player-video-web-fullscreen')[0].click() + return; + } + if (code === 220) { // 键盘\| + // 全屏 + document.getElementsByClassName('bilibili-player-video-btn-fullscreen')[0].click() + } + if (code === 9) { // tab + // 打开视频统计信息 + if(!$('.bilibili-player-video-info-container').length){ + // 初始化视频统计信息 + initVideoInfo() + } + else{ + if($('.bilibili-player-video-info-container').is(":hidden")){ + $('.bilibili-player-video-info-container').show() + } + else{ + $('.bilibili-player-video-info-container').hide() + } + } + } + }, false); + console.log('Bilibili播放器快捷键绑定完成'); + } + } +})(); \ No newline at end of file