Skip to content

Commit afb2223

Browse files
committed
fixing from #hash to ?search
1 parent 5e9fbff commit afb2223

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

buildme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
function buildit() {
66
var src = $source.val();
77
src = btoa(src);
8-
$showmeurl.val("http://getify.github.io/showme.html#data:text/html;charset=utf-8;base64," + src);
8+
$showmeurl.val("http://getify.github.io/showme.html?" + encodeURIComponent("data:text/html;charset=utf-8;base64," + src));
99
}
1010

1111
var $source, $showmeurl;

showme.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
(function(global){
44
var str;
5-
if (document.location.hash) {
6-
str = document.location.hash.replace(/^#/,"");
5+
if (document.location.search) {
6+
str = decodeURIComponent(document.location.search.replace(/^\?/,""));
77
if (str.match(/^data:text\/html.*?base64,/)) {
88
str = str.replace(/^data:text\/html.*?base64,/,"");
99
str = atob(str);

0 commit comments

Comments
 (0)