Comments (5)
So, it's a little more complex and the reason has nothing to do with my edit above:
- If you visit the home page from a video page by left-clicking on the top-left logo, the page is not blocked.
- If you visit the home page from a video page by middle-clicking on the top-left logo, the page is blocked.
- If you visit the home page from a new tab page by entering
youtube.com
in the address bar, the page is blocked.
Perhaps in case 1) the History API is used instead of a full page reload and that is not intercepted?
from block-site.
Hi @bard!
EDIT: I was mistaken, it appears to work just fine. I think I assumed that rules are saved on textarea blur but they seem to be saved on window close. Either way, apologies for the noise and thanks again for sharing your work!
Just for clarification, textarea is saved on every edit and as you type.
Perhaps in case 1) the History API is used instead of a full page reload and that is not intercepted?
It is exactly as you say. History API / navigation isn't blocked at the moment. I took my time to solve this right away / thus later reply. At first I thought I'd just use "history" API to solve this, but as it's global, and doesn't have knowledge on which tab this navigation is happening, btw more about it at:
https://stackoverflow.com/questions/12865236/chrome-extension-history-api
https://stackoverflow.com/questions/51809258/get-tab-based-history-of-urls-in-chrome-extension-api
I decided to add "tabs" permission which works nicely to solve this.
Please, see the merge request (#53) to try this out. I have followed youtube example you provided to test it out, and it works as expected now.
As this change will be having a new "tabs" permission added, I shall release it as a new major version, 6.0 to be expected.
from block-site.
Brilliant, thank you!
I installed the block-history-navigation
and it appears to work as intended.
(Side note: I had to add "lib": ["dom", "es2021"]
to tsconfig.json
to get it to build.)
from block-site.
Glad to hear!
Regarding that build, have you used:
$ npm run build
as at https://github.com/penge/block-site/actions/runs/5310575537/jobs/9612728265?pr=53 ?
from block-site.
No, I used pnpm run build
.
from block-site.
Related Issues (20)
- Should we use cloud synced storage? HOT 4
- Feature Request - right click block site option HOT 8
- Bug - Extension icon not visible in incognito mode HOT 6
- Fix path shown in Blocked info page
- Timed blockage HOT 10
- Block Websites only in in incognito mode HOT 6
- Counter not visible in incognito mode. HOT 2
- Can we add a redirect function? HOT 4
- Minimal UI/UX updates HOT 8
- Better block page HOT 3
- Error: Could not load manifest on trying to load extension locally HOT 1
- Firefox Support 🔥🦊 HOT 30
- Optional context menu HOT 4
- Context Menu's functionality is not obvious HOT 2
- Support for regular expressions? HOT 3
- Blocking `x.com` blocks `nginx.com` HOT 5
- Feature request: Support Subdomains HOT 3
- Password Protect HOT 2
- Why has Block Site stopped working? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from block-site.