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

Stopped Working Properly in the Last Few Days #1

Open
RoyiAvital opened this issue Sep 30, 2022 · 10 comments
Open

Stopped Working Properly in the Last Few Days #1

RoyiAvital opened this issue Sep 30, 2022 · 10 comments

Comments

@RoyiAvital
Copy link

RoyiAvital commented Sep 30, 2022

Hi,

It seems to stop working properly in the last few days:

  • Some cases of new threads aren't marked in green.
  • Posts with new comments doesn't write the number of new comments.

Using on Chrome 106.0.5249.62 and TamperMonkey 4.16.1.
On my Chrome TamperMonkey is the only extension and your script is the only script on it.

@raszpl
Copy link
Owner

raszpl commented Sep 30, 2022

Yep. for a quick fix you can manually edit at

if (parseInt(document.querySelectorAll('.subtext > a[href^="item?id='+itemarray[i]+'"]')[0].innerHTML) > parseInt(localStorage.getItem(itemarray[i]).split(' ')[1]))

          //        if (parseInt(document.querySelectorAll('.subtext > a[href^="item?id='+itemarray[i]+'"]')[0].innerHTML) > parseInt(localStorage.getItem(itemarray[i]).split(' ')[1]))
          //      {
          //      let fresh = parseInt(document.querySelectorAll('.subtext > a[href^="item?id='+itemarray[i]+'"]')[0].innerHTML) - parseInt(localStorage.getItem(itemarray[i]).split(' ')[1]);
          //    document.querySelectorAll('.subtext > a[href^="item?id='+itemarray[i]+'"]')[0].innerHTML += '<a class="newcomments"><b> '+fresh+' new</b></a>';
        if (parseInt(document.querySelector('.subtext > span.subline > a[href^="item?id='+itemarray[i]+'"]').innerText) > parseInt(localStorage.getItem(itemarray[i]).split(' ')[1])) {
          let fresh = parseInt(document.querySelector('.subtext > span.subline > a[href^="item?id='+itemarray[i]+'"]').innerText) - parseInt(localStorage.getItem(itemarray[i]).split(' ')[1]);
          document.querySelector('.subtext > span.subline > a[href^="item?id='+itemarray[i]+'"]').innerHTML += ' <a class="hhn_newcomments"><b>'+fresh+' new</b></a>';

Ill update github later with refactored script

@RoyiAvital
Copy link
Author

No rush, I will for the updated version.
It should be updated automatically by TamperMonkey, right?

@raszpl
Copy link
Owner

raszpl commented Oct 1, 2022

Just updated.

@RoyiAvital
Copy link
Author

I think you didn't update the version which means it won't update.

@RoyiAvital
Copy link
Author

RoyiAvital commented Oct 1, 2022

OK, now it is updated yet nothing works!

When I look at the code in TamperMonkey it shows:

image

Mind the error next to case.

@raszpl
Copy link
Owner

raszpl commented Oct 1, 2022

:( im sorry, hopefully third times a charm

@RoyiAvital
Copy link
Author

Checking, yet it still says some errors:

image

Maybe version 0.6.1 :-)?

@RoyiAvital
Copy link
Author

Also, the number of new comments used to be red, yet now it is not:

image

@raszpl
Copy link
Owner

raszpl commented Oct 2, 2022

Those are cosmetic ESLint errors, safe to ignore. Fixed class name, should be red again :)

@RoyiAvital
Copy link
Author

OK, I still see cases (Mostly on pages 2, 3, ...) for news I haven't seen or read which are not marked in green.

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

No branches or pull requests

2 participants