Created
October 30, 2012 14:26
-
-
Save maltoe/3980464 to your computer and use it in GitHub Desktop.
Extract links from google referrer
This file contains 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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script> | |
$(function() { | |
$("#degooglefy").click(function() { | |
var inpt = $("#link"); | |
var url = (inpt.val().match(/url=(.*?)&/)[1]).replace(/%3A/g, ":").replace(/%2F/g, "/"); | |
inpt.val(url); | |
}); | |
}); | |
</script> | |
<style> | |
input { width: 100%; } | |
</style> | |
</head> | |
<body> | |
<input id="link"></input> | |
<button id="degooglefy">Degooglefy</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment