Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Giving Scratch 3 "Inspect Element Surgery"!
- chexbox
-
100+ posts
Giving Scratch 3 "Inspect Element Surgery"!
I decided to play with the inspector on firefox. Here's my what I learned:

Each block has a “hitbox”. It is a <rect> html svg element which opacity is usually 0.

I changed the font. It is amazing how many times the font is defined.

I made everything red! (font still changed)

Image switched with my own.
Scratch does not like small screens:



Share what you've learned about Scratch 3.0 and it's styling below!

Each block has a “hitbox”. It is a <rect> html svg element which opacity is usually 0.

I changed the font. It is amazing how many times the font is defined.

I made everything red! (font still changed)

Image switched with my own.
Scratch does not like small screens:



Share what you've learned about Scratch 3.0 and it's styling below!
Last edited by chexbox (April 18, 2018 13:44:42)
- LuckyLucky7
-
1000+ posts
Giving Scratch 3 "Inspect Element Surgery"!
I was able to make some blocks' name empty;
I deleted some elements trying to do this.
I deleted some elements trying to do this.
- ryadyl
-
23 posts
Giving Scratch 3 "Inspect Element Surgery"!
I'm trying to use inspect element to recreate “hacked blocks” in scratch 3.0. I was trying to make
if (answer) thenso that the password would be “true” and you could not find this by looking inside. I have not currently succeded, but I feel that I am getting close.
end
- Garamol56
-
100+ posts
Giving Scratch 3 "Inspect Element Surgery"!
Run
In your browser's console to swap the side of the editor
document.querySelector("[class^=target-pane_target-pane]").classList.toggle("reversed"),document.querySelector("[class^=gui_flex-wrapper]").classList.toggle("reversed");
- JGames101
-
100+ posts
Giving Scratch 3 "Inspect Element Surgery"!
That doesn't do anything, there's no reversed class. Use RunIn your browser's console to swap the side of the editordocument.querySelector("[class^=target-pane_target-pane]").classList.toggle("reversed"),document.querySelector("[class^=gui_flex-wrapper]").classList.toggle("reversed");
document.querySelector("[class^=target-pane_target-pane]").style.flexDirection = "row-reverse",document.querySelector("[class^=gui_flex-wrapper]").style.flexDirection = "row-reverse";
Last edited by JGames101 (Jan. 5, 2019 23:32:55)
- infinitytec
-
1000+ posts
Giving Scratch 3 "Inspect Element Surgery"!
I'm using this to help me make themes.
- LuckyLucky7
-
1000+ posts
Giving Scratch 3 "Inspect Element Surgery"!
This might potientally help me make a Scratch 3 mod where the stage is on the left! Thanks!That doesn't do anything, there's no reversed class. Use RunIn your browser's console to swap the side of the editordocument.querySelector("[class^=target-pane_target-pane]").classList.toggle("reversed"),document.querySelector("[class^=gui_flex-wrapper]").classList.toggle("reversed");Instead.document.querySelector("[class^=target-pane_target-pane]").style.flexDirection = "row-reverse",document.querySelector("[class^=gui_flex-wrapper]").style.flexDirection = "row-reverse";
- NitroCipher
-
500+ posts
Giving Scratch 3 "Inspect Element Surgery"!
Just added the swapping to Theme3, thanks JGames101!
- ItsDaBeans
-
53 posts
Giving Scratch 3 "Inspect Element Surgery"!
That doesn't do anything, there's no reversed class. UseWow that works!Instead.document.querySelector("[class^=target-pane_target-pane]").style.flexDirection = "row-reverse",document.querySelector("[class^=gui_flex-wrapper]").style.flexDirection = "row-reverse";
- iiBus
-
42 posts
Giving Scratch 3 "Inspect Element Surgery"!
That doesn't make sence I'm trying to use inspect element to recreate “hacked blocks” in scratch 3.0. I was trying to makeif (answer) thenso that the password would be “true” and you could not find this by looking inside. I have not currently succeded, but I feel that I am getting close.
doesn't make sence
end
- SpeedDesign
-
8 posts
Giving Scratch 3 "Inspect Element Surgery"!
can you do small blocks with this?
- infinitytec
-
1000+ posts
Giving Scratch 3 "Inspect Element Surgery"!
I have not gotten that to work. can you do small blocks with this?
- Sheep_maker
-
1000+ posts
Giving Scratch 3 "Inspect Element Surgery"!
The blocks are rendered using SVGs generated by JavaScript; even if you manage to update every single SVG, it'll all get reset if you don't update the JavaScript variables as well can you do small blocks with this?
- frodewin
-
500+ posts
Giving Scratch 3 "Inspect Element Surgery"!
The blocks are rendered using SVGs generated by JavaScript; even if you manage to update every single SVG, it'll all get reset if you don't update the JavaScript variables as well can you do small blocks with this?
So as far as I understood making the blocks smaller is difficult. But would it be possible to increase font size and weight within a block so that the block text is still readable when viewed in 50% size?
- Sheep_maker
-
1000+ posts
Giving Scratch 3 "Inspect Element Surgery"!
Increasing the font size and weight would increase the text width, but each text part (eg block labels and inputs) and the block width itself is dependent on the width of the text before it; increasing the width would result in overlapping and overflowing textThe blocks are rendered using SVGs generated by JavaScript; even if you manage to update every single SVG, it'll all get reset if you don't update the JavaScript variables as well can you do small blocks with this?
So as far as I understood making the blocks smaller is difficult. But would it be possible to increase font size and weight within a block so that the block text is still readable when viewed in 50% size?
- --Explosion--
-
1000+ posts
Giving Scratch 3 "Inspect Element Surgery"!
What you can do for hiding a password is translate a string to numbers and then do some sort of mathematic function that us hard to reverse on that number and then when the user enters a password it checks that aginst the actual encrypted version, that way it is very hard to crackThat doesn't make sence I'm trying to use inspect element to recreate “hacked blocks” in scratch 3.0. I was trying to makeif (answer) thenso that the password would be “true” and you could not find this by looking inside. I have not currently succeded, but I feel that I am getting close.
doesn't make sence
end
- NitroCipher
-
500+ posts
Giving Scratch 3 "Inspect Element Surgery"!
What you can do for hiding a password is translate a string to numbers and then do some sort of mathematic function that us hard to reverse on that number and then when the user enters a password it checks that aginst the actual encrypted version, that way it is very hard to crackThat doesn't make sence I'm trying to use inspect element to recreate “hacked blocks” in scratch 3.0. I was trying to makeif (answer) thenso that the password would be “true” and you could not find this by looking inside. I have not currently succeded, but I feel that I am getting close.
doesn't make sence
end
Take a look at this project I made ~2.5 years ago https://scratch-mit-edu.ezproxyberklee.flo.org/projects/135744907 , it does exactly what @staffordboys is saying.
Last edited by NitroCipher (May 25, 2019 05:00:35)
- klasky1
-
100+ posts
Giving Scratch 3 "Inspect Element Surgery"!
it is. works in snap.That doesn't make sence I'm trying to use inspect element to recreate “hacked blocks” in scratch 3.0. I was trying to makeif (answer) thenso that the password would be “true” and you could not find this by looking inside. I have not currently succeded, but I feel that I am getting close.
make sence for the {if (answer) then
...
end} block
end
Last edited by klasky1 (May 23, 2019 11:46:05)
- Creeper_Bomb
-
88 posts
Giving Scratch 3 "Inspect Element Surgery"!
The answer is 1. Binary code uses 1s and 0s. Computers use binary code as true & false. 1 = true. I'm trying to use inspect element to recreate “hacked blocks” in scratch 3.0. I was trying to makeif (answer) thenso that the password would be “true” and you could not find this by looking inside. I have not currently succeded, but I feel that I am getting close.
end
- Kami-ko
-
100+ posts
Giving Scratch 3 "Inspect Element Surgery"!
Ha ha …. inspect is blocked on my (school) computer …. haha … *starts crying*
- Discussion Forums
- » Advanced Topics
-
» Giving Scratch 3 "Inspect Element Surgery"!