forked from mddub/urchin-cgm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
292 additions
and
86 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title></title> | ||
|
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
Copied directly from: | ||
http://clay.pebble.com.s3-website-us-west-2.amazonaws.com/ | ||
See https://github.com/pebble/clay/blob/4a6382/index.js#L152-L182 | ||
and app.js to understand its purpose. | ||
//--> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Config Page Emulator</title> | ||
</head> | ||
<script> | ||
function getQueryParam(variable, defaultValue) { | ||
var query = location.search.substring(1); | ||
var vars = query.split('&'); | ||
for (var i = 0; i < vars.length; i++) { | ||
var pair = vars[i].split('='); | ||
|
||
if (pair[0] === variable) { | ||
return decodeURIComponent(pair[1]); | ||
} | ||
} | ||
return defaultValue || null; | ||
} | ||
|
||
var returnTo = getQueryParam('return_to'); | ||
var data = decodeURIComponent(location.hash.substring(1)); | ||
|
||
// Check if we dealing with a base64 encoded URI | ||
if (data && data.charAt(0) !== '<') { | ||
data = window.atob(data).replace('$$RETURN_TO$$', returnTo); | ||
window.location.href = 'data:text/html;base64,' + encodeURIComponent(window.btoa(data)); | ||
} else if (data) { | ||
data = data.replace('$$RETURN_TO$$', returnTo); | ||
window.location.href = 'data:text/html;charset=utf-8,' + encodeURIComponent(data); | ||
} | ||
</script> | ||
<body> | ||
</body> | ||
</html> |
Oops, something went wrong.