JS fixes.
This commit is contained in:
parent
648b1ac5eb
commit
a5d10e9bb1
3 changed files with 3 additions and 3 deletions
|
@ -101,7 +101,7 @@ function colourFromRGB(red: number, green: number, blue: number): number {
|
|||
}
|
||||
|
||||
function colourFromHex(hex: string): number {
|
||||
if(hex.startsWith('#'))
|
||||
if(hex.indexOf('#') === 0)
|
||||
hex = hex.substr(1);
|
||||
|
||||
const length: number = hex.length;
|
||||
|
|
|
@ -232,7 +232,7 @@ function commentConstruct(comment: CommentPostInfo, layer: number = 0): HTMLElem
|
|||
<form id={"comment-reply-" + comment.comment_id} class="comment comment--input comment--reply" method="post"
|
||||
action="javascript:void(0);" onSubmit={commentPostEventHandler}>
|
||||
<input type="hidden" name="comment[category]" value={comment.category_id} />
|
||||
<input type="hidden" name="csrf[comments]" value={getCSRFToken('comments')} />
|
||||
<input type="hidden" name="csrf[comments]" value={getCSRFToken()} />
|
||||
<input type="hidden" name="comment[reply]" value={comment.comment_id} />
|
||||
<div class="comment__container">
|
||||
<div class="avatar comment__avatar"
|
||||
|
|
|
@ -122,6 +122,6 @@ function userRelationSet(
|
|||
});
|
||||
xhr.open('GET', urlFormat('user-relation-create', [{name: 'user', value: userId}, {name: 'type', value: relationType.toString()}]));
|
||||
xhr.setRequestHeader('X-Misuzu-XHR', 'user_relation');
|
||||
xhr.setRequestHeader('X-Misuzu-CSRF', getCSRFToken('user_relation'));
|
||||
xhr.setRequestHeader('X-Misuzu-CSRF', getCSRFToken());
|
||||
xhr.send();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue