Skip to content
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

Hot network questions sidebar sites filtering broken #358

Closed
phuclv90 opened this issue Aug 22, 2018 · 11 comments
Closed

Hot network questions sidebar sites filtering broken #358

phuclv90 opened this issue Aug 22, 2018 · 11 comments
Assignees
Milestone

Comments

@phuclv90
Copy link

Installed Version: 2.2.32DEV Environment: Tampermonkey

I like the hot network questions feature. But in the list there are too many questions that belong to communities I have absolute zero interest. Therefore I'd like to hide them completely

There are scripts that do the filtering on meta stackexchange, but it'll be nice if the functionality is integrated into SOX

Features Enabled

["Appearance-addAuthorNameToInboxNotifications","Appearance-alignBadgesByClass","Appearance-answerTagsSearch","Appearance-colorAnswerer","Appearance-dragBounty","Appearance-highlightQuestions","Appearance-isQuestionHot","Appearance-localTimestamps","Appearance-markEmployees","Appearance-metaChatBlogStackExchangeButton","Appearance-metaNewQuestionAlert","Appearance-spoilerTip","Appearance-standOutDupeCloseMigrated","Appearance-tabularReviewerStats","Appearance-topAnswers","Appearance-unspoil","Appearance-addTimelineAndRevisionLinks","Comments-autoShowCommentImages","Comments-commentReplies","Comments-commentShortcuts","Comments-confirmNavigateAway","Comments-copyCommentsLink","Comments-moveBounty","Comments-showCommentScores","Comments-hiddenCommentsIndicator","Editing-addSBSBtn","Editing-editComment","Editing-editReasonTooltip","Editing-findAndReplace","Editing-kbdAndBullets","Editing-titleEditDiff","Editing-inlineEditorEverywhere","Flags-flagOutcomeTime","Flags-flagPercentages","Flags-flagPercentageBar","Sidebar-hideHireMe","Sidebar-hideChatSidebar","Sidebar-linkedToFrom","Sidebar-hotNetworkQuestionsFiltering","Chat-chatEasyAccess","Chat-replyToOwnChatMessages","Chat-renameChat","Voting-betterCSS","Voting-stickyVoteButtons","Voting-disableVoteButtons","Extras-alwaysShowImageUploadLinkBox","Extras-linkedPostsInline","Extras-parseCrossSiteLinks","Extras-quickAuthorInfo","Extras-shareLinksMarkdown","Extras-sortByBountyAmount","Extras-warnNotLoggedIn","Extras-hideCertainQuestions","Extras-showMetaReviewCount","Extras-copyCode","Extras-dailyReviewBar","Extras-openLinksInNewTab","Extras-showQuestionStateInSuggestedEditReviewQueue"]
@phuclv90
Copy link
Author

I've just found out that I missed the "Filter the hot network questions by their attributes" option. But no matter how I entered the filter condition, some questions are still left out

I've tried using both page links like https://rpg.stackexchange.com/,https://law.stackexchange.com/,https://skeptics.stackexchange.com/,https://scifi.stackexchange.com/ and page names like "Role-playing Games,Law,Science Fiction & Fantasy,Skeptics" in Sites to block and Titles to hide but none of them work

It seems the best result I got is by using a match pattern like this https://rpg.stackexchange.com/*,https://law.stackexchange.com/*,https://skeptics.stackexchange.com/*,https://scifi.stackexchange.com/* but even then a few questions among those sites are still shown

What's the correct way to filter out those?

@shu8
Copy link
Member

shu8 commented Aug 23, 2018

@phuclv90 I've designed the match patterns to work like Chrome's syntax.

Could you try using something like *://rpg.stackexchange.com/*? :)

The 'titles to hide' option only looks at the title displayed which is why it wouldn't work. Something like \bLaw\b would hide links with Law in the titles.

@shu8 shu8 added the question label Aug 23, 2018
@phuclv90
Copy link
Author

Unfortunately *://rpg.stackexchange.com/* gives the red error that the filter module can't be loaded

If I put only one or two patterns it seems to work correctly. But as soon as I put more patterns it won't work anymore

@shu8
Copy link
Member

shu8 commented Aug 23, 2018

@phuclv90 Could you paste the error message here please? It would be in the console (F12)

Could you also paste the exact contents of the 'sites to block' field you've entered?

@shu8 shu8 changed the title Add "hot network questions" filter feature How to use hot network questions filtering feature? Aug 23, 2018
@phuclv90
Copy link
Author

phuclv90 commented Aug 23, 2018

This is the log I got with *://rpg.stackexchange.com/*

