Skip to content

Instantly share code, notes, and snippets.

@sillygwailo
Created February 10, 2016 19:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save sillygwailo/10a6dff4ff9a64db886a to your computer and use it in GitHub Desktop.
Break out of Snip.ly frames
// ==UserScript==
// @name Break out of Snip.ly frames
// @version 0.1
// @include http://snip.ly/*
// @author Richard Eriksson
// ==/UserScript==
var current_hash = window.location.hash;
var destination_url = current_hash.slice(1);
// Thank you, Stack Overflow. http://stackoverflow.com/a/18970172/300278
// var current_location = window.location.href;
// var destination_url = current_location.substring(current_location.indexOf("#")+1);
// The other method in Stack Overflow: http://stackoverflow.com/a/3552952/300278
window.location = destination_url;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment