Skip to content

Commit c5d7e16

Browse files
committed
Further bugfixes on pre-send check and warning
1 parent 58fbd25 commit c5d7e16

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

i18n/en.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ FeedbackPage:
169169
Heading: We are not the Scratch Team.
170170
Description: Keep in mind that Scratch Addons is not affiliated with the Scratch website or the organizations that maintain it. You are still welcome to give ideas to improve your experience on Scratch with Scratch Addons.
171171
Punishment:
172-
Heading: We can't punish people. We are not the Scratch Team. <br>
172+
Heading: We can't punish people. We are not the Scratch Team.
173173
Description: "Scratch Addons is not affiliated with the Scratch website or the organizations that maintain it. We have no control of the content and the moderation on the Scratch website. {{ .Tag1Start }}There are many ways that you can report on the Scratch website.{{ .Tag1End }}"
174174

175175
# Strings used for /scratch-messaging-transition

layouts/shortcodes/specifics/feedback-form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
<input type="checkbox" id="feedback-addons-list" class="form-check-input" checked>
4242
<label class="form-check-label" for="feedback-addons-list">{{ T "FeedbackPage.SendEnabled" }}</label>
4343
</div>
44-
<button class="btn btn-primary" id="feedback-submit">{{ T "FeedbackPage.SubmitButton" }}</a>
44+
<button class="btn btn-primary" id="feedback-submit" type="button">{{ T "FeedbackPage.SubmitButton" }}</a>
4545
</form>

static/assets/js/feedback.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ const setPreSendWarning = (heading, description) => {
116116
holdSendButton(5)
117117
}
118118

119-
for (const variation in variations) {
120-
const variationObj = i18n.preSendWarning.variations[variation]
121-
// for (const key in variationObj) {
122-
// variationObj[key] = DOMPurify.sanitize(variationObj[key])
123-
// }
124-
}
119+
// for (const variation in variations) {
120+
// const variationObj = i18n.preSendWarning.variations[variation]
121+
// for (const key in variationObj) {
122+
// variationObj[key] = DOMPurify.sanitize(variationObj[key])
123+
// }
124+
// }
125125
const punishment = i18n.preSendWarning.variations.punishment
126126
punishment.description = punishment.description.replace(window.i18nTimestamp + 1, '<a href="https://en.scratch-wiki.info/wiki/Report">').replace(window.i18nTimestamp + 2, '</a>')
127127

@@ -197,5 +197,6 @@ contentField.addEventListener("input", event => {
197197
})
198198

199199
startUpServer()
200+
submitButton.type = "submit"
200201

201202
window.addEventListener("load", () => document.querySelector("textarea").focus());

0 commit comments

Comments
 (0)