-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(GitHub News Feed Filter) The script sometimes doesn't work when navigating from other GitHub pages to the news feed #137
Comments
Hi @darkred. Currently I'm beta testing the new personal dashboard on the homepage. This will replace the current news feed on the homepage. That's why I'm not using this userscript anymore and probably won't make any updates to the userscript until GitHub releases the new dashboard or disables the beta. I have not checked the source yet, but this userscript might still be relevant on the new dashboard. PR is always welcome! |
Hi @jerone. Yes, I'm also using the new dashboard layout, too. FYI, apart from adding
I've also tried enclosing your code as follows, like I've done with the GitHub script I have, (function () {
function init() {
// ...
}
init();
document.addEventListener('pjax:end', init); // for the History API
})(); Kindly /cc @Mottie in case he'd like to help here - I think that his great, detailed HowTo (especially his |
Hmmm, that's weird, are you sure? Because I couldn't even get the filter to show up on the new dashboard. To make the filter show up, change the following line... sidebar.insertBefore(wrapper, sidebar.firstChild); ...to... sidebar.insertBefore(wrapper, sidebar.querySelector(":scope > *:not(details)")); It appears that all features still work. I also can't reproduce the issue you are describing, with above steps. 😞 |
Yes, I'm sure:
The issue that I describe is occurring frequently but not every single time, i.e. not consistently. Here is a video capture (1:16, ~5 MB, .wmv) with Chrome 69 and TM 4.7 stable (the same thing happens with Firefox and TM beta) : Video_2018-09-26_001858.zip [1] : [1] Please download and unzip it - unfortunately uploading .wmv files is not supported by GitHub. Sorry for the inconvenience. |
(I've made some corrections to my last comment to improve the wording). |
Thank you! 🙂
Yes, that's very strange. I also use Refined GitHub (as well as Octotree, OctoLinker, Octobox and various styles in Stylus) but I have all these extensions disabled during the above tests, and I don't have such an account switch in any case, with any browser (Chrome, FF, even Edge). |
It's because I'm part of a few organizations: https://github.com/jerone Not related to your real issue, but if you make the code change I described above, does the news-feed-filter still show-up for you? |
Yes, unfortunately it still shows up. |
No no, that's good news 😄 that means that this change will make the news-feed-filter show on accounts with and without organizations. Now I only need to reproduce your issue... 😞 |
Yes, sorry, I misread it as "Does the issue still occur?" 😄 |
Ah ok :) I'm at work right now, and above change doesn't appear to be enough. I need to change the following to make it work: // GitHub homepage or profile activity tab.
- var sidebar = document.querySelector('.dashboard-sidebar') || document.querySelector('.profilecols > .column:first-child');
+ var sidebar = document.querySelector('.dashboard-sidebar:not(.is-placeholder)') || document.querySelector('.profilecols > .column:first-child');
var wrapper = document.createElement(filterElement);
wrapper.classList.add('boxed-group', 'flush', 'user-repos');
- sidebar.insertBefore(wrapper, sidebar.firstChild);
+ sidebar.insertBefore(wrapper, sidebar.querySelector(":scope > *:not(details)"));
var headerAction = document.createElement('div'); I'll confirm that it works at home also, can you confirm if the news-feed-filter still is shown for you too... |
Yes the news-feed-filter is still shown for me. |
Something that caught my attention: I noticed in your screenshot What extension/userscript do you use for that feature? |
Great. 😄
Even greater. 😆
I used some UserScript before, but then I found the more frequently updated WebExtension, Notifications Preview for GitHub Build Status. I'll release a new version of the the script soon. |
Finally had some time to push the fix. I hope everything continues to work. 😄 |
Yes, everything is fine, thank you 👍 |
Using Chrome 69 in win10, TM 4.8.5850 beta, and only GitHub News Feed Filter 8.2.4.
The issue is that some times when navigating to https://github.com/ from other GitHub pages the script doesn't work: in such cases I have to press Ctrl+F5 in order to work (plain F5 doesn't help).
STR
https://github.com/explore
)notice that the script doesn't work (there's no error in Console). Pressing Ctrl+F5 fixes the issue.
FWIW I've tried adding
// @include https://github.com/*
but unfortunately it didn't help.The text was updated successfully, but these errors were encountered: