Skip to content

Instantly share code, notes, and snippets.

@tomashanacek
tomashanacek / Fit artboard to selection.sketchplugin
Last active August 29, 2015 14:03
Fit artboard to selection
var currentArtboard = [[[doc currentPage] artboards] firstObject];
var layers = selection;
var bounds = getBoundsForLayers(layers);
for (var i = 0, len = [layers count]; i < len; ++i) {
var layer = [layers objectAtIndex:i];
@tomashanacek
tomashanacek / gist:3859995
Created October 9, 2012 16:49
iframe redirect problem
if (window.top != window.self) {
window.top.location = window.self.location;
}