Make "Flat Design" and light mode seperate

I apologize if this is a duplicate, this is one of my first times using the Snap*!* forums.

I don't fully understand yet why Flat Design and light mode are toggled in the same option, If possible, it would be nice to have dark mode and Flat Design be separate options sometime in the future.

I actually have made a userscript to do this.

Oh, and when jens looked at my snap mod, he showed some interest in it, so it might come in snap v10. Do not quote me on this

The reason why is probably because the mode is supposed to mimic scratch 3 and that has no dark mode (at least yet, they are currently working on one)

That does seem like a possible reason.

I'll have to see if that works, github,io links are blocked for me though since I'm on a school Chromebook, so I'll have to see what it is on another device.

Why’d you comment this on my scratch profile lol

Near the bottom of the post there's text saying "source", click on it and it'll reveal the full source code, which you can copy / paste into your userscript extension or convert it to a bookmarklet.

I'm gonna be honest, no reason really, I just found it cool that we both had accounts on Scratch and Snap!

I copied the code and put it into the bookmark URL with "javascript:" at the start, and it didn't work, I'm not sure if I copied it wrong or if my school disabled running JS from bookmarks, I think it might be the latter, though, because last school year the bookmarklet I used to remove myself from studios on Scratch stopped working.

Did you put it in a bookmarklet maker? Of course you can still just copy / paste the script into a javascript function block, and run it.

That's a good idea, I'll try that.

Flat design was created so that you can embed Snap! into a webpage and it wouldn't "pop out" so much.

it works for me as a bookmarklet

javascript:void eval("!function(){const e=['!function(){"use strict";function e(e){return e.replace("MorphicPreferences.isFlat","MorphicPreferences.isLight")}function n(n){var t=e(new Function("return "+n)().toString());new Function(n+" = "+t)()}MorphicPreferences.isLight=MorphicPreferences.isFlat,IDE_Morph.prototype.darkDesign=function(){this.setDarkDesign(),this.refreshIDE()},IDE_Morph.prototype.lightDesign=function(){this.setLightDesign(),this.refreshIDE()},n("IDE_Morph.prototype.createLogo"),n("IDE_Morph.prototype.createControlBar"),n("IDE_Morph.prototype.createCategories"),n("IDE_Morph.prototype.createSpriteBar"),n("IDE_Morph.prototype.createCorralBar");var t=e(IDE_Morph.prototype.setDefaultDesign.toString()),r=e(IDE_Morph.prototype.setFlatDesign.toString());const i=new Function("IDE_Morph.prototype.setDarkDesign = "+t),o=new Function("IDE_Morph.prototype.setLightDesign = "+r);i(),o(),IDE_Morph.prototype.setFlatDesign=function(){MorphicPreferences.isFlat=!0,IDE_Morph.prototype.scriptsPaneTexture=null},IDE_Morph.prototype.setDefaultDesign=function(){MorphicPreferences.isFlat=!1,IDE_Morph.prototype.scriptsPaneTexture=this.scriptsTexture()},console.log("Injecting menu items");var s=IDE_Morph.prototype.settingsMenu.toString().split("\\n addPreference(\\n \'Flat design\',\\n () => {\\n if (MorphicPreferences.isFlat) {\\n return this.defaultDesign();\\n }\\n this.flatDesign();\\n },\\n MorphicPreferences.isFlat,\\n \'uncheck for default\\\\nGUI design\',\\n \'check for alternative\\\\nGUI design\',\\n false\\n );");s.splice(1,0," addPreference(\\n \'Flat design\',\\n () => {\\n if (MorphicPreferences.isFlat) { return this.defaultDesign();\\n }\\n this.flatDesign();\\n }, MorphicPreferences.isFlat,\\n \'uncheck for default\\\\nGUI design\', \'check for alternative\\\\nGUI design\',\\n false\\n );\\n\\taddPreference(\\n \'Dark Design\',\\n () => {\\n if (MorphicPreferences.isLight) {\\n return this.darkDesign();\\n }\\n this.lightDesign();\\n },\\n !MorphicPreferences.isLight,\\n \'uncheck for default\\\\nGUI design\',\\n \'check for alternative\\\\nGUI design\',\\n false\\n );");var p=s.join("");new Function("IDE_Morph.prototype.settingsMenu = "+p)()}();'],n=[[[],[]]],t="0.2003274161194426-1662169419886-userscripts-ran",r=e.length;function i(e,n){const[t,r]=e;for(const e of r)if(o(e,n))return!1;for(const e of t)if(o(e,n))return!0;return 0===t.length}function o(e,n){let t;return t=e.startsWith("/")&&e.endsWith("/")?new RegExp(e.slice(1,-1)):function(e){let n=e;for(let e=0;e<s.length;e++){const t=s[e],r=c[e];n=n.replace(r,"\\"+t)}return new RegExp("^"+n.replace(/\/g,".")+"$","i")}(e),t.test(n)}const s=["\\",".","+","?","^","$","(",")","[","]","{","}","|"],>new RegExp("\\"+e,"g")));!function(){if(!window[t]||confirm("Are you sure you want to run the userscripts again?")){window[t]=!0,window.isRunningAsBookmarkletUserscript=!0;for(let t=0;t<r;t++){const r=e[t];if(i(n[t],location.href))try{window.eval(r)}catch(e){console.error(e)}}delete window.isRunningAsBookmarkletUserscript}}()}();")

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.