Discuss Scratch

-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!

Y R U READING THIS POST???!!!
ITS MADE BY -SUPERSCRATCH-!
(That took forever tho)
I like gummy bears
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...

DrKat123 wrote:

Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
True but mabye like only opens to scratch sites?

Y R U READING THIS POST???!!!
ITS MADE BY -SUPERSCRATCH-!
(That took forever tho)
I like gummy bears
Jonathan50
Scratcher
1000+ posts

Somone should make a...

DrKat123 wrote:

Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
but you can't even share projects with extensions on Scratch (well, without it breaking)

Paddle2See wrote:

AT is for advanced Scratch - and non-Scratch topics.
Jonathan50
Scratcher
1000+ posts

Somone should make a...

I'll do this tomorrow.
iframe shims!

Paddle2See wrote:

AT is for advanced Scratch - and non-Scratch topics.
-SuperScratch-
Scratcher
100+ posts

Somone should make a...

Jonathan50 wrote:

I'll do this tomorrow.
iframe shims!
YAY! Somone lked my idea!
kinda

Y R U READING THIS POST???!!!
ITS MADE BY -SUPERSCRATCH-!
(That took forever tho)
I like gummy bears
carrick543
Scratcher
15 posts

Somone should make a...


what/?
what you mean?

Last edited by carrick543 (Dec. 15, 2015 19:27:15)

carrick543
Scratcher
15 posts

Somone should make a...

-SuperScratch- wrote:

what/?
this is getting confusing
Jonathan50
Scratcher
1000+ posts

Somone should make a...

carrick543 wrote:

fnaf!
Hello. Welcome to the Scratch forums.
Please do not spam or post things entirely irrelevant to the discussion.

Paddle2See wrote:

AT is for advanced Scratch - and non-Scratch topics.
-SuperScratch-
Scratcher
100+ posts

Somone should make a...

Jonathan50 wrote:

I'll do this tomorrow.
iframe shims!
How is it going? (On the extention)

Y R U READING THIS POST???!!!
ITS MADE BY -SUPERSCRATCH-!
(That took forever tho)
I like gummy bears
Jonathan50
Scratcher
1000+ posts

Somone should make a...

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.

Paddle2See wrote:

AT is for advanced Scratch - and non-Scratch topics.
-SuperScratch-
Scratcher
100+ posts

Somone should make a...

Jonathan50 wrote:

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.
Cool! But how do I put the code to make the thing work?

Y R U READING THIS POST???!!!
ITS MADE BY -SUPERSCRATCH-!
(That took forever tho)
I like gummy bears
enilK
Scratcher
74 posts

Somone should make a...

Jonathan50 wrote:

DrKat123 wrote:

Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
but you can't even share projects with extensions on Scratch (well, without it breaking)
That is why we add the extension blocks after we share the projects.


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...

enilK wrote:

Jonathan50 wrote:

DrKat123 wrote:

Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
but you can't even share projects with extensions on Scratch (well, without it breaking)
That is why we add the extension blocks after we share the projects.

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...

savaka wrote:

enilK wrote:

Jonathan50 wrote:

DrKat123 wrote:

Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
but you can't even share projects with extensions on Scratch (well, without it breaking)
That is why we add the extension blocks after we share the projects.

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.
Necropost, maybe?

It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures.
- Alan J. Perlis
-SuperScratch-
Scratcher
100+ posts

Somone should make a...

BookOwl wrote:

savaka wrote:

enilK wrote:

Jonathan50 wrote:

DrKat123 wrote:

Neh, too dangerous. someone could open a link to a dangerous site or an inappropriate site
but you can't even share projects with extensions on Scratch (well, without it breaking)
That is why we add the extension blocks after we share the projects.

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.
Necropost, maybe?
Nah I kinda wanted people to see this again

Y R U READING THIS POST???!!!
ITS MADE BY -SUPERSCRATCH-!
(That took forever tho)
I like gummy bears
JGames101
Scratcher
84 posts

Somone should make a...

-SuperScratch- wrote:

Jonathan50 wrote:

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.
Cool! But how do I put the code to make the thing work?
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.
savaka
Scratcher
1000+ posts

Somone should make a...

JGames101 wrote:

-SuperScratch- wrote:

Jonathan50 wrote:

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.
Cool! But how do I put the code to make the thing work?
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.
All browsers I've used have dev console (Firefox, Edge, Chrome, IE)
Molasses
Scratcher
30 posts

Somone should make a...

-SuperScratch- wrote:

Extention that opens up a little tab on the scratch window that lets you see the web!
i dont understand what you mean by this..

Powered by DjangoBB

Standard | Mobile