SOX:  There was an error loading the feature "Sidebar-hotNetworkQuestionsFiltering". Please raise an issue on GitHub, and copy the following error log:
SyntaxError: nothing to repeat userscript.html:62:13
tms_d56f12a9_bfef_4326_8ba6_60d0e5d74383/</sox.error
moz-extension://f779b2f8-e0ca-48fa-9437-d563452d97d0/userscript.html:62:13
init
moz-extension://f779b2f8-e0ca-48fa-9437-d563452d97d0/userscript.html:3454:25
tms_d56f12a9_bfef_4326_8ba6_60d0e5d74383/</sox.ready/<
moz-extension://f779b2f8-e0ca-48fa-9437-d563452d97d0/userscript.html:101:33
l
moz-extension://f779b2f8-e0ca-48fa-9437-d563452d97d0/userscript.html:7:29373
a/</c<
moz-extension://f779b2f8-e0ca-48fa-9437-d563452d97d0/userscript.html:7:29677
g</< eval:2:479 ja/c[d] eval line 1 > Function:52:483 

I tried testing with pages that have a lot of hot questions so that it's easy to see the result. One of the examples is https://writing.stackexchange.com/*,https://skeptics.stackexchange.com/*,https://math.stackexchange.com/*

When I put only 2 patterns it works but when I add https://math.stackexchange.com/* many math questions still appear. I tried again with math SE only and it works. But with https://math.stackexchange.com/*,https://unix.stackexchange.com/*,https://skeptics.stackexchange.com/* unix SE questions are being shown

@shu8
Copy link
Member

shu8 commented Aug 24, 2018

@phuclv90 thanks for pasting that, I'll try fixing it ASAP!

@shu8 shu8 self-assigned this Aug 24, 2018
@shu8 shu8 changed the title How to use hot network questions filtering feature? Hot network questions sidebar sites filtering broken Aug 24, 2018
@shu8 shu8 added this to the 2.3.0 milestone Aug 24, 2018
shu8 added a commit that referenced this issue Aug 24, 2018
@shu8
Copy link
Member

shu8 commented Aug 24, 2018

@phuclv90 This should hopefully be fixed in dev 2.2.35!

Please could you confirm if it works for you? :)

I've tried with input like:

*://writing.stackexchange.com/*,*://skeptics.stackexchange.com/*,*://math.stackexchange.com/*

@shu8 shu8 added the ready label Aug 24, 2018
@phuclv90
Copy link
Author

phuclv90 commented Aug 25, 2018

Seems like it's working now. Thanks

Btw why is there a "Save Settings" button in the Filter the hot network questions by their attributes section? Isn't the main "Save Changes" button enough?

@shu8
Copy link
Member

shu8 commented Aug 25, 2018 via email

@shu8 shu8 closed this as completed Aug 25, 2018
shu8 added a commit that referenced this issue Sep 2, 2018
* new dev

* #305

* #307

* #310

* #310

* Better fix for #310

The old fix placed the SOX button to the right of the username, but the username only shows up in the top bar if you're logged in. This meant the SOX button would be absent if you were logged out. This new code should fix that.

* #310

* #309, #313

* #311, #312

* #256

* #319, #317, #316

* #256

* #318

* #294 deprecate enhanced editor

* #308, other small fixes

* #320

