[Chrome Extension] AI2Helper - download all blocks seperately and remove all orphan blocks with one click

My guess is that the extension is making certain assumptions about the particularly Blockly version. Scratch blocks were created on a newer version of Blockly than App Inventor currently uses, so my guess is that it is failing to grab all of the necessary style dependencies to produce the right SVG. I do have a tool to generate all of the blocks from a given extension, which is used to provide the images in the IOT website e.g., the BluetootheLE docs where the images are actually SVG. That's done using nodejs, so a similar technique should work in the browser.

4 Likes

The block is not exporting correctly because newer version of blockly change the CSS injunction (currently we are not able to get CSS style using javascript blockly API) so now we have to select element form DOM and then copy the CSS content of the element.

Congratulations @Kevinkun!! Your extension is wonderful!! I had a lot of trouble when I needed to find blocks since the two apps I have built using App Inventor are quite large. It took me ages of panning and zooming in and out, and with your extension I can go directly where I want!

Thank you so much!!

3 Likes

You can also use the eighth note search:

  1. go to the three dots at the top right
  2. click on find and write the name of what you want to find.
    Unfortunately, it just does that, for everything else just follow the advice to download the extension. Hello
1 Like

Thanks again! Works as expected on Chrome. My browser is Firefox, I'll try that too.
What I find confusing is that it always says "Found one match", it would be nice
if it said "n of m" - but may be tricky to code...

I made another version of AI2 block helper:

This time we use tampermonkey.

HOW TO INSTALL

  1. go to tampermonkey, install the browser extension according to your browser.
  2. go to App Inventer 2 block helper (greasyfork.org), to install this userscript.
  3. open https://ai2.appinventer.mit.edu, open your project (if autoload is distabled), in about 10 seconds, you will see the buttons as below:
  4. done.
4 Likes

( greasyfork script/extension added to FAQ)

I made an update for this AI2HELPER, now it looks like this:
Snipaste_2023-12-30_20-49-08

Click the AI2HELPER button, it will show (or hide) a palette, you will see some buttons and a list of all the top blocks (global variables, procedures, and events) in alphabetical order.

Click on this list item, it will highlight the relavent blocks.

for how to use, click here

4 Likes

The Greasy Fork version has stopped working.

I am seeing disquieting things at that site.

@ABG Sorry I don't understand what you mean.
And I can not find the post which is saying greasy fork not work.

My apologies, the AI2Helper button moved to the center of the AI2 header bar from the far right, and I must have tunnel vision.

I was distracted trying to find out what the TamperMonkey icon was trying to tell me with that red 1.

The Greasy Fork site now looks less hacked than before.

1 Like

Blocks button on right side of screen gets cut off after update of AI2Helper script to v0.7.6
Running on chrome. Browser zoom at 100%

Another picture of Blocks button cut off
Designer button also cut off

I have reverted back to older version 0.7.2

Thanks for your report. please check with 0.7.7.
Now the helper will hide automaticly when switching to designer view.
If the screen is not wide enough, you need to use the horizontal scrollbar.

1 Like

Hi
I have tried the 0.7.7 version but I think I will stick to the old version 0.7.2

Anyway it is a real time saver in searching and locating blocks fast and easily.
Thank you for creating this script.

I am using version 0.7.7 and lose most of my controls bar after turning on the extension.


None of the AI2 scroll bars or dragging attempts work at exposing the Designer/Blocks Editor buttons once this happens.

Sample run

Sorry for the bad experience.
You can downgrade to 0.7.2.

but 0.7.7 is working on my computer very nice.
动画

The error happens when switching screens to screens with lots of blocks.

Reverting to 0.7.2 avoids the error.

1 Like