Discuss Scratch
- Discussion Forums
- » Developing Scratch Extensions
- » Somone should make a...
- -SuperScratch-
- Scratcher
100+ posts
Somone should make a...
Extention that opens up a little tab on the scratch window that lets you see the web!
- DrKat123
- Scratcher
1000+ posts
Somone should make a...
Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
Moving from Scratch? Don't learn C or Java, try Snap!
it haz OOP
DrKat McKatFace
First of all I'm 100% human and humans does not have a cat face
and second, the Boaty McBoatFace/Parsey McParseFace madness has just begun
λ
Sharp, my new Scratch mod
Is my post/siggy worthy for an internet?
- -SuperScratch-
- Scratcher
100+ posts
Somone should make a...
True but mabye like only opens to scratch sites? Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
- Jonathan50
- Scratcher
1000+ posts
Somone should make a...
but you can't even share projects with extensions on Scratch (well, without it breaking) Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
Not yet a Knight of the Mu Calculus.
- Jonathan50
- Scratcher
1000+ posts
Somone should make a...
I'll do this tomorrow.
iframe shims!
iframe shims!
Not yet a Knight of the Mu Calculus.
- -SuperScratch-
- Scratcher
100+ posts
Somone should make a...
YAY! Somone lked my idea! I'll do this tomorrow.
iframe shims!
kinda
- carrick543
- Scratcher
15 posts
Somone should make a...
what/?
what you mean?
Last edited by carrick543 (Dec. 15, 2015 19:27:15)
- Jonathan50
- Scratcher
1000+ posts
Somone should make a...
Hello. Welcome to the Scratch forums. fnaf!
Please do not spam or post things entirely irrelevant to the discussion.
Not yet a Knight of the Mu Calculus.
- -SuperScratch-
- Scratcher
100+ posts
Somone should make a...
How is it going? (On the extention) I'll do this tomorrow.
iframe shims!
- Jonathan50
- Scratcher
1000+ posts
Somone should make a...
Got this so far:
It has a few limitations: if the user navigates somewhere other than the same domain (scratchx.org) you can't get the location.
You also need to position it correctly (which is hard) and ideally you would detect fullscreen or small editor mode and change to accommodate for that.
(function(ext) { ext._shutdown = function() {}; ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; ext.oldUrl = ''; ext.show = function(t, l, w, h) { ext.iframe = document.createElement('iframe'); ext.iframe.style.position = 'absolute'; ext.iframe.style.top = t + 'px'; ext.iframe.style.left = l + 'px'; ext.iframe.style.width = w + 'px'; ext.iframe.style.height = h + 'px'; ext.iframe.style.backgroundColor = '#FFFFFF'; ext.iframe.src = 'about:blank'; document.body.appendChild(ext.iframe); }; ext.hide = function() { document.body.removeChild(ext.iframe); }; ext.goTo = function(newUrl) { ext.iframe.src = newUrl; }; ext.getUrl = function() { var url = ''; try { url = ext.iframe.contentWindow.location.href; } catch(e) { url = ext.iframe.src; } return url; }; var descriptor = { blocks: [ [' ', 'show with top %n left %n width %n height %n', 'show', 0, 0, 480, 360], [' ', 'hide', 'hide'], [' ', 'go to %s', 'goTo', 'http://scratchx.org/'], ['r', 'url', 'getUrl'] ] }; ScratchExtensions.register('Web', descriptor, ext); })({});
It has a few limitations: if the user navigates somewhere other than the same domain (scratchx.org) you can't get the location.
You also need to position it correctly (which is hard) and ideally you would detect fullscreen or small editor mode and change to accommodate for that.
Not yet a Knight of the Mu Calculus.
- -SuperScratch-
- Scratcher
100+ posts
Somone should make a...
Cool! But how do I put the code to make the thing work? Got this so far:(function(ext) { ext._shutdown = function() {}; ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; ext.oldUrl = ''; ext.show = function(t, l, w, h) { ext.iframe = document.createElement('iframe'); ext.iframe.style.position = 'absolute'; ext.iframe.style.top = t + 'px'; ext.iframe.style.left = l + 'px'; ext.iframe.style.width = w + 'px'; ext.iframe.style.height = h + 'px'; ext.iframe.style.backgroundColor = '#FFFFFF'; ext.iframe.src = 'about:blank'; document.body.appendChild(ext.iframe); }; ext.hide = function() { document.body.removeChild(ext.iframe); }; ext.goTo = function(newUrl) { ext.iframe.src = newUrl; }; ext.getUrl = function() { var url = ''; try { url = ext.iframe.contentWindow.location.href; } catch(e) { url = ext.iframe.src; } return url; }; var descriptor = { blocks: [ [' ', 'show with top %n left %n width %n height %n', 'show', 0, 0, 480, 360], [' ', 'hide', 'hide'], [' ', 'go to %s', 'goTo', 'http://scratchx.org/'], ['r', 'url', 'getUrl'] ] }; ScratchExtensions.register('Web', descriptor, ext); })({});
It has a few limitations: if the user navigates somewhere other than the same domain (scratchx.org) you can't get the location.
You also need to position it correctly (which is hard) and ideally you would detect fullscreen or small editor mode and change to accommodate for that.
- enilK
- Scratcher
85 posts
Somone should make a...
That is why we add the extension blocks after we share the projects.but you can't even share projects with extensions on Scratch (well, without it breaking) Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
;
Here are some foods for you KUMqUATS to eat instead of my signature:report [~enilK] :: control cap
- savaka
- Scratcher
1000+ posts
Somone should make a...
That is why we add the extension blocks after we share the projects.but you can't even share projects with extensions on Scratch (well, without it breaking) Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
1. It doesn't matter if extensions could be used in an unsafe way, that's why ScratchX has the warning.
2. Extensions are used on ScratchX, not Scratch.
Last edited by savaka (Aug. 3, 2016 21:34:20)
- BookOwl
- Scratcher
1000+ posts
Somone should make a...
Necropost, maybe?That is why we add the extension blocks after we share the projects.but you can't even share projects with extensions on Scratch (well, without it breaking) Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
1. It doesn't matter if extensions could be used in an unsafe way, that's why ScratchX has the warning.
2. Extensions are used on ScratchX, not Scratch.
who needs signatures
- -SuperScratch-
- Scratcher
100+ posts
Somone should make a...
Nah I kinda wanted people to see this againNecropost, maybe?That is why we add the extension blocks after we share the projects.but you can't even share projects with extensions on Scratch (well, without it breaking) Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
1. It doesn't matter if extensions could be used in an unsafe way, that's why ScratchX has the warning.
2. Extensions are used on ScratchX, not Scratch.
- JGames101
- Scratcher
100+ posts
Somone should make a...
Use the developer tools on Chrome (F12), navigate to the console, and paste it in. I know there's someway to do it on safari, but I don't know if you can do that on other browsers.Cool! But how do I put the code to make the thing work? Got this so far:(function(ext) { ext._shutdown = function() {}; ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; ext.oldUrl = ''; ext.show = function(t, l, w, h) { ext.iframe = document.createElement('iframe'); ext.iframe.style.position = 'absolute'; ext.iframe.style.top = t + 'px'; ext.iframe.style.left = l + 'px'; ext.iframe.style.width = w + 'px'; ext.iframe.style.height = h + 'px'; ext.iframe.style.backgroundColor = '#FFFFFF'; ext.iframe.src = 'about:blank'; document.body.appendChild(ext.iframe); }; ext.hide = function() { document.body.removeChild(ext.iframe); }; ext.goTo = function(newUrl) { ext.iframe.src = newUrl; }; ext.getUrl = function() { var url = ''; try { url = ext.iframe.contentWindow.location.href; } catch(e) { url = ext.iframe.src; } return url; }; var descriptor = { blocks: [ [' ', 'show with top %n left %n width %n height %n', 'show', 0, 0, 480, 360], [' ', 'hide', 'hide'], [' ', 'go to %s', 'goTo', 'http://scratchx.org/'], ['r', 'url', 'getUrl'] ] }; ScratchExtensions.register('Web', descriptor, ext); })({});
It has a few limitations: if the user navigates somewhere other than the same domain (scratchx.org) you can't get the location.
You also need to position it correctly (which is hard) and ideally you would detect fullscreen or small editor mode and change to accommodate for that.
- savaka
- Scratcher
1000+ posts
Somone should make a...
All browsers I've used have dev console (Firefox, Edge, Chrome, IE)Use the developer tools on Chrome (F12), navigate to the console, and paste it in. I know there's someway to do it on safari, but I don't know if you can do that on other browsers.Cool! But how do I put the code to make the thing work? Got this so far:(function(ext) { ext._shutdown = function() {}; ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; ext.oldUrl = ''; ext.show = function(t, l, w, h) { ext.iframe = document.createElement('iframe'); ext.iframe.style.position = 'absolute'; ext.iframe.style.top = t + 'px'; ext.iframe.style.left = l + 'px'; ext.iframe.style.width = w + 'px'; ext.iframe.style.height = h + 'px'; ext.iframe.style.backgroundColor = '#FFFFFF'; ext.iframe.src = 'about:blank'; document.body.appendChild(ext.iframe); }; ext.hide = function() { document.body.removeChild(ext.iframe); }; ext.goTo = function(newUrl) { ext.iframe.src = newUrl; }; ext.getUrl = function() { var url = ''; try { url = ext.iframe.contentWindow.location.href; } catch(e) { url = ext.iframe.src; } return url; }; var descriptor = { blocks: [ [' ', 'show with top %n left %n width %n height %n', 'show', 0, 0, 480, 360], [' ', 'hide', 'hide'], [' ', 'go to %s', 'goTo', 'http://scratchx.org/'], ['r', 'url', 'getUrl'] ] }; ScratchExtensions.register('Web', descriptor, ext); })({});
It has a few limitations: if the user navigates somewhere other than the same domain (scratchx.org) you can't get the location.
You also need to position it correctly (which is hard) and ideally you would detect fullscreen or small editor mode and change to accommodate for that.
- Discussion Forums
- » Developing Scratch Extensions
- » Somone should make a...