forked from mhacks/mhacksF2014
-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_management.html
94 lines (88 loc) · 3.17 KB
/
user_management.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html>
<!-- This page is a passthrough frame used to host a parse.com experience from your server.
If you choose to use this feature, be sure to tell Parse where you put this page in your
app settings page.
In general, there should be no reason to edit the contents of this page -->
<head>
<style type='text/css'>
.chromeless {
width: 100%;
height: 100%;
left: 0px;
top: 0px;
border: 0px;
margin: 0px;
padding: 0px;
}
.scrollable {
overflow: auto;
}
.noscroll {
overflow: hidden;
}
h1, p {
padding: 15px;
color: #0067AB;
font: inherit;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica;
}
h1 {
font-size: 30px;
font-weight: 600;
}
</style>
<script language='javascript' type='text/javascript'><!--
window.onload = function() {
// When there are query strings, this page is being used to pass content onto parse. Create
// the iframe to do so. Forwards relevant query parameters onto the iFrame.
if (window.location.search) {
var urlParams = {};
(function () {
var pair, // Really a match. Index 0 is the full match; 1 & 2 are the key & val.
tokenize = /([^&=]+)=?([^&]*)/g,
// decodeURIComponents escapes everything but will leave +s that should be ' '
re_space = function (s) { return decodeURIComponent(s.replace(/\+/g, " ")); },
// Substring to cut off the leading '?'
querystring = window.location.search.substring(1);
while (pair = tokenize.exec(querystring))
urlParams[re_space(pair[1])] = re_space(pair[2]);
})();
var base = 'https://www.parse.com';
var link = '';
var query = '';
for (param in urlParams) {
if (param == 'link') {
link = urlParams['link'];
} else {
if (query != '') {
query += "&";
}
query += param + '=' + encodeURIComponent(urlParams[param]);
}
}
// Ensure there's a leading slash to avoid open redirect
if (link.charAt(0) !== "/") {
link = "/" + link;
}
var iframe = document.createElement('iframe');
iframe.setAttribute('src', base + link + '?' + query);
iframe.setAttribute('class', 'chromeless scrollable');
document.getElementById('content').appendChild(iframe);
// Otherwise, this page is likely being viewed by the app owner. Explain how to use it.
} else {
document.getElementById('content').innerHTML =
'<h1>This page lets you host Parse.com content from your own domain.</h1>' +
'<p>Right click <a href="' + window.location.pathname + '">here</a> to save this page. ' +
'Upload it to your own website and paste the URL in the "Parse Frame URL" ' +
'app settings at Parse.com.</p>';
}
}
//-->
</script>
</head>
<body class='chromeless noscroll'>
<noscript>We apologize, but user management requires javascript</noscript>
<div id='content' class='chromeless noscroll'></div>
</body>
</html>