A question: gapi.plusone.go

In the present English version of the blog the javascript pop-up windows have ceased to work since yesterday (e.g. here), while in the Hungarian version they work merrily on (e.g. here). I have checked the source code, and I found that in the English version the following javascript has been included without my intervention:

<script src='https://apis.google.com/js/plusone.js'>{'lang': 'es', 'parsetags': 'explicit'}</script><script type='text/javascript'>gapi.plusone.go();</script>

If I remove this script, the pop-up windows work again. The problem is that I do not know how to remove it from the source of the blog. It cannot be found in the html version of the blog template, so it must come from somewhere deeper. I have posted a question to Blogger’s forum, but received no reply yet. However, I see there that it has come into conflict with others’ Javascript applications as well, and he also did not get a convincing reply.

Does anyone know what this is and what might be the solution?

4 comentarios:

Giacomo Ponzetto dijo...

It's the Google "+1 button, an easy way for Google users to recommend your content right from the search results pages (and, soon, from your site)." Here is the official blurb from Google.

I don't think it is (supposed to be) working on Blogger yet, but Google is laying the groundwork (cf. here).

Douglas Kretzmann dijo...

oddly enough the javascript popups work fine on my installs of Firefox v401 and Chrome v11.0.696.71 ?
I checked the source and the gapi.plusone is there as you noted, still the popups are working normally.

Since Google is injecting this code from deep within the secret Blogger compound; and it's not accessible from the user-controllable features of Blogger; it's going to be very hard to disable. It might be possible to add something in the "post template" found in Blogger, Settings, Formatting tab. But this needs a way to disable that specific plusone.js script from CSS, and I can't find a way to do that.. It's possible to disable the display of the results of javascript, but this plusone.js isn't displaying anything.

Also Blogger isn't being consistent, as that code is not being added to my blog pages. Hm.

It's likely this plusone code is moving fast, as do most Google features, so it might be fixed in a couple of days.. we'll hope.

Otherwise this code might work, but I have not tested it..

Studiolum dijo...

Thank you, Giacomo, and sorry, Douglas, that I did not write it before: yesterday an informatician reader of the Hungarian version resolved the question. The code was in fact the Google+1 button, or at least a preparation for that, and Río Wang was apparently selected for testing it together with a couple of thousand (and not more) other blogs. He proposed a way to modify the javascript I am using for the popups so it does not get into conflict with the Google script, and since then the popups work again in the blog. (In fact, at the end of the caption of the map of Crimea in the most recent post I have included a footnote with a thanks to him.)

What is strange, however, is that Google brutally violates the logic of the flexible blog templates by including this fixed element of which I cannot even change the place.

Douglas Kretzmann dijo...

"Google brutally violates the logic of the flexible blog templates.."

Google gives us lots of nice things for free, and I believe their intentions are mostly good: but it is a profit-seeking missile like any other corporation. This plusone (double-plus ungood) button is part of an attempt to catch up in the social networking stakes, in which they feel hobbled and vulnerable. I suspect they are moving fast and carelessly with this.