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

[WIP] start working on channels blacklisting #2

Closed
wants to merge 4 commits into from

Conversation

vendethiel
Copy link
Contributor

Opening this ticket for discussion :

  • Something I proposed would be to add css class to div.stream.item to each channel. I can find a stream name as /div.stream.item > p > a[href]/.substr(1) // remove the slash before.
    The problem here being that we need to tag the divs ourselves, because the CSS4 syntax div.stream.item < p < a won't work : when, where ?.
    Note : the layout does work fine with just a display: none
  • Hook something somewhere when new channels are pulled to remove those we don't want. How, where ?
  • Another idea ?

@vendethiel vendethiel changed the title start working on channels blacklisting [WIP] start working on channels blacklisting May 10, 2014
@night
Copy link
Owner

night commented May 16, 2014

Check to make sure your gulp file is working right.. You have C:\ paths in the compiled version

You will want to check for blocked streams/games on page load (maybe check if you're on the directory).

Also, this will help you to detect when more streams get loaded as users scroll (in main.js)

case 'directory/channel':
    waitForLoad(function(ready) {
        if(ready) {
            // check for blocked streams
        }
    });
    break;

@vendethiel
Copy link
Contributor Author

Check to make sure your gulp file is working right.. You have C:\ paths in the compiled version

Good catch. *sigh*

You will want to check for blocked streams/games on page load (maybe check if you're on the directory).

Took note

@lewisje
Copy link
Contributor

lewisje commented Jun 14, 2014

I never saw < being used as a CSS combinator ("parent"? analogous to the > child combinator?), not even in the Selectors 4 drafts; I did however see a subject-identifier ! ($ in earlier drafts) that allows the specification of an element other than the one at the end of the combinator chain, like div > p means "a p element that is the child of a div element," but div! > p (earlier $div > p) was intended to mean "a div element that has a p element as a child," and then in the most recent Editor's Draft it was taken out entirely.

In its place is the :has() relational pseudo-class; as an example, you would use div:has(> p) to select a div that has a p as a child.

Anyway, in the here-and-now, you might try to use XPath for this (in my little example, it would be //div[p]), as explained by the creator of jQuery; the only difficulty AFAIK is figuring out how to use XPath from within Javascript.

@vendethiel
Copy link
Contributor Author

Xpath is irrelevant, since you need js at that point anyway. I think < was suggested for css4.

@lewisje
Copy link
Contributor

lewisje commented Jun 14, 2014

Sorry, I thought you were using JS anyway, relying on something like Sizzle to find elements with CSS selectors. 😓

Also I just looked through the four Selectors 4 working drafts and the most recent Editor's Draft, and it looks like subject indication went from prepended $ in the first draft, to appended ! in the next three, to the :has() pseudo-class in the 28 May 2014 Editor's Draft; maybe a < parent combinator was suggested on the mailing list, but it isn't in any of the drafts.

@vendethiel
Copy link
Contributor Author

I'll redo that on top off master.

@vendethiel vendethiel closed this Jun 19, 2014
night pushed a commit that referenced this pull request Jun 13, 2015
@night night deleted the ignore-channels branch March 16, 2016 09:00
night pushed a commit that referenced this pull request May 12, 2016
@wazzaa91 wazzaa91 mentioned this pull request Mar 29, 2017
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new pull request for related issues or feature requests.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants