Skip to content

Instantly share code, notes, and snippets.

@southill
southill / scrollbar.css
Created December 16, 2016 07:36
webkit scroll bar setting
::-webkit-scrollbar {
-webkit-appearance: none;
}
::-webkit-scrollbar:vertical {
width: 6px;
}
::-webkit-scrollbar:horizontal {
height: 12px;
@southill
southill / input_file.html
Created April 11, 2016 16:44
input file with camera
.input_file {
@extend .full;
opacity 0;
}
<input type="file" class="input_file" accept="image/*" capture="camera">
@southill
southill / jsconfig.js
Last active January 14, 2019 01:52
分享设置 #iwegu #jsconfig #wxjssdk
$.ajax({
type: "GET",
dataType: "jsonp",
url: "https://api.igumo.cc/api/wxcache/jsconfig",
data: {
url: location.href
},
success: function(_data) {
if (_data.status == 1) {
wx.config({
@southill
southill / enableInlineVideo
Last active July 21, 2019 04:41
video inline
enableInlineVideo(document.querySelector('#thevideo'));
@southill
southill / nginx_vhost.conf
Created January 1, 2016 06:22
域名反向代理 #nginx #location #真实IP
location ^~ /
{
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://xxx.igumo.cc/;
}
@southill
southill / imgLoadBeforeOnload.js
Created October 25, 2013 04:02
在图片onload之前获取图片的头部数据中的宽高
// 更新:
// 05.27: 1、保证回调执行顺序:error > ready > load;2、回调函数this指向img本身
// 04-02: 1、增加图片完全加载后的回调 2、提高性能
/**
* 图片头数据加载就绪事件 - 更快获取图片尺寸
* @version 2011.05.27
* @author TangBin
* @see http://www.planeart.cn/?p=1121
* @param {String} 图片路径
@southill
southill / GetQueryString
Last active January 14, 2019 01:54
js获取地址参数
function GetQueryString(name){
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r!=null)return unescape(r[2]); return null;
}