Closed eight04 closed 6 years ago
It's not an accident. Like I said, it's working as intended. The reason is to preserve user navigation. I can understand why you implemented history back/closing of the source tab, but I think the old behavior was wrong: if a user navigation was performed by the browser and the page was actually shown, we should not navigate back nor close it. AFAIK Chrome Webstore even has a policy about extensions that behave this way.
Ideally, we should have used webRequest API to redirect the URL to our installer page like Tampermonkey does, but I don't want to add a new permission just for this purpose.
If it is not an accident, the closeTab
handler should be removed.
in the current version, the installation tab is not closed after closing the source code tab.
This might be a bug in Firefox. I can't reproduce it in Chrome.
This is not related to OUCSS.
Example URL: https://raw.githubusercontent.com/RaitaroH/YouTube-DeepDark/master/YouTubeDeepDarkMaterial.user.css
IIRC, when #134 is implemented:
When left-clicking on the link
Result in 2 tabs:
When middle-clicking on the link
Result in 2 tabs:
Current behavior:
When left-clicking on the link
Result in 2 tabs:
When middle-clicking on the link
Result in 3 tabs:
In the new version, the source code page is left in the window/tab, which is caused by https://github.com/openstyles/stylus/commit/aedb02bbb19356fe069996c3d21577a88ed5cf20#diff-e0e82cc2f07995a5e5771a1cf2a8a8c1R190.
I think it is an accident because
port.postMessage({method: 'closeTab'})
closes the source code tab butchrome.runtime.sendMessage({method: 'closeTab'});
closes the installation tab, and thecloseTab
handler incontent/install-hook-usercss.js
is not removed.Also, in the current version, the installation tab is not closed after closing the source code tab.