Skip to content

Instantly share code, notes, and snippets.

@cheeaun
Created March 21, 2009 03:47
Show Gist options
  • Save cheeaun/82717 to your computer and use it in GitHub Desktop.
Save cheeaun/82717 to your computer and use it in GitHub Desktop.
Custom Buttons JS
var width = 550;
var height = 550;
var left = parseInt( ( screen.availWidth / 2 ) - ( width / 2 ) );
var top = parseInt( ( screen.availHeight / 2 ) - ( height / 2 ) ) - 20;
var url = encodeURIComponent(content.location.href);
var title = encodeURIComponent(content.document.title);
var f = 'http://delicious.com/save?url=' + url + '&title=' + title + '&v=5&';
if (!content.open(f + 'noui=1&jump=doclose', 'deliciousuiv5', 'location=yes,links=no,scrollbars=no,toolbar=no,top=' + top + ',left=' + left + ',width=' + width + ',height=' + height)) location.href = f+'jump=yes';
var width = 900;
var height = 380;
var left = parseInt( ( screen.availWidth / 2 ) - ( width / 2 ) );
var top = parseInt( ( screen.availHeight / 2 ) - ( height / 2 ) ) - 20;
var url = encodeURIComponent(content.location.href);
var f='http://tr.im/marklet?url=' + url;
if (!content.open(f, 'trim', 'location=yes,links=no,toolbar=no,top=' + top + ',left=' + left + ',width=' + width + ',height=' + 380 + ',resizable=yes')) location.href = f + 'jump=yes';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment