Created
February 10, 2016 19:24
-
-
Save sillygwailo/10a6dff4ff9a64db886a to your computer and use it in GitHub Desktop.
Break out of Snip.ly frames
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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