TampermonkeyScripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.4 KiB

5 years ago
// ==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|_| \\_\\ |_____/ /_/ \\_\\ \\_____| /_/ \\_\\ /_____/ ');
})
})();