Inspiration
Harry loves VS Code shortcuts and enjoys shortcuts in general. We were trying to find something that we personally would use, and after some brainstorming, the idea of shortcuts for the browser clicked. For example, very few people would realistically use a recipe app consistently. They would probably forget about it after a while. With our extension, after you make a macro, it will become second nature to use the functions, and they will be used consistently.
What it does
The command will be written in JavaScript using several pre-established commands, a list of which will be given to the user inside the extension through a drop-down menu that allows them to select which commands they want to use. Many commands, such as opening tabs, clearing cache, scrolling down, zooming out, clicking on elements, etc. are given to the user to increase the program's versatility. The user can easily have multiple commands be executed in sequence. For example, if the user regularly opens a certain web page and scrolls down to a certain section on that web page, they could create a macro to do so. The first command executed would open the web page, and after the page loads, the next command would take them down to their desired section.
Example script (opens outlook and google and closes all youtube tabs):
openNewTab("https://outlook.com");
openNewTab("https://github.com");
closeTabs((tab) => tab.url.includes('youtube'))
How we built it/How it works
We used a ViteJS app with Preact (a React alternative) to build the extension, which interacted with the Chrome extension API. After the code is created, the predefined functions are appended to the global scope, and the command is executed. The commands are saved in localStorage.
Challenges we ran into
There were a couple bugs that took a while to fix, but in the end we managed to find a solution for all of them. We were going to implement keyboard shortcuts, but in the end we decided we need to focus on the macros themselves and how they function.
Accomplishments that we're proud of
The code editor Harry managed to implement was pretty cool. Senuka was proud of finding both of Harry's bugs that caused us to lose our minds for 30 minutes each time. We also think the functionality for closing tabs was pretty cool. In theory you could have incredibly complicated macros, we just didn't have time to test the possibilities.
What we learned
We learned that sometimes we need to sacrifice the ideas we want to do in order to finish the project. Many ideas we had needed to be scrapped because they were unnecessary and were wasting our time.
What's next for Shortcut Manager
Implementing keyboard shortcuts to run the macros wherever, as well as creating more commands in general. Making the UI more friendly for non-coders would be good too.
Built With
- chrome
- codemirror
- preact
- typescript
- vite
Log in or sign up for Devpost to join the conversation.