Menu

1 / 2

An allow-list inside a website blocker: how a Windows focus app keeps Wikipedia open while it closes YouTube

DEV Community: flutter·Liza Bhadana·about 7 hours ago
#RHqf1qQg
#devtoflutter#devto#dev#title#browser
Reading 0:00
15s threshold

Short answer: SeaSweep , a free Windows study app built in Flutter, reads the title of the window in front of you. If it is a browser and the title contains a study site's name, it returns early, before any blocking rule runs. That one ordering decision is what lets a student block the whole browser and still read Wikipedia.

Students ask a version of this all the time: can I block distracting websites but still use Wikipedia and Khan Academy? Here is how we answered it in code, including the parts that are not clever.

How does the app know which site is open?

It does not read URLs. Reading another program's address bar would need a browser extension or accessibility hooks. Instead, every 0.7 seconds during a study session it asks Windows for the foreground window ( GetForegroundWindow ), its title ( GetWindowTextW ) and the process behind it ( QueryFullProcessImageNameW ).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.