Closed radiovisual closed 8 years ago
I've seen this too. I guess it should use https://github.com/octo-linker/injection. Help welcome :)
@sindresorhus , I am happy to create a pull request for this, but first, can you tell me your preference for loading dependencies into a chrome extension? I have already experimented with octo-linker/injection and I can get the hide-files-on-github extension to work after browsing with the back/forward buttons, however, in my experiments, I just loaded the injection dependency directly in the manifest.json file, like so:
"js": [
"deps/octo-linker-injection@0.1.0.js",
"content.js"
]
This approach works, but it feels a bit too 'hands-on' for dependency management (upgrading the dependencies would be a manual process, for example). In other words: doing things this way doesn't allow us to bring the dependency in via npm
, and also, XO
complains about the global nature of the dependency (raising the no-undef
flag in content.js
):
69:2 error "gitHubInjection" is not defined no-undef
So I wanted to know what you think is a good way to bring in this dependency before I commit to one approach over the other.
I have also experimented a little injecting <script>
tags into the <head>
, but that still leaves me with manual dependency management.
Anyway, I would love to hear your thoughts.
No perfect solution for this. I would just npm install it, then just commit the .js file, and then gitignore the rest of the node_modules folder.
Ok, sounds good. Thanks.
It seems the 'Show/Hide Dotfiles' button becomes disabled if you browse back to a repo page using the 'Back Button'.
To recreate:
I have only tested this behavior in Chrome Version 47.0.2526.106 (64-bit).
It's also true if you browse with the "Forward Button".