How To Exclude Some Sites? (Global Dark Everything) With New Stylish...

So Stylish updated today and I have no clue how to work it I wish I could go back, but I don't think that possible. I used to be able to exclude Global Dark which I user everywhere expect a few sites like YouTube that it's broken on.
The old Stylish I'd just have edit and put the websites I want to exclude between the |example| but that's gone now and it gives me this in it's place

@namespace html url(http://www.w3.org/1999/xhtml);
@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

/*----- SITES TO EXCLUDE -----*/

I've tried several thinks but it doesn't seem to work can if someone more adapt at this can you show me how I would block for example YouTube with this script? Thank you!

Comments

  • Please provide your code. I can't see any |example|. Usually you exclude by editing the regex rule.
    Or maybe I didn't understand your question, because I've never tried Stylish 3.0
  • I'm also looking for a way to exclude some websites. I tried putting in the links there, but there were errors, f.e. saying LBRACE was expected.
  • edited November 2017 Firefox

    wrap your code in

    <pre>CODE HERE</pre>
    

    or upload it completely on https://pastebin.com/

  • wrap your code in

    &lt;pre&gt;CODE HERE&lt;/pre&gt;
    

    or upload it completely on https://pastebin.com/

    Sorry for the late response here's the code
    https://pastebin.com/51tSSqrE
  • edited December 2017 Firefox

    No LBRACE error here, code seems OK.

    To exclude sites, just replace

    regexp("https?://(?!(www.your.sites.here.com|forum.example.com)).*")
    

    by something like this

    regexp("https?://(?!(www.youtube.com|forum.userstyles.com|lycos.com|aol.com|roblox.com)).*")
    

    Got it?

    p.s.: Actually it would be better to escape every dot with two backslashes like this:

    regexp("https?:\\/\\/(?!(www\\.youtube\\.com|forum\\.userstyles\\.com|lycos\\.com|aol\\.com|roblox\\.com)).*")
    

    but it will also work without.

    edit

    @anagrammar
    rightyright, sorry.
    Single slashes in Javascript, double slashes in CSS.

  • @stonecrusher Double backslashes to escape within @-moz-doc.
  • edited December 2017 Firefox
    Oh that's weird that lines not there when I look at it where I edit it from, I imported the code to upload it on that site and it came up different.

    Mine looks like this I'll try to fine that line...
    https://gyazo.com/29c7cc415418fb0634d36b4e0fc06184
  • edited December 2017 Firefox
    Long story short, I deleted the 1st line of code and just pasted the code I needed at the top of where code 2 used to be. Seems to be working now looks like this in the end https://gyazo.com/3135368e94011dbf376c9457773dec4f

    Thanks again for your guidance wouldn't of been able to figure this out without your help.
  • In Stylus there are no @-moz-document rules necessary in the code.
    Just the "Applies to" fields beyond each section.
Sign In or Register to comment.