<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jason Lo</title>
    <description>The latest articles on DEV Community by Jason Lo (@jlocoding).</description>
    <link>https://dev.to/jlocoding</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F369092%2F6fb0c261-4cb2-43fd-9288-8c572be32aab.png</url>
      <title>DEV Community: Jason Lo</title>
      <link>https://dev.to/jlocoding</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jlocoding"/>
    <language>en</language>
    <item>
      <title>uBlock Origin Extension with Dia Browser</title>
      <dc:creator>Jason Lo</dc:creator>
      <pubDate>Sun, 17 May 2026 12:08:04 +0000</pubDate>
      <link>https://dev.to/jlocoding/ublock-origin-extension-with-dia-browser-d9j</link>
      <guid>https://dev.to/jlocoding/ublock-origin-extension-with-dia-browser-d9j</guid>
      <description>&lt;p&gt;Recently, I moved from using Arc browser to Dia browser to try the integrated AI features. The change that I first noticed was that uBlock Origin extension is no longer available on Dia browser, a chromium based browser.&lt;/p&gt;

&lt;p&gt;It turned out to be the new version of Chrome, 140 has turned on the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ExtensionManifestV2Unsupported&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ExtensionManifestV2Disabled&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;In order to get around it perfectly, I refined the solution a few times.&lt;/p&gt;

&lt;h3&gt;
  
  
  1st iteration
&lt;/h3&gt;

&lt;p&gt;A fast immediate workaround is open terminal on Mac and execute&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;/Applications/Dia.app/Contents/MacOS/Dia \
  --disable-features=ExtensionManifestV2Unsupported,ExtensionManifestV2Disabled
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It opens the Dia browser with the two enabled features disabled. Then, go &lt;a href="https://chromewebstore.google.com/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm&lt;/a&gt; to download the no longer supported &lt;code&gt;uBlock origin&lt;/code&gt; extension.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tdey8hq1kue2vduasis.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tdey8hq1kue2vduasis.png" alt=" " width="800" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2nd iteration
&lt;/h3&gt;

&lt;p&gt;Hooray! It worked just fine! Wait! Hang on! Isn't it means I need to open Dia browser through terminal every single time?! It's quickly becoming inconvenient. I need a one-button-click solution!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://support.apple.com/en-gb/guide/automator/welcome/mac" rel="noopener noreferrer"&gt;Automator&lt;/a&gt;&lt;/strong&gt; to save the day!&lt;/p&gt;

&lt;p&gt;I created an Automator application to run the script.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/Applications/Dia.app/Contents/MacOS/Dia &lt;span class="nt"&gt;--disable-features&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ExtensionManifestV2Unsupported,ExtensionManifestV2Disabled &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null 2&amp;gt;&amp;amp;1 &amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is important to have &lt;code&gt;&amp;gt;/dev/null&lt;/code&gt; so that it redirects &lt;code&gt;stdout&lt;/code&gt; (normal output) to &lt;code&gt;/dev/null&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Then &lt;code&gt;2&amp;gt;&amp;amp;1&lt;/code&gt; redirects &lt;code&gt;stderr&lt;/code&gt; (error output) to wherever &lt;code&gt;stdout&lt;/code&gt; (1) currently goes.&lt;/p&gt;

&lt;p&gt;Finally the last &lt;code&gt;&amp;amp;&lt;/code&gt; is to run the process in the background so your terminal/script continues immediately. It is important that the script does not block waiting for the process to exit.&lt;/p&gt;

&lt;h4&gt;
  
  
  Beautify the application icon
&lt;/h4&gt;

&lt;p&gt;Look at the default automator icon makes me sad. :( &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8rw5tovz0oweeuo7tu9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8rw5tovz0oweeuo7tu9.png" alt=" " width="36" height="34"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I found that it's actually pretty straightforward to do to replace it with the original Dia icon!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Right click the actual Dia application icon&lt;/li&gt;
&lt;li&gt;Select "Get info"&lt;/li&gt;
&lt;li&gt;Click on the application icon at the bottom and press &lt;code&gt;Cmd + c&lt;/code&gt; to copy to clipboard.&lt;/li&gt;
&lt;li&gt;Right click the new automator application icon&lt;/li&gt;
&lt;li&gt;Select "Get info"&lt;/li&gt;
&lt;li&gt;Paste the copied Dia icon&lt;/li&gt;
&lt;li&gt;Job done!&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Final iteration
&lt;/h3&gt;

&lt;p&gt;Happiness only lasted for a few days until I found another issue.&lt;/p&gt;

&lt;p&gt;I have an habit to click the Dia icon to focus back to the opened Dia window. Don't ask me why I didn't it this way, it's just my preference! :P &lt;/p&gt;

&lt;p&gt;The problem is when I click the Dia icon again, the script tries to open Dia application instead of focusing the current window. A prompt then shows up to tell me off Dia is already opened!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo3j4qa32t9x6y2veg46d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo3j4qa32t9x6y2veg46d.png" alt=" " width="257" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To get around this, I finally updated the automator script to check if Dia is already opened. If yes, activate and focus the current Dia window. Otherwise, open a new Dia application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; pgrep &lt;span class="nt"&gt;-x&lt;/span&gt; &lt;span class="s2"&gt;"Dia"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
/Applications/Dia.app/Contents/MacOS/Dia &lt;span class="nt"&gt;--disable-features&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ExtensionManifestV2Unsupported,ExtensionManifestV2Disabled &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null 2&amp;gt;&amp;amp;1 &amp;amp;
&lt;span class="k"&gt;else
&lt;/span&gt;osascript &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s1"&gt;'tell application "Dia" to activate'&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;osascript&lt;/code&gt; is a macOS command-line tool that lets you run AppleScript from Terminal, shell scripts, or Automator.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Hooray!!&lt;/strong&gt; I finally managed to get ublock origin extension working on Dia browser seamlessly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;This is not a permanent solution to have ublock origin extension installed and working on Dia or new chromium based browsers since future Chrome updates may still block or break this workaround.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New ublock origin updates might be limited, incompatible, or unavailable under this setup.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>browser</category>
    </item>
  </channel>
</rss>
