-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sitebuilder extension #11
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/lib/extensions.js
Outdated
name: "Site Builder", // The name of the extension. | ||
description: "Extension for making basic websites with PenguinMod blocks. Do know that this extension isn't completely done yet, I have plans to add more blocks to simplify making sites.", // The description for the extension. | ||
code: "minidogg/sitebuilder.js", // The folder and file name for the code of the extension. | ||
banner: "minidogg/site builder extension banner.png", | ||
creator: "minidogg", // Your username. Adds a link to your profile. | ||
isGitHub: true, // Optional. false means this is your Scratch username, true means this is your GitHub username. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: "Site Builder", // The name of the extension. | |
description: "Extension for making basic websites with PenguinMod blocks. Do know that this extension isn't completely done yet, I have plans to add more blocks to simplify making sites.", // The description for the extension. | |
code: "minidogg/sitebuilder.js", // The folder and file name for the code of the extension. | |
banner: "minidogg/site builder extension banner.png", | |
creator: "minidogg", // Your username. Adds a link to your profile. | |
isGitHub: true, // Optional. false means this is your Scratch username, true means this is your GitHub username. | |
name: "Site Builder", | |
description: "Extension for making basic websites with PenguinMod blocks.", | |
code: "minidogg/sitebuilder.js", | |
banner: "minidogg/site builder extension banner.png", | |
creator: "minidogg", | |
isGitHub: true, |
No need to leave all these comments in here, it'd just be more information to send
//colors | ||
color1: '#7e69beff', | ||
color2: '#3a286f', | ||
docsURI: 'https://github.com/minidogg/my-penguinmod-extensions/blob/88ff87b8fff13b4e601415d94b201f12c6d475fc/site%20builder/docs/home.md', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docsURI: 'https://github.com/minidogg/my-penguinmod-extensions/blob/88ff87b8fff13b4e601415d94b201f12c6d475fc/site%20builder/docs/home.md', | |
// docsURI: 'https://github.com/minidogg/my-penguinmod-extensions/blob/88ff87b8fff13b4e601415d94b201f12c6d475fc/site%20builder/docs/home.md', |
If this is still work and progress, might as well comment it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding suggestions for the changes listed in #11 (comment)
id: 'sitebuilder', | ||
name: 'Site Builder', | ||
//colors | ||
color1: '#7e69beff', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
color1: '#7e69beff', | |
color1: '#7e69be', |
{ | ||
blockType: Scratch.BlockType.LABEL, | ||
text: "Note: Extension must be unsandboxed to work in its entirety." | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | |
blockType: Scratch.BlockType.LABEL, | |
text: "Note: Extension must be unsandboxed to work in its entirety." | |
}, |
{ | ||
blockType: Scratch.BlockType.LABEL, | ||
text: "Advanced Stuffs" | ||
}, | ||
{ | ||
opcode: 'site', | ||
blockType: Scratch.BlockType.REPORTER, | ||
text: 'Site HTML' | ||
}, | ||
{ | ||
opcode: 'setHtml', | ||
blockType: Scratch.BlockType.COMMAND, | ||
text: 'Set Site HTML[html]', | ||
arguments:{ | ||
html: { | ||
type: Scratch.ArgumentType.STRING, | ||
defaultValue:"<h1>Hello</h1>" | ||
}, | ||
} | ||
}, | ||
{ | ||
opcode: 'addHtml', | ||
blockType: Scratch.BlockType.COMMAND, | ||
text: 'Add to Site HTML[html]', | ||
arguments:{ | ||
html: { | ||
type: Scratch.ArgumentType.STRING, | ||
defaultValue:"<p>World</p>" | ||
}, | ||
} | ||
}, | ||
|
||
{ | ||
blockType: Scratch.BlockType.LABEL, | ||
text: "Init stuffs" | ||
}, | ||
{ | ||
opcode: 'resetHtml', | ||
blockType: Scratch.BlockType.COMMAND, | ||
text: 'Reset Site HTML', | ||
}, | ||
{ | ||
opcode: 'openSiteWindow', | ||
blockType: Scratch.BlockType.COMMAND, | ||
text: 'Open Site Window', | ||
}, | ||
// { | ||
// opcode: 'closeSiteWindow', | ||
// blockType: Scratch.BlockType.COMMAND, | ||
// text: 'Close Site Window', | ||
// }, | ||
// { | ||
// opcode: 'updateSiteWindow', | ||
// blockType: Scratch.BlockType.COMMAND, | ||
// text: 'Update Site Window', | ||
// }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | |
blockType: Scratch.BlockType.LABEL, | |
text: "Advanced Stuffs" | |
}, | |
{ | |
opcode: 'site', | |
blockType: Scratch.BlockType.REPORTER, | |
text: 'Site HTML' | |
}, | |
{ | |
opcode: 'setHtml', | |
blockType: Scratch.BlockType.COMMAND, | |
text: 'Set Site HTML[html]', | |
arguments:{ | |
html: { | |
type: Scratch.ArgumentType.STRING, | |
defaultValue:"<h1>Hello</h1>" | |
}, | |
} | |
}, | |
{ | |
opcode: 'addHtml', | |
blockType: Scratch.BlockType.COMMAND, | |
text: 'Add to Site HTML[html]', | |
arguments:{ | |
html: { | |
type: Scratch.ArgumentType.STRING, | |
defaultValue:"<p>World</p>" | |
}, | |
} | |
}, | |
{ | |
blockType: Scratch.BlockType.LABEL, | |
text: "Init stuffs" | |
}, | |
{ | |
opcode: 'resetHtml', | |
blockType: Scratch.BlockType.COMMAND, | |
text: 'Reset Site HTML', | |
}, | |
{ | |
opcode: 'openSiteWindow', | |
blockType: Scratch.BlockType.COMMAND, | |
text: 'Open Site Window', | |
}, | |
// { | |
// opcode: 'closeSiteWindow', | |
// blockType: Scratch.BlockType.COMMAND, | |
// text: 'Close Site Window', | |
// }, | |
// { | |
// opcode: 'updateSiteWindow', | |
// blockType: Scratch.BlockType.COMMAND, | |
// text: 'Update Site Window', | |
// }, | |
{ | |
blockType: Scratch.BlockType.LABEL, | |
text: "Init stuffs" | |
}, | |
{ | |
opcode: 'resetHtml', | |
blockType: Scratch.BlockType.COMMAND, | |
text: 'Reset Site HTML', | |
}, | |
{ | |
opcode: 'openSiteWindow', | |
blockType: Scratch.BlockType.COMMAND, | |
text: 'Open Site Window', | |
}, | |
// { | |
// opcode: 'closeSiteWindow', | |
// blockType: Scratch.BlockType.COMMAND, | |
// text: 'Close Site Window', | |
// }, | |
// { | |
// opcode: 'updateSiteWindow', | |
// blockType: Scratch.BlockType.COMMAND, | |
// text: 'Update Site Window', | |
// }, | |
{ | |
blockType: Scratch.BlockType.LABEL, | |
text: "Advanced Stuffs" | |
}, | |
{ | |
opcode: 'site', | |
blockType: Scratch.BlockType.REPORTER, | |
text: 'Site HTML' | |
}, | |
{ | |
opcode: 'setHtml', | |
blockType: Scratch.BlockType.COMMAND, | |
text: 'Set Site HTML[html]', | |
arguments:{ | |
html: { | |
type: Scratch.ArgumentType.STRING, | |
defaultValue:"<h1>Hello</h1>" | |
}, | |
} | |
}, | |
{ | |
opcode: 'addHtml', | |
blockType: Scratch.BlockType.COMMAND, | |
text: 'Add to Site HTML[html]', | |
arguments:{ | |
html: { | |
type: Scratch.ArgumentType.STRING, | |
defaultValue:"<p>World</p>" | |
}, | |
} | |
}, |
items: ["top","bottom","left","right"] | ||
}, | ||
numType: { | ||
acceptReporters: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acceptReporters: true, | |
isTypeable: true, |
setHtml(args) { | ||
this.siteHtml = args.html | ||
} | ||
addHtml(args) { | ||
this.siteHtml += args.html | ||
} | ||
resetHtml(args) { | ||
this.siteHtml = "" | ||
} | ||
openSiteWindow(){ | ||
this.siteWindow = window.open("", "", "width=1000,height=1000") | ||
this.siteWindow.document.write(this.siteHtml) | ||
} | ||
closeSiteWindow(){ | ||
this.siteWindow.close() | ||
} | ||
updateSiteWindow(){ | ||
this.siteWindow.document.body.innerHTML = "" | ||
this.siteWindow.document.write(this.siteHtml) | ||
} | ||
addHeader(args){ | ||
var items = {"big":"h1","medium":"h2","small":"h3","tiny":"h4","even tinier":"h5","tiniest":"h6"} | ||
this.siteHtml += `<${items[args.SIZE]} id="${args.ID}" class="${args.CLASS}">${args.TEXT}</${items[args.SIZE]}>` | ||
} | ||
addPara(args){ | ||
this.siteHtml += `<p id="${args.ID}" class="${args.CLASS}">${args.TEXT}</p>` | ||
} | ||
addColorStyle(args){ | ||
var items = {"id":"#","class":"."} | ||
this.siteHtml += `<style>${items[args.type]}${args.name}{background-color:${args.value}}</style>` | ||
} | ||
addTextColorStyle(args){ | ||
var items = {"id":"#","class":"."} | ||
this.siteHtml += `<style>${items[args.type]}${args.name}{color:${args.value}}</style>` | ||
} | ||
addPositionStyle(args){ | ||
var items = {"id":"#","class":"."} | ||
this.siteHtml += `<style>${items[args.type]}${args.name}{position:${args.posType};${args.dir}:${args.num}${args.numType}}</style>` | ||
} | ||
setInnerHtml(args){ | ||
if(args.type = "id"){ | ||
this.siteWindow.document.getElementById(args.name).innerHTML = args.text | ||
|
||
return; | ||
} | ||
for(let el of this.siteWindow.document.getElementsByClassName(args.name)){ | ||
el.innerHTML = args.text | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setHtml(args) { | |
this.siteHtml = args.html | |
} | |
addHtml(args) { | |
this.siteHtml += args.html | |
} | |
resetHtml(args) { | |
this.siteHtml = "" | |
} | |
openSiteWindow(){ | |
this.siteWindow = window.open("", "", "width=1000,height=1000") | |
this.siteWindow.document.write(this.siteHtml) | |
} | |
closeSiteWindow(){ | |
this.siteWindow.close() | |
} | |
updateSiteWindow(){ | |
this.siteWindow.document.body.innerHTML = "" | |
this.siteWindow.document.write(this.siteHtml) | |
} | |
addHeader(args){ | |
var items = {"big":"h1","medium":"h2","small":"h3","tiny":"h4","even tinier":"h5","tiniest":"h6"} | |
this.siteHtml += `<${items[args.SIZE]} id="${args.ID}" class="${args.CLASS}">${args.TEXT}</${items[args.SIZE]}>` | |
} | |
addPara(args){ | |
this.siteHtml += `<p id="${args.ID}" class="${args.CLASS}">${args.TEXT}</p>` | |
} | |
addColorStyle(args){ | |
var items = {"id":"#","class":"."} | |
this.siteHtml += `<style>${items[args.type]}${args.name}{background-color:${args.value}}</style>` | |
} | |
addTextColorStyle(args){ | |
var items = {"id":"#","class":"."} | |
this.siteHtml += `<style>${items[args.type]}${args.name}{color:${args.value}}</style>` | |
} | |
addPositionStyle(args){ | |
var items = {"id":"#","class":"."} | |
this.siteHtml += `<style>${items[args.type]}${args.name}{position:${args.posType};${args.dir}:${args.num}${args.numType}}</style>` | |
} | |
setInnerHtml(args){ | |
if(args.type = "id"){ | |
this.siteWindow.document.getElementById(args.name).innerHTML = args.text | |
return; | |
} | |
for(let el of this.siteWindow.document.getElementsByClassName(args.name)){ | |
el.innerHTML = args.text | |
} | |
} | |
setHtml(args) { | |
this.siteHtml = args.html; | |
this.updateSiteWindow() | |
} | |
addHtml(args) { | |
this.siteHtml += args.html | |
this.updateSiteWindow() | |
} | |
resetHtml() { | |
this.siteHtml = "" | |
this.updateSiteWindow(); | |
} | |
openSiteWindow(){ | |
this.siteWindow = window.open("", "", "width=1000,height=1000") | |
this.siteWindow.document.write(this.siteHtml) | |
} | |
closeSiteWindow(){ | |
this.siteWindow.close() | |
} | |
updateSiteWindow(){ | |
this.siteWindow.document.body.innerHTML = "" | |
this.siteWindow.document.write(this.siteHtml) | |
} | |
addHeader(args){ | |
var items = {"big":"h1","medium":"h2","small":"h3","tiny":"h4","even tinier":"h5","tiniest":"h6"} | |
this.siteHtml += `<${items[args.SIZE]} id="${args.ID}" class="${args.CLASS}">${args.TEXT}</${items[args.SIZE]}>` | |
} | |
addPara(args){ | |
this.siteHtml += `<p id="${args.ID}" class="${args.CLASS}">${args.TEXT}</p>` | |
this.updateSiteWindow() | |
} | |
addColorStyle(args){ | |
var items = {"id":"#","class":"."} | |
this.siteHtml += `<style>${items[args.type]}${args.name}{background-color:${args.value}}</style>` | |
this.updateSiteWindow() | |
} | |
addTextColorStyle(args){ | |
var items = {"id":"#","class":"."} | |
this.siteHtml += `<style>${items[args.type]}${args.name}{color:${args.value}}</style>` | |
this.updateSiteWindow() | |
} | |
addPositionStyle(args){ | |
var items = {"id":"#","class":"."} | |
this.siteHtml += `<style>${items[args.type]}${args.name}{position:${args.posType};${args.dir}:${args.num}${args.numType}}</style>` | |
this.updateSiteWindow() | |
} | |
setInnerHtml(args){ | |
if(args.type = "id"){ | |
this.siteWindow.document.getElementById(args.name).innerHTML = args.text | |
return; | |
} | |
for(let el of this.siteWindow.document.getElementsByClassName(args.name)){ | |
el.innerHTML = args.text | |
} | |
this.updateSiteWindow(); | |
} |
rewal |
Replace AI completions link from api.tmrace.net to reverse.mubi.tech to avoid 429 errors causing part of the extension not to work.
add function blocks docs to more-types.md
AI fix for mouth_washer.js
Added export SVG as string
Update Scratchblocks.js
Fixed bugs, simplified some code, and added a new block
V1.9 | PenguinGPT Update
Update VideoSharing.js
Fixed a missing "!"
Security issue in VideoSharing.js
More Fields v1.2
No description provided.