* minor fixes (#324)

change scroll top top feature JSON info

* fixes #329 (#330)

also reduces jQuery dependency

* v2.1.4 DEV before push to master

also adds #326

* v2.2.0

* inital DEV push

* update readme to state GM not supported; #306

* reduce dependency on `hotkeys`+minor details (#333)

* #334 fixed

* #334

* #334

* #338

* #335, #338

* Micro optimizations (#336)

* update source link

* micro optimizations

- converted jQuery .not to CSS selector for faster perf (https://stackoverflow.com/questions/8845811/performance-differences-between-using-not-and-not-selectors)
- introduced a separate function to eliminate thrice-repeated (!) code, to keep it DRY

* fixes some issues (#339)

described in #338 (comment)

* fixes #338

* fixes #338 (#340)

1. used addEventListener instead of onload
2. descriptive names (`reader`)
3. optimized extraction of the image URL from the `data`
4. made all declarations `var` and moved them into one place for consistency
5. shortened the POST url to simply `'/upload/image?https=true',` ;P

* #322 implemented

* Sticky property

* Update sox.user.js

* Updating button colors

The main SE buttons use a lighter color than the SOX buttons

* Update sox.css

* Minor fixes

Patched a problem with vote buttons, and fixed the color of the notify on edit button

* Update sox.user.js

* minor changes/fixes

* #341 temporary fix

* Updated mod diamond icon

Updated to the icon, to match the one used by the new topbar

* Updated diamond icon

* Updated mod diamond

* improvements in colorAnswerer (#344)

* improvements in colorAnswerer
1. constant variables+cache answeredID
2. reduce jQuery dependency+shorter a[href] selector via user ID
3. change coloration

* optimization: use filters throughout (#345)

reduces bandwidth consumption

* fixes a few features; adds CSS

Fixes moveBounty, dragBounty, copyCommentsLink.
Adds class for colorAnswerer.
Updates jQuery

* fixes quickAuthorInfo fontawesome icon

* fix a few of #308

* Major improvements in code extensibility, reduced API usage, eliminate redundancy, etc. (#348)

* fixes various bugs mentioned in #348

* fixes standOutDupeCloseMigrated for search pages

* remove unwanted console logs

* #347, various minor tweaks

* fixes small bug in parseCrossSiteLinks

e.g. on this comment: https://meta.stackoverflow.com/questions/370902/i-need-a-lot-of-help-to-write-a-query-for-the-stack-exchange-data-explorer-sh?cb=1#comment608548_370902

* Fixed Meta SE's chat link

Added a / to the end of Meta SE's if statement to fix it. Also replaced "discuss" with "meta" for Area 51 (to match the new URL for Area 51 Discussions), shortened a bit of code, and added some comments

* Fixed Meta SE links

* Changed topbar z-index

Changed the fixed topbar's z-index to match the one on SO, in order to prevent elements like the usercard (z-index: 1000) from covering it

* Made it clearer what the checkbox does

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Fixed Area 51 Discussions bug

* #348 minor tweak

* fix (#350)

...for answerer ID 13 also matching commenter ids beginning with 13 (1345, 13555, etc.)

* #352, #353 remove yahoo YQL use

* #352

* PR/351 (#355)

* update getQuestionTags

* provide immediate response to user

* minor changes

* #325: remove rangyInputs dependency (#354)

* bump version number

* remove downvotedPostsEditAlert; remove rangyinputs `require`; implement mini changelog in dialog

* install stale and no-response bots

* #356 added, minor bug fix

* start #349, start to move to es6

* onlyShowCommentActionsOnHover bug fix

* #357

* deprecate fixedTopbar feature for #349

* add showTagWikiLinkOnTagPopup feature

* #359 fixed

* #358 fixed

* fixes #360

* fixes for #361

* #361 changes

* v2.3.0 final
shu8 added a commit that referenced this issue Feb 3, 2019
* new dev

* #305

* #307

* #310

* #310

* Better fix for #310

The old fix placed the SOX button to the right of the username, but the username only shows up in the top bar if you're logged in. This meant the SOX button would be absent if you were logged out. This new code should fix that.

* #310

* #309, #313

* #311, #312

* #256

* #319, #317, #316

* #256

* #318

* #294 deprecate enhanced editor

* #308, other small fixes

* #320

* minor fixes (#324)

change scroll top top feature JSON info

* fixes #329 (#330)

also reduces jQuery dependency

* v2.1.4 DEV before push to master

also adds #326

* v2.2.0

* inital DEV push

* update readme to state GM not supported; #306

* reduce dependency on `hotkeys`+minor details (#333)

* #334 fixed

* #334

* #334

* #338

* #335, #338

* Micro optimizations (#336)

* update source link

* micro optimizations

- converted jQuery .not to CSS selector for faster perf (https://stackoverflow.com/questions/8845811/performance-differences-between-using-not-and-not-selectors)
- introduced a separate function to eliminate thrice-repeated (!) code, to keep it DRY

* fixes some issues (#339)

described in #338 (comment)

* fixes #338

* fixes #338 (#340)

1. used addEventListener instead of onload
2. descriptive names (`reader`)
3. optimized extraction of the image URL from the `data`
4. made all declarations `var` and moved them into one place for consistency
5. shortened the POST url to simply `'/upload/image?https=true',` ;P

* #322 implemented

* Sticky property

* Update sox.user.js

* Updating button colors

The main SE buttons use a lighter color than the SOX buttons

* Update sox.css

* Minor fixes

Patched a problem with vote buttons, and fixed the color of the notify on edit button

* Update sox.user.js

* minor changes/fixes

* #341 temporary fix

* Updated mod diamond icon

Updated to the icon, to match the one used by the new topbar

* Updated diamond icon

* Updated mod diamond

* improvements in colorAnswerer (#344)

* improvements in colorAnswerer
1. constant variables+cache answeredID
2. reduce jQuery dependency+shorter a[href] selector via user ID
3. change coloration

* optimization: use filters throughout (#345)

reduces bandwidth consumption

* fixes a few features; adds CSS

Fixes moveBounty, dragBounty, copyCommentsLink.
Adds class for colorAnswerer.
Updates jQuery

* fixes quickAuthorInfo fontawesome icon

* fix a few of #308

* Major improvements in code extensibility, reduced API usage, eliminate redundancy, etc. (#348)

* fixes various bugs mentioned in #348

* fixes standOutDupeCloseMigrated for search pages

* remove unwanted console logs

* #347, various minor tweaks

* fixes small bug in parseCrossSiteLinks

e.g. on this comment: https://meta.stackoverflow.com/questions/370902/i-need-a-lot-of-help-to-write-a-query-for-the-stack-exchange-data-explorer-sh?cb=1#comment608548_370902

* Fixed Meta SE's chat link

Added a / to the end of Meta SE's if statement to fix it. Also replaced "discuss" with "meta" for Area 51 (to match the new URL for Area 51 Discussions), shortened a bit of code, and added some comments

* Fixed Meta SE links

* Changed topbar z-index

Changed the fixed topbar's z-index to match the one on SO, in order to prevent elements like the usercard (z-index: 1000) from covering it

* Made it clearer what the checkbox does

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Fixed Area 51 Discussions bug

* #348 minor tweak

* fix (#350)

...for answerer ID 13 also matching commenter ids beginning with 13 (1345, 13555, etc.)

* #352, #353 remove yahoo YQL use

* #352

* PR/351 (#355)

* update getQuestionTags

* provide immediate response to user

* minor changes

* #325: remove rangyInputs dependency (#354)

* bump version number

* remove downvotedPostsEditAlert; remove rangyinputs `require`; implement mini changelog in dialog

* install stale and no-response bots

* #356 added, minor bug fix

* start #349, start to move to es6

* onlyShowCommentActionsOnHover bug fix

* #357

* deprecate fixedTopbar feature for #349

* add showTagWikiLinkOnTagPopup feature

* #359 fixed

* #358 fixed

* fixes #360

* fixes for #361

* #361 changes

* v2.3.0 final

* 2.3.0 DEV

* fix for #363

* implemented 'feature packs' in settings dialog

* debugging for #363, fixes #364

* #363 debugging

* fix for #363

* #361 implemented (access token no longer mandatory); minor code cleanup

* #365

* fix #368

* Add #315

* fix #366

* start to use linting

* fix #372

* add #370

* clean up code

* implement #374

* fix #373

* add #370; deprecate pasteImagesDirectly

* #374 replace 'help' instead of prepend new link

* change indentation to 2 spaces

* lint

* implement #296

* implements #376 (linkify meta diamond dialog title)

* fix #375 (topAnswers post score not being found)

* improve customMagicLinks feature -- add button to help menu on all pages

* fix sticky vote buttons feature

* keep new meta posts under diamond even after clicking (#378)

* editComment improve design, add more defaults (#377)

* fix better css feature

* editComment: make dialog delete button smaller

* improve editComment for #377; allow editing; new setting storage format

* add delay to comment features for links to deleted comments #379

* bump to v2.4.0

* Remove accidental letter introduced into file

* Bump installation link version numbers

* Lint
@stibinator
Copy link

It's not working for me FF / Windows 10. My site filter list is *://boardgames.stackexchange.com/*,*://anime.stackexchange.com/*,*://movies.stackexchange.com/*,*://scifi.stackexchange.com/*,*://worldbuilding.stackexchange.com/*,*://rpg.stackexchange.com/*

Originally I was using *rpg*,*boardgames*,… but I was getting this error:

SOX: There was an error loading the feature "Sidebar-hotNetworkQuestionsFiltering". Please raise an issue on GitHub, and copy the following error log: TypeError: matchHost is undefined userscript.html:62:15 error moz-extension://d1a3e6c7-942a-44a3-8297-87b6d46a2eee/userscript.html?id=b2e64076-4d2d-4fd7-b983-43e993a3769e:62 init moz-extension://d1a3e6c7-942a-44a3-8297-87b6d46a2eee/userscript.html?id=b2e64076-4d2d-4fd7-b983-43e993a3769e:3883 ready moz-extension://d1a3e6c7-942a-44a3-8297-87b6d46a2eee/userscript.html?id=b2e64076-4d2d-4fd7-b983-43e993a3769e:101 l moz-extension://d1a3e6c7-942a-44a3-8297-87b6d46a2eee/userscript.html?id=b2e64076-4d2d-4fd7-b983-43e993a3769e:7 c moz-extension://d1a3e6c7-942a-44a3-8297-87b6d46a2eee/userscript.html?id=b2e64076-4d2d-4fd7-b983-43e993a3769e:7 g eval:3 d eval line 1 > Function:55

Once I formatted it like *://<site>.stackexchange.com/*,… it wasn't giving any errors in the console, but it isn't doing anything, I'm still seeing all the sites.

shu8 added a commit that referenced this issue Sep 4, 2019
This was accidentally removed in commit
fc7b420 when the 'Hide HNQs from the
sidebar' feature was deprecated'.

Fixes #358 (comment at end).
@shu8
Copy link
Member

shu8 commented Sep 4, 2019

@stibinator thanks for pointing this out! It should be fixed in dev 2.5.36 now :) (the CSS class was accidentally removed in a previous commit!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants