Discuss Scratch

arda231439
Scratcher
18 posts

Assest Store extension

Its a sprite liblary but online

unsandboxed turbowarp extension text
(function(Scratch){"use strict";if(!Scratch.extensions.unsandboxed){console.error("Toolbox eklentisi sandbox modunda çalışamaz! Lütfen URL sonuna &allow-unsandboxed ekleyin.");return}const tabSVG=`<svg xmlns="http://www.w3.org/2000/svg" width="18.331" height="18.331" viewBox="0 0 18.331 18.331"><g stroke-miterlimit="10"><path d="M15.55 5.403v7.41a1.824 1.824 0 0 1-1.825 1.825h-9.12a1.824 1.824 0 0 1-1.824-1.825V5.517c0-1.007.816-1.824 1.824-1.824h9.17c1.757-.007 1.774 1.71 1.774 1.71z" fill="none" stroke="#COLOR" stroke-width="1.5" stroke-linecap="round"/><path d="M0 18.331V0h18.331v18.331z" fill="none"/></g></svg>`;const vm=Scratch.vm;const runtime=vm.runtime;const isPM=Scratch.extensions.isPenguinMod;const isEditor=typeof scaffolding==="undefined";let guiElements={};let cachedContainer=null;let cachedIframe=null;function dataURLToArrayBuffer(dataURL){const base64Part=dataURL.split(',')[1];const binaryString=atob(base64Part);const len=binaryString.length;const bytes=new Uint8Array(len);for(let i=0;i<len;i++){bytes[i]=binaryString.charCodeAt(i)}return bytes.buffer}window.addEventListener("message",async event=>{if(event.origin!=="https://arda234m.github.io")return;try{const data=typeof event.data==="string"?JSON.parse(event.data):event.data;if(data&&data.source==="turbowarp-extension"&&data.message){const dataURL=data.message;if(dataURL.startsWith("data:")){const spriteBuffer=dataURLToArrayBuffer(dataURL);await vm.addSprite(spriteBuffer);console.log("Sprite3 başarıyla editöre aktarıldı!")}}}catch(e){console.error("Sprite verisi işlenirken eklenti tarafında hata çıktı:",e)}});function attachTab(){const tabs=document.querySelectorAll(`li[class*="react-tabs_react-tabs__tab"]`);if(tabs.length===0)return;const lastTab=tabs[tabs.length-1];const cloneTab=lastTab.cloneNode(true);lastTab.insertAdjacentElement("afterend",cloneTab);const childs=isPM?cloneTab.firstChild.children:cloneTab.children;childs[0].src=constructTabIMG();childs[1].textContent="Toolbox";guiElements["cloneTab"]={cloneTab,img:childs[0]};cloneTab.setAttribute("style","display: flex; justify-content: center; align-items: center;");cloneTab.addEventListener("click",e=>{ReduxStore.dispatch({type:"scratch-gui/navigation/ACTIVATE_TAB",activeTabIndex:-1});e.stopPropagation()})}function startListenerWorker(){const checkInEditor=()=>!ReduxStore.getState().scratchGui.mode.isPlayerOnly;let inEditor=checkInEditor();if(inEditor)attachTab();ReduxStore.subscribe(()=>{const currentlyInEditor=checkInEditor();if(inEditor!==currentlyInEditor){inEditor=currentlyInEditor;if(inEditor)vm.once("workspaceUpdate",()=>attachTab())}if(currentlyInEditor){if(guiElements["cloneTab"]){const thisTab=ReduxStore.getState().scratchGui.editorTab.activeTabIndex;const tabImg=guiElements["cloneTab"].img;tabImg.src=constructTabIMG();if(thisTab===-1){guiElements["cloneTab"].cloneTab.style.height="calc(100% - 15%)";tabImg.style.filter="saturate(1)";showCallTab()}else{guiElements["cloneTab"].cloneTab.style.height="calc(100% - 20%)";tabImg.style.filter="";hideCallTab()}}}})}if(isEditor)startListenerWorker();function showCallTab(){const guiSpace=document.querySelector(`div[class^="gui_tabs_"]`).firstChild;if(!cachedContainer){cachedContainer=document.createElement("div");cachedContainer.classList.add("call-tab-container");cachedContainer.setAttribute("style","height: 100%; width: 100%; box-sizing: border-box; padding: 15px;")}if(!cachedIframe){cachedIframe=document.createElement("iframe");cachedIframe.setAttribute("src","https://arda234m.github.io/call/index.html?v="+Date.now());cachedIframe.setAttribute("style","width: 100%; height: 100%; border: 1px solid #dddddd; border-radius: 10px; background: white;");cachedContainer.appendChild(cachedIframe)}cachedContainer.style.display="flex";if(cachedContainer.parentElement!==guiSpace.parentElement){guiSpace.insertAdjacentElement("afterend",cachedContainer)}}function hideCallTab(){if(cachedContainer){cachedContainer.style.display="none"}}function constructTabIMG(){const theme=isPM?"#00c3ff":document.documentElement.style.getPropertyValue("--looks-secondary")||"#ff4c4c";return `data:image/svg+xml;base64,${btoa(tabSVG.replaceAll("#COLOR", theme))}`}const bypassID="toolboxInternalBypass";class ToolboxBypass{getInfo(){return{id:bypassID,name:"Toolbox",blocks:[]}}}Scratch.extensions.register(new ToolboxBypass());if(runtime._extensions)delete runtime._extensions[bypassID];if(runtime.peripheralExtensions)delete runtime.peripheralExtensions[bypassID];const removeCategoryDOM=()=>{const categoryElement=document.querySelector(`[id*="${bypassID}"]`);if(categoryElement){categoryElement.remove()}else{setTimeout(removeCategoryDOM,50)}};if(isEditor)setTimeout(removeCategoryDOM,50)})(Scratch);

How to use this?
  • Go to turbowarp
    Go to extensions
    Choose “Custom Extensions”
    Select Text
    Copy the code
    Paste the code on the big area
    Check “Run without sandbox”
    Click button “Load”

Now you have a tab near Sounds,
Its called “Toobox”, Click it


Last edited by arda231439 (July 20, 2026 12:36:37)

MrDrProfessorRadical
Scratcher
100+ posts

Assest Store extension

This seems interesting. Are you going to revamp the UI to make it a lot cleaner?
arda231439
Scratcher
18 posts

Assest Store extension

ThisCyanSpark wrote:

This seems interesting. Are you going to revamp the UI to make it a lot cleaner?
Maybe… it took me 4 days to make. Just want people use it
MrDrProfessorRadical
Scratcher
100+ posts

Assest Store extension

It isn't too bad if it took you 4 days to make!

Powered by DjangoBB