I use @jerone's GitHub JSON dependencies linker userscript intermittently, meaning that I only turn it on when I need it. The problem is that it doesn't show up in the popup when I need to turn it on.
Details:
@include block has this entry // @include https://github.com/*/package.json to only target specific files on GitHub.package.json file from that page to navigate to its source page.
@Mottie Doesn't this have to do with GitHub's PJAX solution... where it doesn't do a full page redirect, but only content update (plus location update). Github JSON Dependencies Linker doesn't include PJAX listeners, like my others scripts do.
No, this is Tampermonkey not showing the userscript in the popup. And I think TM does detect history (URL) changes, so it should work.
If TM indeed detects pushState changes, then yes this script should be in that list on that page.
TM does not detect pushState changes, because it's unclear what to do. Is the script still running or does it need to be injected again? Only the script can make a good choice on how to handle this.
So the solution is to @include all possible source pages and to either use the mentioned PJAX event solution or to overwrite pushState to initiate a normal page load.
Related: #200
Most helpful comment
TM does not detect
pushStatechanges, because it's unclear what to do. Is the script still running or does it need to be injected again? Only the script can make a good choice on how to handle this.So the solution is to
@includeall possible source pages and to either use the mentioned PJAX event solution or to overwritepushStateto initiate a normal page load.Related: #200