Skip to content

Instantly share code, notes, and snippets.

@robbyrussell
Created October 24, 2008 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robbyrussell/19345 to your computer and use it in GitHub Desktop.
Save robbyrussell/19345 to your computer and use it in GitHub Desktop.
Replaces the select to copy html to not include the 'uploaded with plasq's skitch' references. makes LOLBugz less noisey
// ==UserScript==
// @name SkitchEmbedder
// @namespace skitch
// @description Robby Russell's hack to remove skitch crap from the embed HTML
// @include http://skitch.com/*
// ==/UserScript==
// clear out the sidebar
sidebar = document.getElementById( 'selectcopycontainer_3_div' );
sidebar.innerHTML = '';
// clear out a few ads...
rightbottom = document.getElementById( 'rightbarbottom' ).innerHTML = '';
bottomad = document.getElementById( 'bottomad' ).innerHTML = '';
skitch_image = document.getElementById( 'image_12_img' ).src;
skitch_thumbnail = skitch_image.replace( /\.jpg/, '.preview.jpg' );
skitch_title = document.getElementById( 'section_10_div' ).innerHTML;
skitch_url = document.URL;
plasq = unsafeWindow['plasq'];
plasq.mySkitch.selectCopyContainer.addSelectCopy( 'Embed!', '<div class="thumbnail"><a href="' + skitch_url + '"><img src="' + skitch_thumbnail + '" alt="' + skitch_title + '" /></a></div>', 'skitch embed without the cruft' );
plasq.mySkitch.selectCopyContainer.addSelectCopy( 'This page', skitch_url, 'Link to the page you are looking at <b>right now</b>! :)' );
plasq.mySkitch.selectCopyContainer.addSelectCopy( 'Direct URL', skitch_image, '<b>Direct link</b> into your email, chat, etc. (If you are not sure, use this)' );
plasq.mySkitch.selectCopyContainer.addSelectCopy( 'Fullsize', '<img src="' + skitch_image + '" alt="' + skitch_title + '"/>', 'HTML to show the <b>fullsize</b> image' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment