Skip to content

NotionFlow v1.3.3 - Safari Page Context & Desktop Settings Fix

Choose a tag to compare

@intelQong intelQong released this 05 Sep 15:28
· 5 commits to main since this release

NotionFlow v1.3.3 Release Notes

馃幆 Key Fixes & Architecture Improvements

  1. Restored @grant none for Direct Page Execution

    • Root Cause: Specifying @grant GM_xmlhttpRequest forced Safari Userscripts extension (and Tampermonkey) to isolate the script inside an ISOLATED content-script world. In that isolated world, overrides on window.CONFIG, navigator.userAgent, and Screen.prototype never reached the page's MAIN JavaScript context where Notion's client bundle ran, causing Notion to boot as standard mobile.
    • Fix: Reverted @grant to none so the userscript runs uninhibited in the page context. Update checks now leverage native fetch() with clean error silencing under restrictive page CSP.
  2. Strict Desktop Sidebar Targeting for Settings & Notifications

    • Root Cause: findNotionSettingsButton() previously searched document-wide for [aria-label*="Settings"]. Mobile Notion renders a bottom navigation bar with that exact label; clicking it invoked Notion's mobile drawer store (r(86231).O.setState({ open: true })).
    • Fix: Restricted queries strictly to desktop sidebar containers (.notion-sidebar-container, .notion-sidebar).
  3. Native Notion SPA Router Integration (?openSettingsTab)

    • By analyzing Notion's client bundle router (806127), we mapped the openSettingsTab parameter directly to Notion's desktop space settings store (r(802724).Ay).
    • NotionFlow now dispatches ?openSettingsTab=account and ?openSettingsTab=notifications via history state to reliably invoke Notion's desktop settings modals regardless of sidebar state.
  4. Preserved Desktop Modal Layout

    • Removed destructive CSS ([role="dialog"] > div { flex-direction: column !important; }) that was squashing Notion's two-column desktop modal into an unreadable vertical mobile layout.

馃摝 Distribution Assets

  • notion-flow.user.js: Standard userscript for Safari Userscripts extension, Stay, Orion, Tampermonkey.
  • notionflow-injection.js: Standalone bundle for native iOS WKWebView / WKUserScript wrappers.