Stylish apply on A:VISITED not working anymore

edited August 2019 in Style Requests [?]
Hi, guy how are you?

I have been using an specific Style the past 2 years. But today it stop working properly.

My Style is set to turn grey a specific link already visited. ok it works. But when i do refresh the page, or close and open again, the color of the link is not grey anymore. It appears it is not counting as an visited link anymore... thank you for help!


I'm applying for this domain https://games.mercadolivre.com.br

the full style im using is




.item a:visited .main-title,
.item a:visited .main-title * {
color: #ccc !important;}

.item a .main-title,
.item a .main-title * {
color: blue!important;
font-weight: bold !important;
}

.item__price {
font-size: 18px !important}


.search-results.grid .results-item.item-info-height-169 .item__info {height: auto !important;}

Comments

  • hello guys, any idea?
  • edited September 2019 [?]
    It's because the site dynamically adds parameters to each href based on some type of analytics, most notably a "tracking id", but apparently some others which might affect display or certain other preferences.

    Probably not all that out of the ordinary for similar sites to do this type of thing, but dynamically altering the actual href to achieve it seems like a clumsy and odd way to go about it IMO.

    Not sure how useful these parameters are to your user experience, but if they're not, you could simply strip them with a userscript. Appears to function fine without them, but I'm not actually buying anything.

    Something like:
    // ==UserScript==
    // @name mercadolivre strip link params
    // @author You
    // @include /https?://(.*\.)?mercadolivre\.com.*/
    // @grant none
    // ==/UserScript==

    const links = document.querySelectorAll('.item a');
    for (var i = 0; i < links.length; i++) {
    const noparam = links[i].href.split(/#|\?/)[0];
    links[i].href = noparam;
    };
  • Hello anagrammar thank you very much for you time and help!

    Actually i just need to track the link I already opened on this website. Just that. So it changes color, but now it do not keep the "visited color" anymore.

    i apologise for my little knowledge.. what i'm supposed to do with the code you have write? just copy on the stylish extesion, or must i edit it in some way?

    thak you very much again.
    Ramon.

    It's because the site dynamically adds parameters to each href based on some type of analytics, most notably a "tracking id", but apparently some others which might affect display or certain other preferences.

    Probably not all that out of the ordinary for similar sites to do this type of thing, but dynamically altering the actual href to achieve it seems like a clumsy and odd way to go about it IMO.

    Not sure how useful these parameters are to your user experience, but if they're not, you could simply strip them with a userscript. Appears to function fine without them, but I'm not actually buying anything.

    Something like:

    // ==UserScript==
    // @name mercadolivre strip link params
    // @author You
    // @include /https?://(.*\.)?mercadolivre\.com.*/
    // @grant none
    // ==/UserScript==

    const links = document.querySelectorAll('.item a');
    for (var i = 0; i < links.length; i++) {
    const noparam = links[i].href.split(/#|\?/)[0];
    links[i].href = noparam;
    };
  • edited September 2019 [?]
    Install Tampermonkey, create a new script, paste and save. It should accomplish what you're looking to do.
  • oh man, you are such a good soul. works perfectly, you saved me.. thanks from Brazil
    :D

    Install Tampermonkey, create a new script, paste and save. It should accomplish what you're looking to do.

  • You're welcome, from Murica.
Sign In or Register to comment.