Permalink
Browse files

Making the G+ app support the new best practices

  • Loading branch information...
1 parent d03c93b commit 108e6cd1da6c93d240651e4cd0842ef48dc6db11 @PaulKinlan committed Aug 23, 2012
Showing with 10 additions and 4 deletions.
  1. +10 −4 tools/chrome/extensions/share-services/google+/launch.html
@@ -4,12 +4,18 @@
window.addEventListener("load", function() {
var intent = window.intent || window.webkitIntent;
if(intent) {
- if(intent.type == "text/uri-list") {
- var encodedUrl = encodeURIComponent(intent.data);
- document.location = "https://plus.google.com/share?url=" + encodedUrl;
+ var url;
+ if(intent.data instanceof String) {
+ url = intent.data;
}
+ else {
+ url = intent.data.url;
+ }
+
+ var encodedUrl = encodeURIComponent(url);
+ document.location = "https://plus.google.com/share?url=" + encodedUrl;
}
});
</script>
<body></body>
-</html>
+</html>

0 comments on commit 108e6cd

Please sign in to comment.