summaryrefslogtreecommitdiff
path: root/static/js/src/share.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2012-07-18 00:02:21 -0400
committerJules Laplace <jules@okfoc.us>2012-07-18 00:02:21 -0400
commitc4338d2ae878a167c409e91dea6d1783fc7e30ba (patch)
tree1e54fac722ac3153f9180a5a8332f2b19e11c00c /static/js/src/share.js
parentd891a7ae1b205716c086363fba17a3249a665deb (diff)
put away back
Diffstat (limited to 'static/js/src/share.js')
-rw-r--r--static/js/src/share.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/static/js/src/share.js b/static/js/src/share.js
new file mode 100644
index 0000000..ecf8a00
--- /dev/null
+++ b/static/js/src/share.js
@@ -0,0 +1,26 @@
+
+Share = {
+ "openLink": function(url){
+ window.open(url, "_blank")
+ },
+ "facebook": function(button){
+ var message = getMessageInfo(button)
+ var url = "http://www.facebook.com/share.php?u=" + message.img + "&t=" + message.via
+ Share.openLink(url)
+ },
+ "tumblr": function(button){
+ var message = getMessageInfo(button)
+ var url = "http://www.tumblr.com/share?v=3&u=" + message.img + "&t=" + message.via
+ Share.openLink(url)
+ },
+ "twitter": function(button){
+ var message = getMessageInfo(button)
+ var url = "http://twitter.com/home?status=" + message.img + encodeURIComponent(" ") + message.via
+ Share.openLink(url)
+ },
+ "delicious": function(button){
+ var message = getMessageInfo(button)
+ var url = "http://delicious.com/save?url=" + message.img + "&title=" + message.img + "&notes=" + message.via
+ Share.openLink(url)
+ }
+}