Skip to content

Instantly share code, notes, and snippets.

@khajavi
Created May 22, 2012 17:07
Show Gist options
  • Save khajavi/2770314 to your computer and use it in GitHub Desktop.
Save khajavi/2770314 to your computer and use it in GitHub Desktop.
(mpo=document.getElementById("myplusone"))?mpo.style.display=mpo.style.display=="block"?"none":"block":(bgs="background:rgb(174,188,191);background:-moz-linear-gradient(top,rgba(174,188,191,1)0%,rgba(110,119,116,1)50%,rgba(10,14,10,1)51%,rgba(10,8,9,1)100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(174,188,191,1)),color-stop(50%,rgba(110,119,116,1)),color-stop(51%,rgba(10,14,10,1)),color-stop(100%,rgba(10,8,9,1)));background:-webkit-linear-gradient(top,rgba(174,188,191,1)0%,rgba(110,119,116,1)50%,rgba(10,14,10,1)51%,rgba(10,8,9,1)100%);background:-o-linear-gradient(top,rgba(174,188,191,1)0%,rgba(110,119,116,1)50%,rgba(10,14,10,1)51%,rgba(10,8,9,1)100%);background:-ms-linear-gradient(top,rgba(174,188,191,1)0%,rgba(110,119,116,1)50%,rgba(10,14,10,1)51%,rgba(10,8,9,1)100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#aebcbf',endColorstr='#0a0809',GradientType=0);background:linear-gradient(top,rgba(174,188,191,1)0%,rgba(110,119,116,1)50%,rgba(10,14,10,1)51%,rgba(10,8,9,1)100%);",bgsx="background:rgb(243,197,189);background:-moz-linear-gradient(top,rgba(243,197,189,1)0%,rgba(232,108,87,1)50%,rgba(234,40,3,1)51%,rgba(255,102,0,1)75%,rgba(199,34,0,1)100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(243,197,189,1)),color-stop(50%,rgba(232,108,87,1)),color-stop(51%,rgba(234,40,3,1)),color-stop(75%,rgba(255,102,0,1)),color-stop(100%,rgba(199,34,0,1)));background:-webkit-linear-gradient(top,rgba(243,197,189,1)0%,rgba(232,108,87,1)50%,rgba(234,40,3,1)51%,rgba(255,102,0,1)75%,rgba(199,34,0,1)100%);background:-o-linear-gradient(top,rgba(243,197,189,1)0%,rgba(232,108,87,1)50%,rgba(234,40,3,1)51%,rgba(255,102,0,1)75%,rgba(199,34,0,1)100%);background:-ms-linear-gradient(top,rgba(243,197,189,1)0%,rgba(232,108,87,1)50%,rgba(234,40,3,1)51%,rgba(255,102,0,1)75%,rgba(199,34,0,1)100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c5bd',endColorstr='#c72200',GradientType=0);background:linear-gradient(top,rgba(243,197,189,1)0%,rgba(232,108,87,1)50%,rgba(234,40,3,1)51%,rgba(255,102,0,1)75%,rgba(199,34,0,1)100%);",div=document.createElement("div"),div.id="myplusone",div.style.cssText=bgs,div.style.display="block",div.style.position="fixed",div.style.top="8px",div.style.right="8px",div.style.zIndex="9999",div.style.padding="5px",div.style.webkitUserSelect="none",div.style.textAlign="center",e=document.createElement("div"),e.setAttribute("class","g-plusone"),e.setAttribute("data-size","small"),div.appendChild(e),x=document.createElement("div"),x.style.cssText=bgsx,x.style.fontFamily="Arial",x.style.color="#FFFFFF",x.style.border="1px solid #FFFFFF",x.style.fontSize="12px",x.style.position="fixed",x.style.top="0px",x.style.right="0px",x.style.fontWeight="bold",x.style.cursor="pointer",x.innerHTML="x",x.onclick=function(){div.style.display="none"},div.appendChild(x),document.body.appendChild(div),e=window.document.createElement("script"),e.setAttribute("src","https://apis.google.com/js/plusone.js"),e.innerHTML="{lang: 'en-GB'}",document.head.appendChild(e),d2=document.createElement("div"),div.appendChild(d2),d2.style.cssText="color:#FFF;font-family:sans-serif;font-weight:bold;text-align:center;text-decoration:none;cursor:pointer;",d2.innerHTML="Share",d2.onclick=function(){(mpo=document.getElementById("mygp1share"))?mpo.style.display=mpo.style.display=="block"?"none":"block":s=document.createElement("script");s.type="text/javascript";document.body.appendChild(s);s.src="file:///home/milad/source/gplus/share.js"});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment