From f57c8b052be8b59a880fdc3b350337cd04d76922 Mon Sep 17 00:00:00 2001 From: Cotton Hou Date: Sat, 15 Mar 2014 06:39:45 +0800 Subject: [PATCH] shorten links while tweeting, plus to ensure original counts --- index.html | 2 +- js/html_actuator.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 3fb403e..f9fb314 100644 --- a/index.html +++ b/index.html @@ -83,7 +83,7 @@ Created by Gabriele Cirulli. Based on 1024 by Veewo Studio and conceptually similar to Threes by Asher Vollmer.

- +
diff --git a/js/html_actuator.js b/js/html_actuator.js index 81359a7..8f7e779 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -156,6 +156,8 @@ HTMLActuator.prototype.scoreTweetButton = function () { tweet.classList.add("twitter-share-button"); tweet.setAttribute("href", "https://twitter.com/share"); tweet.setAttribute("data-via", "gabrielecirulli"); + tweet.setAttribute("data-url", "http://git.io/2048"); + tweet.setAttribute("data-counturl", "http://gabrielecirulli.github.io/2048/"); tweet.textContent = "Tweet"; var text = "I scored " + this.score + " points at 2048, a game where you " + -- GitLab