Urgent.News

What's breaking now, across thousands of outlets.

Tech

Building a Floating Mini-Timer with Document PiP

When developers, speakers, or students use web timers while working in IDEs, reading research papers, or presenting keynote slides, switching tabs to monitor or control the timer disrupts deep work and creates friction. Every time you have to alt tab back to a browser tab just to check how many minutes remain in a focus sprint, your cognitive flow is interrupted. Traditional web applications are…

The Document Picture-in-Picture API enables web applications to create always-on-top, interactive mini-windows that host arbitrary HTML content. This functionality is particularly useful for developers, speakers, and students who use web timers within IDEs or while presenting keynote slides. Traditional web timers often require developers to switch tabs to check the remaining time, interrupting deep work and creating friction.

The Document Picture-in-Picture API addresses this issue by allowing developers to open a separate window that runs on the same JavaScript thread as the parent document, providing direct access to objects and functions without the overhead of message serialization. To implement a mini-timer using this API, developers must first check if the browser supports the feature, then request a new picture-in-picture window with specific dimensions.

Once the window is created, developers must inject their scoped CSS rules, custom fonts, and theme variables into the new document's head to ensure proper styling.

Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

ZFS on Proxmox in Production: ARC Tuning, Snapshots & Best Practice

ZFS macht keinen Spaß mit wenig RAM – aber es lohnt sich Wenn du deine erste VM auf einem frisch installierten Proxmox-Node startest und plötzlich die gesamte Systemantwort verlangsamt wird, hast du…

  • ZFS requires significant RAM, 8 GB free recommended, especially for small files and compressed disks
  • Separate zpools for different purposes, NVMe for VM disks, SATA for backups
  • Compression via lz4 reduces I/O, gains 20-30% space, minimal CPU impact

The FX rate nobody locked between auth and capture

Ran into this on a cross-border order: card authorized in EUR, capture fires four days later once the item ships, settlement currency is USD.

  • EUR to USD exchange rate fluctuated 1.1% between authorization and capture
  • Card networks only guarantee authorization hold in cardholder's currency for 24-72 hours
  • Team manually compared FX rate at authorization with settlement report

More from Friday 2 October →