Skip to content

Instantly share code, notes, and snippets.

@mraiguo
mraiguo / chimee-autoplay.html
Last active May 13, 2021 07:19
h5 的 video 在微信和普通浏览器自动播放
<!DOCTYPE html>
<html>
<head>
<title>ChimePlayer Demo1234</title>
<meta charset="utf-8">
<meta name="description" content="ChimePlayer Demo">
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1, maximum-scale=1">
<meta name="mobile-web-app-capable" content="yes">
<link rel="stylesheet" type="text/css" href="./index.css">
function fun(n,o) {
console.log(o)
return {
fun:function(m){
return fun(m,n);
}
};
}
var a = fun(0); a.fun(1); a.fun(2); a.fun(3);//undefined,?,?,?
var b = fun(0).fun(1).fun(2).fun(3);//undefined,?,?,?
@mraiguo
mraiguo / checkLRForBinFile.js
Created May 8, 2020 02:51
处理window下换行符问题
const fs = require('fs')
const path = require('path')
const fg = require('fast-glob')
const {
crlf, chkcrlf, LF
} = require('crlf-normalize')
function checkLRForBinFile() {
console.log()
console.log('检查`bin`中的是否非LR格式')
@mraiguo
mraiguo / tree-select.js
Last active August 19, 2019 11:46
fish 下使用完全受控控制点击父节点只展开不选中
import { TreeSelect } from 'fish';
const TreeNode = TreeSelect.TreeNode;
class Demo extends React.Component {
state = {
value: undefined,
expandedKeys: [],
};
@mraiguo
mraiguo / videojs-switch.html
Last active September 29, 2018 09:34
videojs switch
<!DOCTYPE html>
<html>
<head>
<title>Video.js | HTML5 Video Player</title>
<!-- Change URLs to wherever Video.js files will be hosted -->
<link href="//vjs.zencdn.net/6.2.5/video-js.css" rel="stylesheet" type="text/css">
<!-- video.js must be in the <head> for older IEs to work. -->
<script src="//vjs.zencdn.net/6.2.5/video.js"></script>
</head>
<body>
@mraiguo
mraiguo / videojs-contrib-add.html
Created September 29, 2018 09:05
videojs ads
<!DOCTYPE html>
<html>
<head>
<title>Video.js | HTML5 Video Player</title>
<script src="//libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<!-- Change URLs to wherever Video.js files will be hosted -->
<link href="//vjs.zencdn.net/6.2.5/video-js.css" rel="stylesheet" type="text/css">
<!-- video.js must be in the <head> for older IEs to work. -->
<script src="//vjs.zencdn.net/6.2.5/video.js"></script>
<script src="//cdn.jsdelivr.net/npm/videojs-flash@2/dist/videojs-flash.min.js"></script>