Skip to content

Instantly share code, notes, and snippets.

View yicone's full-sized avatar

yicone

View GitHub Profile
@yicone
yicone / 0_reuse_code.js
Created November 28, 2015 13:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
function foo(site, content, url, pic) {
var a = {
weibo: 'http://service.weibo.com/share/share.php?url={$url}&title={$content}&pic={$pic}',
tqq: 'http://v.t.qq.com/share/share.php?url={$url}&title={$content}&pic={$pic}',
renren: 'http://share.renren.com/share/buttonshare?link={$url}&title={$content}',
qzone: 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgiqzshareonekey?url={$url}&title={$content}&pics={$pic}'
};
var b = {
content: encodeURIComponent(content),
url: encodeURIComponent(url),