You are browsing as a guest. Sign up (or log in) to start making projects!

SmoothActions

  • 1 Devlogs
  • 2 Total hours

SmoothActions is a browser extension designed to eliminate the tiny, repetitive tasks that slow you down online. The internet is full of friction — copying code blocks, cleaning messy URLs, scrolling long pages, downloading images one‑by‑one, and performing the same actions across different sites. Each task only takes a few seconds, but repeated hundreds of times, they add up. SmoothActions removes that friction with one‑click automations. Instead of repeating the same workflow over and over, you click a single button in the extension popup and SmoothActions handles the rest instantly.

Open comments for this post

1h 33m 1s logged

Today I started building the first real feature for SmoothActions: Copy All Code Blocks.
The goal was simple — click a button in the extension popup and instantly grab every code example from any webpage. ( ̄y▽ ̄)╭ Ohohoho…..

What I built
I wired up the popup UI and wrote the first version of the script that searches the page for and elements. The popup could run scripts on the active tab, and the alert showed up correctly.

The problem
When I tested it on MDN, it didn’t copy the code examples.
Instead, it copied random labels like:

Code
for
condition
continue
break
At first I thought the selector was wrong, but the real issue was that MDN doesn’t use normal or tags for its examples. Some code is inside custom containers, some inside shadow DOM, and some duplicated in the sidebar.

The fix
I rewrote the feature to:

scan normal and blocks

scan MDN‑specific classes like .notranslate and .language-js

scan inside shadow DOM elements

return all code blocks as one combined string

Once I injected the script properly using chrome.scripting.executeScript with a separate file, everything worked. The extension now successfully copies all code examples from the MDN Loops & Iteration page. o(  ̄ ▽ ̄)ブ pluh…

Today I started building the first real feature for SmoothActions: Copy All Code Blocks.
The goal was simple — click a button in the extension popup and instantly grab every code example from any webpage. ( ̄y▽ ̄)╭ Ohohoho…..

What I built
I wired up the popup UI and wrote the first version of the script that searches the page for and elements. The popup could run scripts on the active tab, and the alert showed up correctly.

The problem
When I tested it on MDN, it didn’t copy the code examples.
Instead, it copied random labels like:

Code
for
condition
continue
break
At first I thought the selector was wrong, but the real issue was that MDN doesn’t use normal or tags for its examples. Some code is inside custom containers, some inside shadow DOM, and some duplicated in the sidebar.

The fix
I rewrote the feature to:

scan normal and blocks

scan MDN‑specific classes like .notranslate and .language-js

scan inside shadow DOM elements

return all code blocks as one combined string

Once I injected the script properly using chrome.scripting.executeScript with a separate file, everything worked. The extension now successfully copies all code examples from the MDN Loops & Iteration page. o(  ̄ ▽ ̄)ブ pluh…

Replying to @Jinsu

0
4

Followers

Loading…