Hello, coding and Scratching guys,
as you saw, my website returns:
class Scratchables {
getInfo() {
return {
color1: "#f9a83a",
color2: "#c7862e",
id: "Scratchables",
name: "Scratchables!",
description: "A collab between Scratchers 'n' Replers made by Rix",
blocks: [
{
opcode: "rix",
blockType: Scratch.BlockType.REPORTER,
text: ":>°^",
arguments: {}
}
]
}
}
rix(args) {
return "\n"
}
}
Scratch.extensions.register(new Scratchables())
Notice that ":>°^", that it's not ":>°^"? Because, in the script, it
is ":>°^"... Oh, and, um, here's my code:
########################
# CODED BY RIX #
# DO NOT EDIT YOURSELF #
########################
from flask import Flask, make_response, send_from_directory
app = Flask("app")
@app.route("/")
def main():
resp = make_response(open("source.js", "r", encoding="utf-8").read().replace("Â", ""))
print(resp.headers)
resp.headers["content-type"] = resp.headers["accept"] = "text/javascript"
resp.headers["content-type"] += "; charset=utf8"
print(resp.headers)
return resp
@app.route("/<path:file>")
def source(file):
return send_from_directory(".", "source.js")
app.run(host="0.0.0.0", port=8080)
What I have tried: