Skip to content

v3, multiple improvements, bug fixes, profiles feature, custom webpag…#42

Open
diegomarzaa wants to merge 1 commit into
uptechteam:devfrom
diegomarzaa:dev
Open

v3, multiple improvements, bug fixes, profiles feature, custom webpag…#42
diegomarzaa wants to merge 1 commit into
uptechteam:devfrom
diegomarzaa:dev

Conversation

@diegomarzaa
Copy link
Copy Markdown

…e and youtube support, improved design

Copilot AI review requested due to automatic review settings May 9, 2026 11:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is a Manifest V3 rewrite of the extension with a redesigned popup UI and a new “profiles” model for per-context defaults/rules, plus expanded URL/service support (notably YouTube) and import/export.

Changes:

  • Migrates MV2 background/webRequest logic to an MV3 service worker using webNavigation interception.
  • Adds profiles (inheritance/override), rules editor redesign, quick-switch UI, and import/export + behaviour settings.
  • Expands supported services and URL matching (YouTube/Blogger and more Google services).

Reviewed changes

Copilot reviewed 13 out of 18 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
utils.js Reworked URL matching/redirect helpers; added service catalog, profile model + storage helpers, global settings defaults.
service-worker.js New MV3 background worker: state loading, migration, navigation interception, messaging, profile switching redirect logic.
app.js New popup “orchestrator” for profiles, quick-switch, settings overlay, import/export, and behaviour settings wiring.
rules.js Replaced legacy rules UI with profile-aware rules editor (including inherited rule override UX).
profiles.js New profile CRUD UI (create/edit/duplicate/delete/activate) rendered in settings overlay.
popup.html Full popup layout rewrite: profile bar, quick-switch, banner + tab chooser, settings overlay & templates.
styles.css Large UI redesign: variables, dark mode, new components (chips, overlays, modals, rules editor).
manifest.json MV3 manifest, service worker entry, permissions/host_permissions, commands, min Chrome bump.
manifest_firefox.json Updated MV2 Firefox manifest wiring to new background logic + permissions.
README.md Updated documentation for fork/profiles/features/install + new architecture.
CHANGES.md New detailed changelog for the rewrite and feature set.
background.js Removed legacy MV2 background script.
accounts.js Removed legacy accounts tab logic (moved into app.js).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread service-worker.js
Comment on lines +202 to +204
function handleNavigation(tabId, url) {
if (!isGoogleServiceUrl(url) && !isCustomServiceUrl(url)) return;

Comment thread service-worker.js
@@ -0,0 +1,289 @@
importScripts("utils.js");
Comment thread utils.js
Comment on lines 3 to +7
function isGoogleServiceUrl(url) {
return (
/^https?:\/\/[^?&]*(?:mail|drive|calendar|meet|docs|admin|photos|translate|keep|hangouts|chat|workspace|maps|news|ads|ediscovery|jamboard|earth|podcasts|classroom|business|myaccount|adsense|cloud|adwords|analytics|firebase|play|voice|tagmanager|duo|datastudio|optimize|merchants|finance|colab.research|contacts|script|messages|search|stadia|developers|one|chrome|books|sites|groups)\.google\.co.*/i.test(
url
) ||
// test several services that witched from the patter "https://maps.google.com" -> https://www.google.com/maps
/^https?:\/\/(www\.)?google\.co(?:m|\.[a-z]{2,3})\/(?:maps|finance|travel|flights)/i.test(
url
)
/^https?:\/\/[^?&]*(?:mail|drive|calendar|meet|docs|admin|photos|translate|keep|hangouts|chat|workspace|maps|news|ads|ediscovery|jamboard|earth|podcasts|classroom|business|myaccount|adsense|cloud|adwords|analytics|firebase|play|voice|tagmanager|duo|datastudio|optimize|merchants|finance|colab\.research|contacts|script|messages|search|stadia|developers|one|chrome|books|sites|groups|blogger|gemini|notebooklm|looker)\.google\.co.*/i.test(url) ||
/^https?:\/\/(www\.)?google\.co(?:m|\.[a-z]{2,3})\/(?:maps|finance|travel|flights|shopping|books|scholar)/i.test(url) ||
/^https?:\/\/(www\.)?youtube\.com/i.test(url) ||
Comment thread service-worker.js
Comment on lines +285 to +287
const escaped = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
if (new RegExp(`^https?:\\/\\/[^?&]*${escaped}\\.google\\.co.*`, "is").test(url)) return rule.accountId;
}
Comment thread utils.js
// ─── Global settings (independent of profiles) ───────────────────────────────

const DEFAULT_SETTINGS = {
enforceOnPrecachedUrls: true,
Comment thread CHANGES.md
Comment on lines +158 to +161
When disabled (default), the original behaviour is preserved: URLs that already have `/u/N` or `authuser` are passed through unchanged (fast path, avoids unnecessary redirects).

**Implementation:**
- `DEFAULT_SETTINGS` in `utils.js` defines `enforceOnPrecachedUrls: false`
Comment thread popup.html
Comment on lines 9 to 14
<a href="https://default.wtf/" target="_blank" class="link">
<header>
<img src="images/logo.svg" alt="Default Account for Google&trade; products" /> Default Account for Google&trade; products
<img src="images/logo.svg" alt="Default Account for Google products" />
Default Account for Google&#8482; products
</header>
</a>
Comment thread popup.html
Comment on lines +189 to +192
<p class="settings-desc">
Version 3.0 &mdash; Forked and improved from
<a href="https://default.wtf/" target="_blank">Uptech</a>.
BSD 3-Clause License.
Comment thread utils.js
Comment on lines +122 to +124
function makeProfile(name, color, overrides = {}) {
return {
id: crypto.randomUUID(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants