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

Use url instead of inner text #917

Merged
merged 2 commits into from
Apr 12, 2014
Merged

Use url instead of inner text #917

merged 2 commits into from
Apr 12, 2014

Conversation

l1am9111
Copy link
Contributor

This will fix #915.

This will fix the bug caused by the trending subreddits update.
@@ -333,6 +333,7 @@ modules['filteReddit'] = {
}
// var RALLre = /\/r\/all\/?(([\w]+)\/)?/i;
// var onRALL = RALLre.exec(location.href);
var urlRegex = /\/r\/(.*)\//;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd personally prefer this to be /\/r\/([-\w\.]*)\/?/ to make the last slash optional and to make the regex a little more restrictive.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using the existing RESUtils.matchRE instead of writing a new regexp?

@l1am9111
Copy link
Contributor Author

I have updated it according to the comments. Although I wasn't sure whether I should use .exec or .match because RESUtils.currentSubreddit uses .match when using RESUtils.matchRE.

jewel-andraia added a commit that referenced this pull request Apr 12, 2014
Use url instead of inner text for pulling a post's "posted to" subreddit from frontpage/all/multireddit for filteReddit by subreddit
@jewel-andraia jewel-andraia merged commit c3b26ee into honestbleeps:master Apr 12, 2014
@l1am9111 l1am9111 deleted the fix branch April 12, 2014 17:26
jewel-andraia referenced this pull request Apr 12, 2014
Ads by redditads does not have a domain, generating an error
@jewel-andraia jewel-andraia mentioned this pull request May 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix filteReddit subreddit check to match new post listing
3 participants