[deploy] Small mod fixes (#8885)

This commit is contained in:
Ben Halpern 2020-06-24 10:45:11 -04:00 committed by GitHub
parent 757e611f6d
commit 26d54e72cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -159,13 +159,13 @@ function renderTagOnArticle(tagName, colors) {
.getElementById('quick-mod-article')
.contentDocument.getElementsByClassName('tags');
} else {
[articleTagsContainer] = top.document.getElementsByClassName('tags');
[articleTagsContainer] = top.document.getElementsByClassName('spec__tags');
}
/* eslint-enable no-restricted-globals */
const newTag = document.createElement('a');
newTag.innerText = `#${tagName}`;
newTag.setAttribute('class', 'tag');
newTag.setAttribute('class', 'crayons-tag mr-1');
newTag.setAttribute('href', `/t/${tagName}`);
newTag.style = `background-color: ${colors.bg}; color: ${colors.text};`;
@ -213,7 +213,7 @@ async function adjustTag(el) {
} else {
// eslint-disable-next-line no-restricted-globals
const tagOnArticle = top.document.querySelector(
`.tag[href="/t/${adjustedTagName}"]`,
`.crayons-tag[href="/t/${adjustedTagName}"]`,
);
tagOnArticle.remove();
}

View file

@ -63,7 +63,7 @@
</span>
<% action = comment.hidden_by_commentable_user ? "Unhide" : "Hide" %>
<span class="comment-actions hidden" data-action="hide-button" data-commentable-user-id="<%= commentable.user_id %>" data-user-id="<%= comment.user_id %>" style="display: none; width: 100%;">
<a class="crayons-link crayons-link--block hide-comment" data-hide-type="<%= action.downcase %>" data-comment-id="<%= comment.id %>">
<button class="crayons-link crayons-link--block hide-comment" data-hide-type="<%= action.downcase %>" data-comment-id="<%= comment.id %>">
<%= action %>
</button>
</span>