kdxcxs
5 years ago
commit
16eb07d9aa
9 changed files with 124 additions and 0 deletions
@ -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) |
@ -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|_| \\_\\ |_____/ /_/ \\_\\ \\_____| /_/ \\_\\ /_____/ '); |
||||
|
|
||||
|
}) |
||||
|
})(); |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
@ -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播放器快捷键绑定完成'); |
||||
|
} |
||||
|
} |
||||
|
})(); |
Loading…
Reference in new issue