Add Google +1 button to any site with this GreaseMonkey script

Yup. Now you can add yourself, from your browser, the Google  +1 button to all every site you visit.
It's the very fisrt version, and it needs much improvement.
I'm thinking of triggering it from a keyboard shortcut and adding some more features.

If you don't know how to use it yet, just check out the tutorial I wrote here, the steps are the same :)

Here is the little bugger, just for you guys:

_______________________________________

 

// ==UserScript==
// @name           PlusOneEverything
// @namespace      PlusOneEverything
// @include        *
// ==/UserScript==

if (window.top == window.self)
 {


var oHead = document.getElementsByTagName('HEAD').item(0);
var oScript= document.createElement("script");
oScript.type = "text/javascript";
oScript.src="https://apis.google.com/js/plusone.js";
oHead.appendChild( oScript);

var oBody = document.getElementsByTagName('body').item(0);
var oButton= document.createElement("div");
oButton.style.position = "fixed";
oButton.style.zIndex = "10000";
oButton.style.top = "25px";
oButton.style.left = "15px";
oButton.innerHTML = "<g:plusone></g:plusone>";
oBody.appendChild( oButton );
}

_______________________________________

I'll turn that into a Firefox extension soon. Stay tuned :)

 

Posted via email from @Danny_Fr

0 Responses to "Add Google +1 button to any site with this GreaseMonkey script"

Post a Comment

Tell me how much you hate it.