Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22398383
user.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
user.html
View Options
<!DOCTYPE html>
<
html
>
<
head
>
<
script
src
=
"/jquery.js"
></
script
>
<
meta
charset
=
"utf-8"
>
<
title
>
Dane użytkownika
</
title
>
<
style
>
html
{
background-color
:
gray
;
}
body
{
padding
:
20
px
;
background-color
:
white
;
font-family
:
sans-serif
;
max-width
:
50
rem
;
margin
:
0
auto
;
}
</
style
>
</
head
>
<
body
>
<
center
><
h1
>
Dane użytkownika:
<
span
class
=
"insert-conversation-name"
></
span
></
h1
></
center
>
<
ul
id
=
"dane"
>
</
ul
>
<
button
id
=
"confirm"
onclick
=
"changeData()"
>
Zapisz
</
button
>
</
body
>
<
script
>
var
user_name
=
document
.
location
.
hash
.
slice
(
1
);
var
base_url
=
"/api/v1/user/"
+
user_name
;
console
.
log
(
base_url
);
function
checkData
(){
$
(
"#dane"
).
html
(
""
);
$
.
get
(
base_url
,
function
(
data
)
{
console
.
log
(
data
);
var
entry
=
data
;
var
node
=
$
(
"<li>Username: <input type='text' id='username' value='"
+
entry
.
username
+
"'></li>"
);
$
(
"#dane"
).
append
(
node
);
});
}
function
updateData
(){
var
username
=
$
(
"#username"
).
val
();
$
.
ajax
({
url
:
'/api/v1/user'
,
data
:
{
username
:
username
,
new_user_data
:
{
username
:
username
}
},
type
:
'PUT'
,
success
:
function
(
result
){
checkData
();
}
});
}
checkData
();
</
script
>
</
html
>
File Metadata
Details
Attached
Mime Type
text/html
Expires
Fri, Nov 27, 17:22 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1226798
Default Alt Text
user.html (1 KB)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline