Skip to content

Instantly share code, notes, and snippets.

View fomenyesu's full-sized avatar
🎯
Focusing

佛门耶稣 fomenyesu

🎯
Focusing
  • MTDP
  • paradise
View GitHub Profile
@fomenyesu
fomenyesu / cloudSettings
Created December 31, 2019 06:26
Visual Studio Code Settings Sync Gist
// Empty
@fomenyesu
fomenyesu / aq_common.js
Created January 30, 2018 03:48
XSS攻击防御前端代码
//ver 1.3 2014-08-12
function AQ_SECAPI_ESCAPE(Url,map){
var tmpArr = new Array;
for(var m=0; m<Url.length; m++){
if(Url.charAt(m) == '&'){
var keyLen = [3,4,5,9];
var matchFlag = 0;
for(var n in keyLen){
var l = keyLen[n];
if(m+l <= Url.length){
@fomenyesu
fomenyesu / FileSaverWithProgress
Created December 13, 2017 08:10
FileSaverWithProgress
let ajax = new XMLHttpRequest();
ajax.open("GET",item.url,true);
ajax.addEventListener("progress", function(evt){
if (evt.lengthComputable) {
var percentComplete = evt.loaded / evt.total;
//Do something with download progress
console.log("percentComplete " + percentComplete);
}
}, false);
ajax.onreadystatechange = function(){
.toc {
font-size: 14px;
position: fixed;
top: 0px;
left: -330px;
width: 400px;
height: 100%;
overflow-x: scroll;
overflow-y: scroll;
padding: 0 0 0 100px;