Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » [NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
- mybearworld
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
I don't think so.
Signatures are the only place where assets links still work.
- mybearworld
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
I just realized Scratch's license would apply if I just did it here. It's probably smartest to just do it like this.
Signatures are the only place where assets links still work.
- skymover1239
- Scratcher
500+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
Uh, that's weird.I don't think so.
Honestly, I would just include the MIT license. The license does say not remove the copyright. Whoever created it probably knows what he's talking about. Copyright is automatical as soon as a coder writes it down (on paper or digitally)
For God so loved the world that he gave his one and only Son that whoever believes in him shall not perish but have eternal life
First time a moderator got ninjaed??
500 Posts
Current Mainline projects
AquaCSS - A CSS framework.
Ink - An editor that does, lots of things.
500 Posts
Current Mainline projects
AquaCSS - A CSS framework.
Ink - An editor that does, lots of things.
- MagicCrayon9342
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
Yes, source code is 100% user generated content. Data! But consider I've used google 5 years before I was allowed to.Isn't source code exactly that: data? Also, It's less about you using the service. But the data collection! Generally, a service collecting data of those under that age shouldn't be done. So, that's why that's there.
- mybearworld
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
I'm making the JavaScript version right now, and I'm making it a lot more regex based. It's really helpful for readability, editability and shortness, so I'm glad I decided to rewrite MMWS (and in a language that can handle regex way better!)
Last edited by mybearworld (July 2, 2022 08:44:44)
Signatures are the only place where assets links still work.
- mybearworld
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
The JavaScript rewrite is done!
You can now simply use an <mmws> HTML tag, and it will automatically get converted to minified CSS and used. This is done once on page load, but can also be initiated again using the JavaScript function mwwsConvertTagsToCSS. All the resulting <style> elements will have a class of -mmws-converted and –mmws-from- and then the filename (with everything but a-zA-Z\-_ filtered out).
The CSS from the above block is:
The JS is also a lot easier to edit, having about a third of the lines of the Python version, and being better-designed in general.
Below will be the code for the JS version. It will look a bit weird because it's not in a code tag, but that's so it can be easily put into an HTML document. More details on that can be found on the “How To Use” page.
You can now simply use an <mmws> HTML tag, and it will automatically get converted to minified CSS and used. This is done once on page load, but can also be initiated again using the JavaScript function mwwsConvertTagsToCSS. All the resulting <style> elements will have a class of -mmws-converted and –mmws-from- and then the filename (with everything but a-zA-Z\-_ filtered out).
The CSS from the above block is:
h1{all:unset;font-family:sans-serif;font-size:32px;color:white;}html{background-color:black;}
The JS is also a lot easier to edit, having about a third of the lines of the Python version, and being better-designed in general.
Below will be the code for the JS version. It will look a bit weird because it's not in a code tag, but that's so it can be easily put into an HTML document. More details on that can be found on the “How To Use” page.
Last edited by mybearworld (July 2, 2022 12:00:33)
Signatures are the only place where assets links still work.
- mybearworld
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
“use strict”;
const mmws = {};
// Internal use
mmws._regexNotInString = (re) =>
new RegExp(
`(?<!“(?:\\\\”|)*)(?:${re.source})|(?:${re.source})(?=*$)`,
[…new Set()].join(“”)
);
mmws._ruleRegex = /^*(?:\n {4}*)(?:\n {4}*|\n *)*/gm;
mmws._statementRegex = /^*$(?!\n {4})/gm;
mmws._nameTokenRegex =
/(?:#|\.|==?)+|(?:\+|>>?)|!\(|\)|"*"| +/gm;
mmws._whitespaceRegex = mmws._regexNotInString(/ +/);
mmws._replacements = [
{
replacement: /(+)\+(+)/g,
string: “$1$2”,
validation: /(+)\+(?=+)/g,
}, // plus
{
replacement: /(+)\>(+)/g,
string: “$1>$2”,
validation: /(+)\>(?=+)/g,
}, // gt
{
replacement: /(+)\>\>(+)/g,
string: “$1 $2”,
validation: /(+)\>\>(?=+)/g,
}, // gt gt
{
replacement: /(+),(+)/g,
string: “$1,$2”,
validation: /(+),(?=+)/g,
}, // comma
{
replacement: /!\((+)\)/g,
string: “:not($1)”,
validation: /!\((+)\)/g,
}, // not
{
replacement: /(?<!)+)/g,
string: “$1”,
validation: /(?<!)+)(?!)/g,
}, // colons
{
replacement: /(?<!)#(+)/g,
string: “#$1”,
validation: /(?<!)#(+)(?!)/g,
}, // ids
{
replacement: /(?<!)\.(+)/g,
string: “.$1”,
validation: /(?<!)\.(+)(?!)/g,
}, // classes
{
replacement: /\+)(“(?:\\”|+)*“)/g,
string: ”",
validation: /\+)(“(?:\\”|+)*")/g,
}, // eq
{
replacement: /\=\+)/g,
string: "",
validation: /\=\+)/g,
}, // eqeq
]; // replace with lookaheads down there
mmws._combinedReplacements = new RegExp(
“^(?:” +
mmws._replacements
.map((re) => `(?:${re.validation.source})`)
.join(“|”) +
“)+$”,
“g”
);
mmws._isValidKey = (key) =>
!!key.replace(/ /g, “”).match(mmws._combinedReplacements);
mmws._commentRegex = mmws._regexNotInString(
/\/\/(?:.|\n)*?$|\/\*(?:.|\n)*?\*\//m
);
mmws._ruleComponent = /(?<!“(?:\\”|)+);|;(?=*$)/g;
mmws._ruleSubComponent = /(?<!“(?:\\”|)+) +| +(?=*$)/g;
mmws._variableRegex = /\$(*) +(.*)/g;
mmws._embeddedCounter = 0;
mmws._inlineMMWSCounter = 0;
mmws._inlineMMWSMap = Object();
// Outside use
mmws.toObject = (code) => {
let rule, rules, statements, rulesObj;
code = code.replace(code._commentRegex, “”);
rules = .map((r) => {
return r
.toString()
.trim()
.split(“\n”)
.map((s) => s.trim());
});
statements = .map((r) =>
r.toString()
);
rulesObj = {};
for (rule of rules) {
if (!mmws._isValidKey(rule)) {
throw new Error(`Invalid rule: ${rule}`);
}
rulesObj[rule] = rule.splice(1);
}
return { statements, rulesObj };
};
mmws.toCSS = (code) => {
let cssKey,
i,
important,
isVariable,
lastValue,
propName,
rep,
resultCSS,
rule,
selector,
subrule,
vars;
if (typeof code !== “string”) {
return;
}
// Get important parts from the code
let { statements, rulesObj } = mmws.toObject(code);
// Convert to CSS syntax
let cssObj = {};
let order = ;
for (let key of Object.keys(rulesObj)) {
cssKey = key;
cssKey = cssKey.replace(mmws._whitespaceRegex, “”);
for (rep of mmws._replacements) {
cssKey = cssKey.replace(rep.replacement, rep.string);
}
if (cssKey === “html”) {
cssKey = “:root”;
}
order.push(cssKey);
cssObj = ;
for (rule of rulesObj) {
rule = rule.split(mmws._ruleComponent).map((s) =>
s
.trim()
.split(mmws._ruleSubComponent)
.map((s) => s.trim())
);
i = 0;
important = false;
lastValue = null;
isVariable = false;
for (subrule of rule) {
i++;
if (i === 1) {
if (subrule === “!”) {
important = true;
subrule = subrule.slice(1);
}
propName = subrule;
if (propName === “$”) {
propName = `–${propName.slice(1)}`;
isVariable = true;
}
subrule = subrule.splice(1);
subrule = subrule.map((s) =>
s.replace(/\$(+)/, “var(–$1)”)
);
if (subrule.length) {
cssObj.push(
`${propName}:${subrule.join(“ ”)}${
important ? “!important” : “”
};`
);
lastValue = subrule;
}
} else {
if (isVariable) {
throw new Error(
“Variable declarations can't have special rules”
);
}
if (!order.includes(`${cssKey}:${subrule}`)) {
cssObj[`${cssKey}:${subrule}`] = ;
order.push(`${cssKey}:${subrule}`);
selector = subrule;
}
subrule = subrule.splice(1);
if (subrule.length) {
cssObj.push(
`${propName}:${subrule.join(“ ”)}${
important ? “!important” : “”
};`
);
lastValue = subrule;
} else if (lastValue !== null) {
cssObj.push(
`${propName}:${lastValue.join(“”)}${
important ? “!important” : “”
};`
);
} else {
throw new Error(“Decelerations can't be empty.”);
}
}
}
}
}
// Add the statements to CSS
if (statements.some((s) => s.startsWith(“$”))) {
if (!order.includes(“:root”)) {
order = ;
cssObj = ;
}
vars = statements.filter((s) => s.match(mmws._variableRegex));
vars = vars.map((v) => v.replace(mmws._variableRegex, “–$1: $2;”));
cssObj.push(…vars);
}
// Convert to CSS
resultCSS = “”;
for (let key of order) {
if (cssObj.length) {
resultCSS += `${key}{${cssObj.join(“”)}}`;
}
}
return resultCSS;
};
mmws.convertTagsToCSS = async function (ignoreNonexistentFiles) {
let cssCode, element, fileName, mmwsCode, response, styleEl;
for (element of [
…document.querySelectorAll(“mmws”),
…document.querySelectorAll('style'),
]) {
fileName = element.getAttribute(“src”);
if (fileName === null || element.tagName === “STYLE”) {
mmwsCode = element.innerHTML;
mmwsCode = mmwsCode
.replaceAll(/^\/\*/g, “”)
.replaceAll(/\*\/$/g, “”)
.split(“\n”)
.filter(© => c.trim())
.join(“\n”);
mmwsCode = mmwsCode
.split(“\n”)
.map((s) =>
s.replace(
new RegExp(
`^ {${Math.min(
….map(
(e) => e.length
)
)}}`,
“gm”
),
“”
)
)
.join(“\n”);
mmws._embeddedCounter++;
fileName = `embedded-${mmws._embeddedCounter}`;
} else {
response = await fetch(fileName);
if (response.status === 404) {
if (ignoreNonexistentFiles) {
throw new Error(`${fileName} does not exist.`);
}
}
mmwsCode = await response.text();
}
cssCode = mmws.toCSS(mmwsCode);
if (cssCode !== null) {
styleEl = document.createElement(“style”);
styleEl.classList.add(“–mmws”);
styleEl.id = `–mmws-from-${fileName.replace(//gi, “-”)}`;
styleEl.innerHTML = cssCode;
document.head.appendChild(styleEl);
}
element.remove();
}
};
mmws.convertInlineMMWS = () => {
let element, mmwsCode, cachedIds, resultCSS;
resultCSS = “”;
cachedIds = Object.keys(mmws._inlineMMWSMap);
for (element of document.querySelectorAll("“)) {
mmwsCode = element.getAttribute(”mmws");
if (element.id) {
if (
cachedIds.includes(element.id) &&
mmws._inlineMMWSMap === mmwsCode
) {
resultCSS += mmws._inlineMMWSMap;
continue;
}
} else {
while (
document.querySelector(
`#–mmws-inline${mmws._inlineMMWSCounter.toString(16)}`
)
) {
mmws._inlineMMWSCounter++;
}
element.id = `–mmws-inline-${mmws._inlineMMWSCounter.toString(
16
)}`;
}
let editedMMWSCode =
`#${element.id}\n` +
mmwsCode
.split(mmws._regexNotInString(/\|/g))
.map((s) => s.trim())
.map((s) => ` ${s}`)
.join(“\n”);
let cssCode = mmws.toCSS(editedMMWSCode);
resultCSS += cssCode;
mmws._inlineMMWSMap = ;
}
if (!document.querySelector(“#–mmws-inline-style”)) {
element = document.createElement(“style”);
element.id = “–mmws-inline-style”;
document.head.appendChild(element);
}
if (
document.querySelector(“#–mmws-inline-style”).innerHTML !== resultCSS
) {
document.querySelector(“#–mmws-inline-style”).innerHTML = resultCSS;
}
};
mmws.convertTagsToCSS(true);
setInterval(mmws.convertInlineMMWS);
const mmws = {};
// Internal use
mmws._regexNotInString = (re) =>
new RegExp(
`(?<!“(?:\\\\”|)*)(?:${re.source})|(?:${re.source})(?=*$)`,
[…new Set()].join(“”)
);
mmws._ruleRegex = /^*(?:\n {4}*)(?:\n {4}*|\n *)*/gm;
mmws._statementRegex = /^*$(?!\n {4})/gm;
mmws._nameTokenRegex =
/(?:#|\.|==?)+|(?:\+|>>?)|!\(|\)|"*"| +/gm;
mmws._whitespaceRegex = mmws._regexNotInString(/ +/);
mmws._replacements = [
{
replacement: /(+)\+(+)/g,
string: “$1$2”,
validation: /(+)\+(?=+)/g,
}, // plus
{
replacement: /(+)\>(+)/g,
string: “$1>$2”,
validation: /(+)\>(?=+)/g,
}, // gt
{
replacement: /(+)\>\>(+)/g,
string: “$1 $2”,
validation: /(+)\>\>(?=+)/g,
}, // gt gt
{
replacement: /(+),(+)/g,
string: “$1,$2”,
validation: /(+),(?=+)/g,
}, // comma
{
replacement: /!\((+)\)/g,
string: “:not($1)”,
validation: /!\((+)\)/g,
}, // not
{
replacement: /(?<!)+)/g,
string: “$1”,
validation: /(?<!)+)(?!)/g,
}, // colons
{
replacement: /(?<!)#(+)/g,
string: “#$1”,
validation: /(?<!)#(+)(?!)/g,
}, // ids
{
replacement: /(?<!)\.(+)/g,
string: “.$1”,
validation: /(?<!)\.(+)(?!)/g,
}, // classes
{
replacement: /\+)(“(?:\\”|+)*“)/g,
string: ”",
validation: /\+)(“(?:\\”|+)*")/g,
}, // eq
{
replacement: /\=\+)/g,
string: "",
validation: /\=\+)/g,
}, // eqeq
]; // replace with lookaheads down there
mmws._combinedReplacements = new RegExp(
“^(?:” +
mmws._replacements
.map((re) => `(?:${re.validation.source})`)
.join(“|”) +
“)+$”,
“g”
);
mmws._isValidKey = (key) =>
!!key.replace(/ /g, “”).match(mmws._combinedReplacements);
mmws._commentRegex = mmws._regexNotInString(
/\/\/(?:.|\n)*?$|\/\*(?:.|\n)*?\*\//m
);
mmws._ruleComponent = /(?<!“(?:\\”|)+);|;(?=*$)/g;
mmws._ruleSubComponent = /(?<!“(?:\\”|)+) +| +(?=*$)/g;
mmws._variableRegex = /\$(*) +(.*)/g;
mmws._embeddedCounter = 0;
mmws._inlineMMWSCounter = 0;
mmws._inlineMMWSMap = Object();
// Outside use
mmws.toObject = (code) => {
let rule, rules, statements, rulesObj;
code = code.replace(code._commentRegex, “”);
rules = .map((r) => {
return r
.toString()
.trim()
.split(“\n”)
.map((s) => s.trim());
});
statements = .map((r) =>
r.toString()
);
rulesObj = {};
for (rule of rules) {
if (!mmws._isValidKey(rule)) {
throw new Error(`Invalid rule: ${rule}`);
}
rulesObj[rule] = rule.splice(1);
}
return { statements, rulesObj };
};
mmws.toCSS = (code) => {
let cssKey,
i,
important,
isVariable,
lastValue,
propName,
rep,
resultCSS,
rule,
selector,
subrule,
vars;
if (typeof code !== “string”) {
return;
}
// Get important parts from the code
let { statements, rulesObj } = mmws.toObject(code);
// Convert to CSS syntax
let cssObj = {};
let order = ;
for (let key of Object.keys(rulesObj)) {
cssKey = key;
cssKey = cssKey.replace(mmws._whitespaceRegex, “”);
for (rep of mmws._replacements) {
cssKey = cssKey.replace(rep.replacement, rep.string);
}
if (cssKey === “html”) {
cssKey = “:root”;
}
order.push(cssKey);
cssObj = ;
for (rule of rulesObj) {
rule = rule.split(mmws._ruleComponent).map((s) =>
s
.trim()
.split(mmws._ruleSubComponent)
.map((s) => s.trim())
);
i = 0;
important = false;
lastValue = null;
isVariable = false;
for (subrule of rule) {
i++;
if (i === 1) {
if (subrule === “!”) {
important = true;
subrule = subrule.slice(1);
}
propName = subrule;
if (propName === “$”) {
propName = `–${propName.slice(1)}`;
isVariable = true;
}
subrule = subrule.splice(1);
subrule = subrule.map((s) =>
s.replace(/\$(+)/, “var(–$1)”)
);
if (subrule.length) {
cssObj.push(
`${propName}:${subrule.join(“ ”)}${
important ? “!important” : “”
};`
);
lastValue = subrule;
}
} else {
if (isVariable) {
throw new Error(
“Variable declarations can't have special rules”
);
}
if (!order.includes(`${cssKey}:${subrule}`)) {
cssObj[`${cssKey}:${subrule}`] = ;
order.push(`${cssKey}:${subrule}`);
selector = subrule;
}
subrule = subrule.splice(1);
if (subrule.length) {
cssObj.push(
`${propName}:${subrule.join(“ ”)}${
important ? “!important” : “”
};`
);
lastValue = subrule;
} else if (lastValue !== null) {
cssObj.push(
`${propName}:${lastValue.join(“”)}${
important ? “!important” : “”
};`
);
} else {
throw new Error(“Decelerations can't be empty.”);
}
}
}
}
}
// Add the statements to CSS
if (statements.some((s) => s.startsWith(“$”))) {
if (!order.includes(“:root”)) {
order = ;
cssObj = ;
}
vars = statements.filter((s) => s.match(mmws._variableRegex));
vars = vars.map((v) => v.replace(mmws._variableRegex, “–$1: $2;”));
cssObj.push(…vars);
}
// Convert to CSS
resultCSS = “”;
for (let key of order) {
if (cssObj.length) {
resultCSS += `${key}{${cssObj.join(“”)}}`;
}
}
return resultCSS;
};
mmws.convertTagsToCSS = async function (ignoreNonexistentFiles) {
let cssCode, element, fileName, mmwsCode, response, styleEl;
for (element of [
…document.querySelectorAll(“mmws”),
…document.querySelectorAll('style'),
]) {
fileName = element.getAttribute(“src”);
if (fileName === null || element.tagName === “STYLE”) {
mmwsCode = element.innerHTML;
mmwsCode = mmwsCode
.replaceAll(/^\/\*/g, “”)
.replaceAll(/\*\/$/g, “”)
.split(“\n”)
.filter(© => c.trim())
.join(“\n”);
mmwsCode = mmwsCode
.split(“\n”)
.map((s) =>
s.replace(
new RegExp(
`^ {${Math.min(
….map(
(e) => e.length
)
)}}`,
“gm”
),
“”
)
)
.join(“\n”);
mmws._embeddedCounter++;
fileName = `embedded-${mmws._embeddedCounter}`;
} else {
response = await fetch(fileName);
if (response.status === 404) {
if (ignoreNonexistentFiles) {
throw new Error(`${fileName} does not exist.`);
}
}
mmwsCode = await response.text();
}
cssCode = mmws.toCSS(mmwsCode);
if (cssCode !== null) {
styleEl = document.createElement(“style”);
styleEl.classList.add(“–mmws”);
styleEl.id = `–mmws-from-${fileName.replace(//gi, “-”)}`;
styleEl.innerHTML = cssCode;
document.head.appendChild(styleEl);
}
element.remove();
}
};
mmws.convertInlineMMWS = () => {
let element, mmwsCode, cachedIds, resultCSS;
resultCSS = “”;
cachedIds = Object.keys(mmws._inlineMMWSMap);
for (element of document.querySelectorAll("“)) {
mmwsCode = element.getAttribute(”mmws");
if (element.id) {
if (
cachedIds.includes(element.id) &&
mmws._inlineMMWSMap === mmwsCode
) {
resultCSS += mmws._inlineMMWSMap;
continue;
}
} else {
while (
document.querySelector(
`#–mmws-inline${mmws._inlineMMWSCounter.toString(16)}`
)
) {
mmws._inlineMMWSCounter++;
}
element.id = `–mmws-inline-${mmws._inlineMMWSCounter.toString(
16
)}`;
}
let editedMMWSCode =
`#${element.id}\n` +
mmwsCode
.split(mmws._regexNotInString(/\|/g))
.map((s) => s.trim())
.map((s) => ` ${s}`)
.join(“\n”);
let cssCode = mmws.toCSS(editedMMWSCode);
resultCSS += cssCode;
mmws._inlineMMWSMap = ;
}
if (!document.querySelector(“#–mmws-inline-style”)) {
element = document.createElement(“style”);
element.id = “–mmws-inline-style”;
document.head.appendChild(element);
}
if (
document.querySelector(“#–mmws-inline-style”).innerHTML !== resultCSS
) {
document.querySelector(“#–mmws-inline-style”).innerHTML = resultCSS;
}
};
mmws.convertTagsToCSS(true);
setInterval(mmws.convertInlineMMWS);
Last edited by mybearworld (Oct. 9, 2022 14:21:01)
Signatures are the only place where assets links still work.
- mybearworld
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
I may have completely forgot to implement variables in the JS version. Just maybe.
Signatures are the only place where assets links still work.
- MagicCrayon9342
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
- mybearworld
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
(#69)…?
But… framework… language.. in.. JS? What? Typo?
Signatures are the only place where assets links still work.
- MagicCrayon9342
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
I'm pretty sure a language in JS is impossible.(#69)…?
But… framework… language.. in.. JS? What? Typo?
- mybearworld
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
Why would it be? I'm pretty sure a language in JS is impossible.
Signatures are the only place where assets links still work.
- NFlex23
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
What in the world would make you think that? If people can make languages in Scratch, how would it be impossible to make one in JavaScript?I'm pretty sure a language in JS is impossible.(#69)…?
But… framework… language.. in.. JS? What? Typo?
Help improve the Advanced Topics (Really!)
Before you create a topic:
Always search for duplicates or other similar topics before making an umbrella topic, e.g., “The Mac Topic”.
- Is it about something you are planning on making but haven't made yet? If so, please wait to post until you have created a working prototype. This is a key factor to keeping the ATs as clean as possible.
- The ATs aren't technical support. It is perfectly valid to ask questions about things related to programming, but not issues with external websites, apps, or devices. Most sites have their own support system; try asking there!
- Is it related to something you are making in Scratch? (This includes OSes and other Scratch projects) If so, please post in Collaboration, Show and Tell, or another similar forum.
- Is your topic questionably “advanced”? Try browsing the other forums to see if your topic fits better in one of those.
- Issues with Scratch itself should be put in Bugs and Glitches.
- mybearworld
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
(#74)Especially if it's just a styling language…What in the world would make you think that? If people can make languages in Scratch, how would it be impossible to make one in JavaScript?I'm pretty sure a language in JS is impossible.(#69)…?
But… framework… language.. in.. JS? What? Typo?
Signatures are the only place where assets links still work.
- MagicCrayon9342
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
- NFlex23
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
I don't think making this into a NPM module is really necessary for this type of project. Huge question, why isn't this on NPM?
Help improve the Advanced Topics (Really!)
Before you create a topic:
Always search for duplicates or other similar topics before making an umbrella topic, e.g., “The Mac Topic”.
- Is it about something you are planning on making but haven't made yet? If so, please wait to post until you have created a working prototype. This is a key factor to keeping the ATs as clean as possible.
- The ATs aren't technical support. It is perfectly valid to ask questions about things related to programming, but not issues with external websites, apps, or devices. Most sites have their own support system; try asking there!
- Is it related to something you are making in Scratch? (This includes OSes and other Scratch projects) If so, please post in Collaboration, Show and Tell, or another similar forum.
- Is your topic questionably “advanced”? Try browsing the other forums to see if your topic fits better in one of those.
- Issues with Scratch itself should be put in Bugs and Glitches.
- MagicCrayon9342
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
- god286
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
I think you mean ‘mmws’ not ‘mwws’ in your code?
Also will this be also in the VSCode extension (syntax highlighting for mmws elements in HTML)
Also will this be also in the VSCode extension (syntax highlighting for mmws elements in HTML)
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- MagicCrayon9342
- Scratcher
1000+ posts
[NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)
vscode extension installer fails I think you mean ‘mmws’ not ‘mwws’ in your code?
Also will this be also in the VSCode extension (syntax highlighting for mmws elements in HTML)
Traceback (most recent call last):
File "/tmp/./a", line 20, in <module>
zip.extractall(path=EXT_PATH)
File "/usr/lib64/python3.10/zipfile.py", line 1645, in extractall
self._extract_member(zipinfo, path, pwd)
File "/usr/lib64/python3.10/zipfile.py", line 1698, in _extract_member
with self.open(member, pwd=pwd) as source, \
File "/usr/lib64/python3.10/zipfile.py", line 1530, in open
fheader = zef_file.read(sizeFileHeader)
File "/usr/lib64/python3.10/zipfile.py", line 744, in read
self._file.seek(self._pos)
OSError: [Errno 22] Invalid argument
- Discussion Forums
- » Advanced Topics
- » [NOW IN JAVASCRIPT!] ~~ MMWS - MMWS Makes Websites Styled (Improved CSS!)