Discuss Scratch

EDO2012
Scratcher
100+ posts

Remove check boxes?

(function(ext) {
ext._shutdown = function() {};
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};

ext.user = function(a) {
return Scratch.INIT_DATA.LOGGED_IN_USER.model.username;
};

ext.teacher = function(a) {
return Scratch.INIT_DATA.LOGGED_IN_USER.model.is_educator;
};

ext.student = function(a) {
return Scratch.INIT_DATA.LOGGED_IN_USER.model.is_student;
};

ext.pic = function(a) {
return Scratch.INIT_DATA.LOGGED_IN_USER.model.thumbnail_url;
};

ext.picOpen = function(a) {
window.open(Scratch.INIT_DATA.LOGGED_IN_USER.model.thumbnail_url);
};

ext.id = function(a) {
return Scratch.INIT_DATA.LOGGED_IN_USER.model.id;
};

ext.profileOpen = function(a) {
window.open(Scratch.INIT_DATA.LOGGED_IN_USER.model.profile_url);
};

ext.profile = function(a) {
return Scratch.INIT_DATA.LOGGED_IN_USER.model.profile_url;
};
var descriptor = {
blocks: [
['r', 'username', 'user'],
['r', 'user ID', 'id'],
['b', 'is teacher?', 'teacher'],
['b', 'is student?', 'student'],
['r', 'profile pic URL', 'pic'],
[' ', 'open profile pic', 'picOpen'],
['r', 'profile URL', 'profile'],
[' ', 'open profile', 'profileOpen'],
],
};
ScratchExtensions.register("User Information", descriptor, ext);
})({});
I was making this extension and I noticed that there are check boxes by each of these reporter blocks. How do I get rid of these?


_nix
Scratcher
500+ posts

Remove check boxes?

Why would you want to get rid of them?

As far as I know adding an input to a reporter block will get rid of its checkbox. But that's the only way.

blog (it has art, code, and stuff)
savaka
Scratcher
1000+ posts

Remove check boxes?

_nix wrote:

Why would you want to get rid of them?

As far as I know adding an input to a reporter block will get rid of its checkbox. But that's the only way.
Yes, just add an input, for example:
['r', 'profile pic URL', 'pic', '']
I used an empty string and it won't show anywhere since the block doesn't actually have any inputs
_nix
Scratcher
500+ posts

Remove check boxes?

savaka wrote:

_nix wrote:

Why would you want to get rid of them?

As far as I know adding an input to a reporter block will get rid of its checkbox. But that's the only way.
Yes, just add an input, for example:
['r', 'profile pic URL', 'pic', '']
I used an empty string and it won't show anywhere since the block doesn't actually have any inputs
Oh, that's clever!

blog (it has art, code, and stuff)
EDO2012
Scratcher
100+ posts

Remove check boxes?

savaka wrote:

_nix wrote:

Why would you want to get rid of them?

As far as I know adding an input to a reporter block will get rid of its checkbox. But that's the only way.
Yes, just add an input, for example:
['r', 'profile pic URL', 'pic', '']
I used an empty string and it won't show anywhere since the block doesn't actually have any inputs
That's smart. Thanks


Powered by DjangoBB

Standard | Mobile