This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"category": "实用工具", | |
"icon": "icongongju", | |
"urls": [ | |
{ | |
"href": "https://www.alltoall.net", | |
"favicon": "", | |
"title": "ALL TO ALL", | |
"description": "多格式支持的在线免费转换" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window, document) { | |
window.requestAnimationFrame = | |
window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
function(callback) { | |
setTimeout(callback, 1000 / 60); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function PubSub() { | |
this._event = {}; | |
this.on = function (eventName, handler) { | |
if (this._event[eventName]) { | |
this._event[eventName].push(handler); | |
} else { | |
this._event[eventName] = [handler]; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var proxy = "__PROXY__"; | |
var direct = "DIRECT"; | |
var domains = [ | |
// others | |
"jsfiddle.net", | |
"gitter.im", | |
"greatfire.org", | |
"tox.im", | |
"proxifier.com", | |
"dnscrypt.org", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** 清除内外边距**/ | |
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* 结构元素 - structural elements */ | |
dl, dt, dd, ul, ol, li, /* 列表元素 - list elements */ | |
pre, /* 文本格式元素 - text formatting elements */ | |
form, fieldset, legend, button, input, textarea, /* 表单元素 - from elements */ | |
th, td /* 表格元素 - table elements */ { | |
margin: 0; | |
padding: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 打印颜色字体 | |
const logColor = (text,color="#ffb3cc") => { | |
console.log("%c " + text, "color: " + color + "; font-weight: bold;") | |
} | |
// 随机获取颜色 | |
const getRandomColor = ()=> { | |
let rgb = [] | |
for (let i = 0; i < 3; ++i) { | |
let color = Math.floor(Math.random() * 256).toString(16) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file A simple and easy-to-use JS image compression, tools | |
* @author wangyulue(wangyulue@gmail.com) | |
*/ | |
(function (factory) { | |
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() | |
: typeof define === 'function' && define.amd ? define(factory) | |
: (window.imageConversion = factory()); | |
}((() => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Object.assign, Array.includes polyfills | |
"function" != typeof Object.assign && Object.defineProperty(Object, "assign", { | |
value: function(t, e) { | |
"use strict"; | |
if (null == t) throw new TypeError("Cannot convert undefined or null to object"); | |
for (var r = Object(t), n = 1; n < arguments.length; n++) { | |
var o = arguments[n]; | |
if (null != o) | |
for (var i in o) Object.prototype.hasOwnProperty.call(o, i) && (r[i] = o[i]) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 可伸缩布局方案 | |
* rem计算方式:设计图尺寸px / 100 = 实际rem 【例: 100px = 1rem,32px = .32rem】 | |
*/ | |
console.log( | |
" %c YUYE %c chenyeah.com ", | |
"color:#fadfa3;background:#030307;padding:5px 0;border-radius:4px 0 0 4px", | |
";color:#fff;background:#41b883;padding:5px 0;border-radius:0 4px 4px 0" | |
); | |
!(function(window) { |