Skip to content

Instantly share code, notes, and snippets.

View naoyeye's full-sized avatar
🦾

J.Y Han naoyeye

🦾
View GitHub Profile
{
"pns":"com.misfitwearables.prometheus,com.edooon.gps,com.garmin.android.apps.connectmobile,co.runner.app,com.stt.android,com.endomondo.android,com.nike.plusgps,com.jawbone.up,com.fitnesskeeper.runkeeper.pro,com.mapmyrun.android2,com.protogeo.moves,com.fitbit.FitbitMobile"
}
@naoyeye
naoyeye / UTI2015.html
Last active August 29, 2015 14:09
U/TI 2015夏新品发布会
<!DOCTYPE html>
<html lang="ch">
<head>
<title>U/TI 2015夏新品发布会诚邀</title>
<meta charset="utf-8" />
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<meta HTTP-EQUIV="expires" CONTENT="0">
<meta name="keywords" content="U/TI 2015夏新品发布会诚邀" />
@naoyeye
naoyeye / tga2014.html
Created November 18, 2014 09:41
TGA移动游戏大奖赛官网
<!DOCTYPE HTML>
<head>
<meta charset="utf-8">
<meta name="author" content="Tencent-TGideas">
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>首页-TGA移动游戏大奖赛官网</title>
@naoyeye
naoyeye / share.jade
Last active August 16, 2018 12:34
分享
script#shareButtonsTpl(type='text/template')
.share-buttons
a.share-weibo(href='javascript:void(0);')
i
span 微博
a.share-wechat(href='javascript:void(0);')
i
span 微信
a.share-wechat-timeline(href='javascript:void(0);')
i
@naoyeye
naoyeye / ga.js
Created December 3, 2014 11:55
GA 事件跟踪代码
// GA 统计
var trackEvent = function (opt) {
if (typeof ga !== 'undefined' && ga) {
var _act, _cat, _lbl, _val;
if (opt) {
_cat = opt.category || '';
_act = opt.action || '';
_lbl = opt.label || '';
_val = opt.value || 0;
return ga('send', 'event', _cat, _act, _lbl, _val);
// 微博分享
trackEvent({category: 'movie2014', action: 'share', label: 'weibo'});
// 微信好友分享
trackEvent({category: 'movie2014', action: 'share', label: 'wechat-friend'});
// 微信朋友圈分享
trackEvent({category: 'movie2014', action: 'share', label: 'wechat-timeline'});
// 每个电影点击喜欢的 的数据
@naoyeye
naoyeye / P4.js
Last active August 29, 2015 14:11
P4 webview 相关接口的代码片段参考
/*
* @Author: [email protected]
* @Date: 2014-12-17 19:50:08
* @Last Modified by: [email protected]
* @Last Modified time: 2014-12-17 20:04:19
*/
// 判断是不是在 P4 中
if (window.campaignPlugin) {
@naoyeye
naoyeye / isPC.js
Created January 22, 2015 11:12
判断是否是 PC
var ispc = false;
(function(){
var SUA = navigator.userAgent, SUA_OF = function(s){return SUA.indexOf(s) > -1};
if (SUA_OF('Android') && SUA_OF('Mobile') || SUA_OF('iPhone') || SUA_OF('iPod') || SUA_OF('Symbian') || SUA_OF('IEMobile')){
}else{
ispc = true;
}
})();
@naoyeye
naoyeye / device.js
Created February 12, 2015 08:34
判断是不是在淘宝中、是不是在虾米中、是不是在微博中、是不是在微信中
var j = window.navigator.userAgent;
var g = {
android: j.match(/(Android);?[\s\/]+([\d.]+)?/),
iphone: j.match(/(iPhone\sOS)\s([\d_]+)/)
};
var d = {
aliapp: j.match(/\AliApp\(([^\/]+)\/([\d\.\w]+)\)/),
xiami: j.match(/(AliApp)\((XM)\/([0-9.]+)\)*/),
weibo: j.match(/.*?(weibo\_\_([0-9.]+))\s*/),
weixin: j.match(/.*?(MicroMessenger\/([0-9.]+))\s*/)
@naoyeye
naoyeye / wechatShare.js
Created February 26, 2015 06:55
微信 js sdk 分享
function wechatShareSetup() {
$.ajax({
url: 问我,
type: 'POST',
data: {
// url: 'http://www.wandoujia.com/campaign/spring2015/?utm_source=wechat&utm_medium=sns&utm_campaign=spring2015'
url: location.href.split('#')[0] // 将当前URL地址上传至服务器用于产生数字签名
}
}).done(function (r) {
// 返回了数字签名对象