Skip to content

Commit

Permalink
various nitpicks
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Jul 3, 2023
1 parent c7fa348 commit 4e52210
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
18 changes: 8 additions & 10 deletions extensions/godslayerakp/http.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function(Scratch) {
'use strict';
if (!Scratch.extensions.unsandboxed) throw 'can not load out side unsandboxed mode';
if (!Scratch.extensions.unsandboxed) throw new Error('can not load out side unsandboxed mode');

const pathRegex = /[^.]+/g;
const setType = (value, type) => {
Expand Down Expand Up @@ -211,7 +211,7 @@
getInfo() {
return {
id: extensionId,
name: 'http/https',
name: 'HTTP',
color1: '#307eff',
color2: '#2c5eb0',
blocks: [
Expand All @@ -222,7 +222,7 @@
},
{
blockType: Scratch.BlockType.LABEL,
text: "response"
text: 'Response'
},
{
opcode: 'resData',
Expand Down Expand Up @@ -292,7 +292,7 @@
},
{
blockType: Scratch.BlockType.LABEL,
text: "request"
text: "Request"
},
{
opcode: 'setMimeType',
Expand Down Expand Up @@ -360,21 +360,21 @@
arguments: {
url: {
type: ArgumentType.STRING,
defaultValue: 'https://dummyurl.com'
defaultValue: 'https://extensions.turbowarp.org/hello.txt'
}
},
text: 'send request to [url]'
},
{
func: 'showExtra',
blockType: BlockType.BUTTON,
text: 'show extra',
text: 'Show Extra',
hideFromPalette: this.showingExtra
},
{
func: 'hideExtra',
blockType: BlockType.BUTTON,
text: 'hide extra',
text: 'Hide Extra',
hideFromPalette: !this.showingExtra
},
{
Expand Down Expand Up @@ -594,7 +594,6 @@
this.clearAll();

this.response.url = url;
// @ts-ignore
Scratch.fetch(url, this.request.options)
.then(res => {
// @ts-ignore
Expand Down Expand Up @@ -670,5 +669,4 @@

const instance = new WebRequests();
Scratch.extensions.register(instance);
// @ts-ignore
})(Scratch);
})(Scratch);
12 changes: 6 additions & 6 deletions website/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,12 @@
<p>Use the power of dictionaries in your project. Created by <a href="https://scratch.mit.edu/users/lolecksdeehaha/">Vercte</a>.</p>
</div>
<div class="extension">
<%- banner('godslayerakp/http') %>
<h3>http/https</h3>
<p>Extension HTTP extension. Created by <a href="https://scratch.mit.edu/users/RedMan13/">RedMan13</a>.</p>
</div>
<div class="extension">
<%- banner('Lily/CommentBlocks') %>
<h3>Comment Blocks</h3>
Expand Down Expand Up @@ -721,12 +727,6 @@
<h3>McUtils</h3>
<p>Helpful utilities for any fast food employee. Created by <a href="https://scratch.mit.edu/users/LilyMakesThings/">LilyMakesThings</a>.</p>
</div>
<div class="extension">
<%- banner('godslayerakp/http') %>
<h3>http/https</h3>
<p>(mostly) the entirety of http implemented into an ext! made by <a href="https://scratch.mit.edu/users/RedMan13/">RedMan13 (godslayerakp)</a>.</p>
</div>
</div>
</div>
Expand Down

0 comments on commit 4e52210

Please sign in to comment.