Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing issues with Share

  • Loading branch information...
commit 603bc0b5d187c00ec45fa6105ee49c4d3fe7d38d 1 parent 004d558
Paul Kinlan authored
View
3  tools/chrome/extensions/share-services/google+-manifest.json
@@ -1,5 +1,6 @@
{
"name": "Share to Google+",
+ "manifest_version": 2,
"version": "0.0.1",
"icons" : {
"16" : "favicon.ico",
@@ -8,7 +9,7 @@
"intents" : {
"http://webintents.org/share" : [
{
- "type" : ["text/uri-list"],
+ "type" : ["text/*"],
"title" : "Share to Google+",
"href" : "/launch.html"
}
View
BIN  tools/chrome/extensions/share-services/google+.crx
Binary file not shown
View
3  tools/chrome/extensions/share-services/google+/manifest.json
@@ -1,5 +1,6 @@
{
"name": "Share to Google+",
+ "manifest_version": 2,
"version": "2012.106.126.11912",
"icons" : {
"16" : "favicon.ico",
@@ -8,7 +9,7 @@
"intents" : {
"http://webintents.org/share" : [
{
- "type" : ["text/uri-list"],
+ "type" : ["text/*"],
"title" : "Share to Google+",
"href" : "/launch.html",
"disposition": "inline"
View
1  tools/chrome/extensions/share-services/twitter-manifest.json
@@ -1,6 +1,7 @@
{
"name": "Share Link to Twitter™",
"version": "1.0.0.3",
+ "manifest_version": 2,
"icons" : {
"16": "favicon.ico",
"128" : "128.png"
View
3  tools/chrome/extensions/share-services/twitter/manifest.json
@@ -1,13 +1,14 @@
{
"name": "Share Link to Twitter™",
"version": "2012.106.126.11912",
+ "manifest_version": 2,
"icons" : {
"16": "favicon.ico",
"128" : "128.png"
},
"intents": {
"http://webintents.org/share" : [{
- "type" : ["text/uri-list", "text/plain"],
+ "type" : ["text/uri-list", "text/plain", "text/html"],
"href" : "/twitter_inline.html",
"title" : "Share link to Twitter"
}]
View
25 tools/chrome/extensions/share-services/twitter/twitter_inline.html
@@ -4,24 +4,17 @@
<script>
var intent = window.intent || window.webkitIntent;
if(intent) {
- if(intent.type === "text/uri-list") {
- var url;
- if(intent.data instanceof String) {
- url = intent.data;
- }
- else {
- url = intent.data.url;
- }
-
- var href = "https://twitter.com/intent/tweet?url=" + encodeURIComponent(url);
-
- window.location = href;
+ var url;
+ if(intent.data instanceof String) {
+ url = intent.data;
}
- else if(intent.type === "text/plain") {
- var href = "https://twitter.com/intent/tweet?text=" +
- encodeURIComponent(intent.data);
- window.location = href;
+ else {
+ url = intent.data.url;
}
+
+ var href = "https://twitter.com/intent/tweet?url=" + encodeURIComponent(url);
+
+ window.location = href;
}
</script>
</head>
Please sign in to comment.
Something went wrong with that request. Please try again.