excluding urls + changing colour of visited

I added Stylish to FF mainly to darken it (and save my eyes) and to change the colour of visited links. I know nothing about coding. I installed Dark is better for my eyes. I want to exclude Facebook and https://www.realtor.ca/Residential/Map.aspx (not everything on realtor.ca). I read many other discussions about this and tried it out a few different ways, none of which worked. Clearly I'm out of my depth, so could someone show me exactly what I should have in the first section?
Originally, it began:
@namespace html url(http://www.w3.org/1999/xhtml);

/* i really want this to be global */


/*----- WEBSITES TO EXCLUDE -----*/
/*-- Use a "|" symbol to separate websites to exclude --*/

/*----- SITES WEB A EXCLURE -----*/
/*-- Utilisez le symbole "|" pour séparer les sites web à exclure --*/

I was hoping to make a separate style for https://www.realtor.ca/Residential/Map.aspx, just to change the visited links colour. Or, rather, I was hoping someone could help me out with that since I'm pretty sure it's not something I'm going to figure out on my own.
Thanks in advance for any help!

Comments

  • To exclude just replace

    @-moz-document regexp("https?://(?!(www.tvtime.com|www.t411.al|www.nespresso.com|www.wechoosethemoon.org|www.nasa.gov|www.site-a-exclure.com|www.site-to-exclude.com)).*"), url-prefix(ftp://), url-prefix(file://), url-prefix(about:), url-prefix(javascript)
    {
    

    by

    @-moz-document regexp("https?://(?!((www.)?facebook.com|www.realtor.ca/Residential/Map.aspx)).*"), url-prefix(ftp://), url-prefix(file://), url-prefix(about:), url-prefix(javascript)
    {
    

    there may be more escaping of special characters needed, you can also try this if above didn't work:

    @-moz-document regexp("https?:\/\/(?!((www\.)?facebook\.com|www\.realtor\.ca\/Residential\/Map\.aspx)).*"), url-prefix(ftp:\/\/), url-prefix(file:\/\/), url-prefix(about:), url-prefix(javascript)
    {
    

    Without knowing the page, visited link colour can be changed with the following style:

    @-moz-document url-prefix("https://www.realtor.ca/Residential/Map.aspx")
    {
      a:visited { color:#ff00ff !important; }
    }
    
  • I managed to make a separate style for visited links only on realtor.ca... It works perfectly.
    I can't get the dark style to exclude Facebook and realtor. Initially, I tried your suggestions on dark which I installed from here by entering
    https?://(?!((www.)?facebook.com|www.realtor.ca/Residential/Map.aspx)).*
    into the field
    URLs matching the regexp
    I also tried
    https?:\/\/(?!((www\.)?facebook\.com|www\.realtor\.ca\/Residential\/Map\.aspx)).*
    Neither worked, so I created a new style, copied the code from userstyles, tried
    @-moz-document regexp("https?://(?!((www.)?facebook.com|www.realtor.ca/Residential/Map.aspx)).*"), url-prefix(ftp://), url-prefix(file://), url-prefix(about:), url-prefix(javascript)
    {
    and finally,
    @-moz-document regexp("https?:\/\/(?!((www\.)?facebook\.com|www\.realtor\.ca\/Residential\/Map\.aspx)).*"), url-prefix(ftp:\/\/), url-prefix(file:\/\/), url-prefix(about:), url-prefix(javascript)
    {
    but again, neither worked.
    I'm properly missing something really obvious because I'm so new to this.
  • I assumed this would be harder to figure out, so I didn't initially ask about it. I don't really need to exclude realtor if I can fix this:
    When hovering on the blue dots, the results are on a white background. When I turn dark on, this becomes invisible, so the text blends into the map too much to be legible. Would that be difficult to fix in the dark style?
  • edited August 26 Chrome
    Depends how much specificity you need to override the global, but theoretically you should be able to create a separate style to do so, like:
    @-moz-document url-prefix("https://www.realtor.ca/Residential/Map.aspx") {
    .m_map_map_cnt_map_pin_info_cnt_cnt,
    .m_map_map_cnt_map_pin_info_cnt,
    .m_map_map_cnt_map_pin_info_hdr,
    .m_infoBox_rslt_big_pager_con .b_pager_infoBox_next,
    .m_infoBox_rslt_big_pager_con .b_pager_infoBox_prev {
    background: #000!important;
    }
    }
    Globals tend to use a lot of hacks like :not() which can mess with specificity. IIRC, using gradients overrides certain scenarios when regular backgrounds fail, but that may just be hyperbole.
    @-moz-document url-prefix("https://www.realtor.ca/Residential/Map.aspx") {
    .m_map_map_cnt_map_pin_info_cnt_cnt,
    .m_map_map_cnt_map_pin_info_cnt,
    .m_map_map_cnt_map_pin_info_hdr,
    .m_infoBox_rslt_big_pager_con .b_pager_infoBox_next,
    .m_infoBox_rslt_big_pager_con .b_pager_infoBox_prev {
    background: linear-gradient(#000, #000)!important;
    }
    }
  • anagrammar, I tried both of your suggestions but couldn't get them to work.
    I also retried everything suggested here with "Global dark style - changes everything to DARK" rather than "Dark is better for my eyes" and it didn't work. That style was even more intrusive on realtor and Facebook, actually.
    Any other ideas? I could just turn styles on and off on different sites, but I'm lazy.
  • Are you installing correctly? Does it work without the global enabled?
  • I don't know for sure that I am. I created a new style specifically for realtor and used the code exactly as you wrote it. Without global enabled, realtor works fine. With global, it's too difficult to read. The second global style I tried made the blue dots disappear on realtor, as well (which is bad).
  • If you want definitive answers regarding why regex exclusions aren't working, or how much specificity is required to override the global, copy the entire code, then post it to pastebin and link it.

    Regarding the regex, I'm guessing you have other rules negating exclusions. As for overriding globals, they may be using the /* AGENT_SHEET */ cheat, which overrides everything. You could try using it either way:
    /* AGENT_SHEET */
    @-moz-document url-prefix("https://www.realtor.ca/Residential/Map.aspx") {
    .m_map_map_cnt_map_pin_info_cnt_cnt,
    .m_map_map_cnt_map_pin_info_cnt,
    .m_map_map_cnt_map_pin_info_hdr,
    .m_infoBox_rslt_big_pager_con .b_pager_infoBox_next,
    .m_infoBox_rslt_big_pager_con .b_pager_infoBox_prev {
    background: linear-gradient(#000, #000)!important;
    }
    }
  • maybe try editing the blanket dark theme like this
    [@-moz-document (whatever) {original code here}}
    ##end of original code here
    @"-moz-document url-prefix(url you want "exluded" here)
    {.elements, .specific{
    background-color:"original backgrond color here" !important;
    color:"original txt color here" !important
    }}
    so long as the original code dosn't have the (!important) part for whatever .specific .elements you need to overwrite it will work...maybe.
Sign In or Register to comment.