How ysdemiryilmaz/ysd_url_blocker works
YSD URL Blocker is a Chrome extension for inspecting page links and preventing unwanted navigations. The popup retrieves links from the active tab, lets users create site-scoped URL or domain rules, and stores rule and pause settings; content and page-context guards intercept clicks and script-opened windows, while the service worker enforces network and strict-mode blocking. The shared rule model supplies matching and scope logic. README evidence is minimal; the popup styling and HTML are not mapped as runtime components.
Main entry points: content.js Page link guard · background.js Background enforcement · popup.js Popup and rules · inject.js Scripted-window guard
Components 9
Popup controls
- Popup and rules
popup.js
Navigation blocking
- Page link guard
content.js - Scripted-window guard
inject.js - Background enforcement
background.js
Shared rules
- Rule matching
rules.js - Interface language
i18n.js
Other components
- User
- Active webpage
- Chrome extension storage
Connections 22
- User → Popup and rules: manages rules
popup.js - Popup and rules → Active webpage: queries links
popup.js - Active webpage → Page link guard: provides links
content.js - Popup and rules → Chrome extension storage: reads and writes
popup.js - Background enforcement → Chrome extension storage: reads settings
background.js - Background enforcement → Chrome extension storage: syncs rule changes
background.js - Page link guard → Chrome extension storage: reads rules
content.js - Page link guard → Background enforcement: requests pause state
content.js - Background enforcement → Page link guard: broadcasts pause
background.js - Page link guard → Scripted-window guard: sends rules
content.js - Scripted-window guard → Page link guard: requests rules
inject.js - Page link guard → Active webpage: cancels blocked clicks
content.js - Scripted-window guard → Active webpage: guards scripted opens
inject.js - Background enforcement → Active webpage: blocks navigations
background.js - Background enforcement → Background enforcement: updates session rules
background.js - Page link guard → Background enforcement: reports blocked links
content.js - Scripted-window guard → Page link guard: reports blocked opens
inject.js - Popup and rules → Rule matching: uses matching
popup.js - Page link guard → Rule matching: filters and matches
content.js - Background enforcement → Rule matching: matches navigations
background.js - Popup and rules → Interface language: loads language
popup.js - Page link guard → Interface language: loads language
content.js