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 fakeClick = function (url) { | |
var $a = $('<a>'); | |
$a.attr({ | |
href: url | |
}); | |
$('body').append($a); | |
var evt = document.createEvent('HTMLEvents'); | |
evt.initEvent('click', false, false); |
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
// html 中引入 ga | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//static.wdjimg.com/misc/javascripts/analytics.js','ga');ga('create', 'UA-15790641-69', 'auto'); | |
// 把 pageview 放到 js 中 | |
ga('send', 'pageview'); | |
// 用户触发动作时,js 中记录示例 | |
ga('send', 'event', 'yilan', 'share', 'wechat-timeline'); | |
ga('send', 'event', 'yilan', 'install', '这里写对应的包名'); |
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
javascript: (function() { | |
Array.prototype.del = function (n){ | |
if (n < 0) { | |
return this; | |
} else { | |
return this.slice(0,n).concat(this.slice(n+1,this.length)); | |
} | |
} | |
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
#!/usr/bin/python | |
import string, random | |
def RandomStringGenerator(size=12, chars=string.ascii_letters + string.digits): | |
return '\n {"expired": false, "coupon": "' + ''.join(random.choice(chars) for _ in range(size)) + '"}' | |
def save(filename, contents): | |
fh = open(filename, 'w') | |
fh.write(contents) |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>test</title> | |
<style type="text/css"> | |
.image { | |
display: inline-block; | |
width: 150px; | |
} |
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
<p> | |
彩蛋什么的最能让人感到惊喜了。最近,微信的彩蛋被频频曝出,通过输入特定的代码可以开启原本隐藏的功能。笔者整理了部分代码及效果图,望各位玩的开心。 | |
</p> | |
<p> | |
阅读须知 | |
</p> | |
<p> | |
1. 以下代码仅适用于 Android 版微信; | |
</p> | |
<p> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key><string>Seti_Original</string> | |
<key>settings</key> | |
<array> | |
<!-- ==================================== | |
General | |
====================================== --> |
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
// 需调用的插件: | |
// 1 微信 SDK: jweixin-1.0.0.js | |
// 2 豌豆荚 campaign SDK: campaignTools.js | |
// 3 豌豆荚 account SDK: snappea-account-hook.js | |
// 设备信息 | |
var device = { | |
isP4 : campaignTools.UA.inWdj, // 豌豆荚客户端 P4 | |
isWechat : campaignTools.UA.inWechat, // 微信 |