Skip to main content
 

John Hjelmstad / Jonathan Beri - same deal as sign in button...  let's incorporate it...

2 min read

John Hjelmstad / Jonathan Beri - same deal as sign in button...  let's incorporate it...

Originally shared by Gerwin Sturm

As you might have noticed I invested quite some time in Polymer recently. What I like about web components is that they make a lot of things a lot easier, except...

Normally adding a +1 button (or any other Google+ plugin) to a website is just about the easiest thing you can do.

1. Take the code snippet from the docs, e.g. https://developers.google.com/+/web/+1button/

2. Paste it in your code at the appropriate place.

3. Done.

Unfortunately the gapi JS library doesn't like to work with the Shadow DOM. Even if you pass in a direct reference to an element inside of your element it won't work.

The (https://github.com/GoogleWebComponents/google-hangout-button/) works around this issue by adding an element to the light DOM, telling gapi to render the button there, then snatching the element and sending it to the shadow realm dom.

Since there are a lot more widgets to choose from, I took this idea and started by creating a generic element that takes `type` and `data` as attributes to render the appropriate plugin, using the same idea as the hangout-button.

So for the default +1 button you could just use

Or for a profile badge you would use

From there I started to create specific elements, that have the relevant attributes for each plugin.

For now there are only two but others are easy to add:

(the profile attribute will be used to build the href attribute needed by the profile widget)

The plugins still aren't really happy inside of the shadow dom, displaying some errors in the console, and not all interaction seems to be working correctly.

I have some other ideas I will test to improve this, but maybe the gapi team will eventually support Shadow DOM properly ;)

For now these elements work better than not working at all :)

Source code: https://github.com/Scarygami/google-plugins

Docs: http://scarygami.github.io/google-plugins/components/google-plugins/

Demo: http://scarygami.github.io/google-plugins/components/google-plugins/demo.html

 

This simple OSX utility is handy.  You can keep windows on top, change transparency and more.

1 min read

This simple OSX utility is handy.  You can keep windows on top, change transparency and more.

This allows me to have my Keep todo list always on top, and stop hangout windows from staying on top.

 

Check this out.

1 min read

Check this out.  Mark Mallman is webcasting a trippy musical composition based on his own brain waves and bio-signals, from the van, 24/7 for a week.  Check out the live stream at this link:

http://m4.qwikcast.tv/gallery/m4-live/

... and if there's a Marathon V I hope they opt for a hangout based solution.  It'd be great to get collaboration while on the road.

 

I asked what time zone on the original post.

1 min read

I asked what time zone on the original post.  Not sure, but people think it's 6:30 UK time which is in about an hour from now.

Originally shared by Google UK

Watch a live Google+ Hangout with Rafa Nadal, tonight at 6.30. .  

 

Would people be interested in a periodic hangout where me and my weekly Google guest makeover your web site with...

1 min read

Would people be interested in a periodic hangout where me and my weekly Google guest makeover your web site with Googley features? We'd have a special guest each time and go over things like authorship markup, security, performance, APIs, widgets etc?

+1 this post if you're interested. Feel free to nominate your favorite site you'd like me to put under the microscope in the comments...

[nifty CC BY-NC-SA 2.0 photo from flickr user spike55151]

 

Paul Lindner had a hangout. {url}Paul Lindner

1 min read

Paul Lindner had a hangout. {url}Paul Lindner

 

Paul Lindner had a hangout. {url}Paul Lindner

1 min read

Paul Lindner had a hangout. {url}Paul Lindner

 

Paul Lindner had a hangout. {url}Paul Lindner

1 min read

Paul Lindner had a hangout. {url}Paul Lindner