Mobile Bookmark Bubble
@okamototk, has done some great work to make Google bookmark bubble more compatible with other devices. Get his code here: https://github.com/okamototk/jqm-mobile-bookmark-bubble.
It's very easy to attach the event listener and set a hash parameter, so that the bubble doesn't keep annoying your users. The example below will load the bubble 1 second after the page has loaded if the hash doesn't exist in localStorage.
window.addEventListener('load', function() {
window.setTimeout(function() {
var bubble = new google.bookmarkbubble.Bubble();
var parameter = 'popup_bubble';
bubble.hasHashParameter = function() {
return window.localStorage[parameter];
};
bubble.setHashParameter = function() {
if (!this.hasHashParameter()) {
window.localStorage[parameter] = 1;
}
};
bubble.showIfAllowed();
}, 1000);
}, false);
Written by Kevin Perrine
Related protips
1 Response
Hi There, can you help on how to implement those code on blogger?
Thanks in advance.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Filed Under
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#