mohamedmansour / extended-share-extension

Extends the Google+ Share to many other Social Networks!
103 stars 25 forks source link

No buttons to share stuff are shown at all #54

Closed cspann closed 12 years ago

cspann commented 12 years ago

Hello,

I cannot see any possibility to share stuff on any of the networks I selected (Twitter, Facebook, LinkedIn). The extension just seems not to be working completely.

I reinstalled the extension twice, restarted the browser several times and also logged in to G+ twice. If you have any hints how to support you in debugging this I will be happy to supply any information required.

Regards, Christian

mohamedmansour commented 12 years ago

Hey @cspann, are the posts your sharing limited by any chance? What language is your Google+, is it English?

cspann commented 12 years ago

Hey @mohamedmansour,

thank you for your immediate reply. The posts are "Öffentlich" which translates to public. So I guess they are not limited. My Google+ is in German, does your extension not work for other languages?

cspann commented 12 years ago

Ok - the extension does not work for non English versions of Google+. :-/

mohamedmansour commented 12 years ago

yea :( I will see what to do about that, I know what needs to be changed, I wonder how did you change google+ versions so I can look into it when I have some time?

mohamedmansour commented 12 years ago

I need a better way doing this part in extended_injection.js

Injection.SHARE_BUTTON_SELECTOR = 'div[aria-label="Share this post"]';
Injection.HANGOUT_BUTTON_SELECTOR = 'div[aria-label="Start a hangout about this post"]';
Injection.STREAM_SHARING_DETAILS = 'span[title="Sharing details"]';
cspann commented 12 years ago

For the Injection.SHARE_BUTTON_SELECTOR = 'div[aria-label="Share this post"]'; e.g. I found out, that the class of the div seems to be the same all the time, and it is used only for this kind of button. For the other two it seems the same on my site. Check if they are the same on your Google+ DOM. Then you could use:

Injection.SHARE_BUTTON_SELECTOR = 'div[class="c-wa-Da HPvmqf Dd1jcf"]'; Injection.HANGOUT_BUTTON_SELECTOR = 'div[class="c-wa-Da HPvmqf uBbfTb"]'; Injection.STREAM_SHARING_DETAILS = 'span[class="c-C Lixzlc YQHDOd Nn ERIVId"]';

cspann commented 12 years ago

Ok - one other thing you need to change - as im not that into javascript im currently still working on it - the decision if a post is public has to depend on the class of the Injection.STREAM_SHARING_DETAILS span as the class differs for restricted and public. Because in German the content is obviously translated to something different (Öffentlich in our case).

mohamedmansour commented 12 years ago

I am kinda getting away from supporting obfuscated text, the way I want to do is use advanced CSS3 selectors to find / perhaps discover the areas. Discovering based on layout placement. For example, I can easily figure out where the navigation is, and just query for type button. Using obfuscated classnames is harder to maintain, cause they usually change .

cspann commented 12 years ago

Ok - got it.

Line 162 must be changed. I did it like this:

var isPublic = sharingDetails != null; // The returned element is null, when post is not public as the class differs then. //var isPublic = sharingDetails.innerText === 'Public';

I suggest to not show the dropdown at all if posts are non public. But on the other side then questions like mine will arise, if all posts are protected an the dropdown does appear nowhere. :-)

The only thing thats missing now is translation files for the Strings! ;)

cspann commented 12 years ago

Oh - i missed your last post. Seems a reasonable argument. But I must admit that i have no experience in using CSS3 selectors.

rfc1437 commented 12 years ago

Maybe as a first "hacky" solution to get us non-english g+ users back in would be to provide a field in the extension settings to set the title of the button to change for the extended share? That way us germans can just put in "Diesen Beitrag teilen" and could play again (yeah, I understand your wish to find a right solution, but I miss my sharing ;) )

fredzannarbor commented 12 years ago

I have this same issue -- cannot see any buttons at all -- but I am using English version of G+. can someone post me a troubleshooting flow?

mohamedmansour commented 12 years ago

@zimzaz @rfc1437 @cspann I have fixed this in 4456ca6b2bc85685ea08760b9b20213249cfeba5 I believe that should fix it for you guys, I will publish it to the gallery soon. Thanks for the bug report everyone :)

rfc1437 commented 12 years ago

Only halfway fixes it - the resharing button now shows up, but when I click it, it claims the post is not public (it is "Öffentlich" in german)

mohamedmansour commented 12 years ago

What happens when you visit options and enable limited?

rfc1437 commented 12 years ago

ok, enabling limited does work. I will have to pay attention to sharing limits myself, but it is a workaround.

mohamedmansour commented 12 years ago

@rfc1437 awesome, I know the problem :/ sigh.

line 166 in extended_injection.js, I match the word to "Public" there is no other way scraping it to get something else :/

var isPublic = sharingDetails.innerText === 'Public';

Let me add some translations, I have opened up this issue #58 hopefully I will get some time, I am travelling today (moving to a new place) so it will be hard argg let me see what I can do

mohamedmansour commented 12 years ago

@rfc1437 btw, is your Chrome browser in German, or just Google+?

mohamedmansour commented 12 years ago

@rfc1437 I did the first version of the translation here: d43804d7e28216edfd84180b8d52330ef98d5dd5

The problem now is that if you have English Chrome and German Google+, it will cause an issue. I added a request if we could add an extra option to the API to fetch language specific locales:

http://groups.google.com/a/chromium.org/group/chromium-extensions/browse_thread/thread/35481ba100137def#

rfc1437 commented 12 years ago

my chrome browser is in German, too (chrome has full localization for german). So probably it should work.