tab-reloader icon indicating copy to clipboard operation
tab-reloader copied to clipboard

checking a specific part of a page

Open ewokuk opened this issue 1 year ago • 6 comments

Hi,

Trying to figure out how to only check a specific part of a page for changes. I know the docs say you can use "tab-reloader-element" but I'm not sure how or where to use that. I inspected the page and the section ID containing the stuff i want to check is "vvp-items-grid-container" which is a grid of items that come and go (I attached a screenshot of the section of code in case that isn't the ID I should be using). I just want it to alert me when anything changes in there rather than the whole page. It could even just alert me when the number of items changes rather than descriptions or images (currently in the screenshot it shows 3 items, monitoring changes to that text would do the job). I have it working on the full page at the moment using all the standard settings but I get a lot of false alerts constantly when no items have changed, probably because something else on the page is changing. 2024-02-16_10-55

I have seen a couple of page monitor addons where you can select to monitor part of a page instead of the whole thing and you just click an area of the page you want it to be monitoring and that worked really well but the rest of those addons wasn't up to scratch as other functionality was missing. If tab-reloader had that option it would be unbeatable!

ewokuk avatar Feb 16 '24 11:02 ewokuk

I second this. The option 'tab-reloader-element' appears to be passed to document.querySelector() but it would be very nice indeed if instead of coming from localStorage this option were exposed as a configuration or profile setting.

shonjir avatar Mar 24 '24 20:03 shonjir

@ewokuk try #vvp-items-grid-container. As @shonjir suggested, you can try the following on the browser console to see if it matches or not:

document.querySelector('#vvp-items-grid-container')

james-fray avatar Apr 15 '24 08:04 james-fray

Sorry, I don't know javascript and I'm not a developer so still not sure exactly what to put where for this :/

ewokuk avatar Apr 16 '24 10:04 ewokuk

Right-click on the page. Use inspect item to open the developer console. Switch to the console tab. Now execute:

localStorage.setItem('tab-reloader-element', '#vvp-items-grid-container');

james-fray avatar Apr 30 '24 07:04 james-fray

Aha yes perfect. I get a message "undefined" when entering it, but it seems to be working well. I guess I have to set that every time I go to the page but at least it works, now I can focus the checks on specific areas of pages instead of the entire page!

Have sent you a donation 😁


From: james-fray @.> Sent: 30 April 2024 08:14 To: james-fray/tab-reloader @.> Cc: ewokuk @.>; Mention @.> Subject: Re: [james-fray/tab-reloader] checking a specific part of a page (Issue #159)

Right-click on the page and switch to the console tab. Now execute:

localStorage.setItem('tab-reloader-element', '#vvp-items-grid-container');

— Reply to this email directly, view it on GitHubhttps://github.com/james-fray/tab-reloader/issues/159#issuecomment-2084546998, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKZMWNKCGKCV5UOWFGUWEQTY75AHHAVCNFSM6AAAAABDL2UYEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBUGU2DMOJZHA. You are receiving this because you were mentioned.Message ID: @.***>

ewokuk avatar Apr 30 '24 11:04 ewokuk

Right-click on the page. Use inspect item to open the developer console. Switch to the console tab. Now execute:

localStorage.setItem('tab-reloader-element', '#vvp-items-grid-container');

Can the website you do this to, tell that this was set? If they were checking for it specifically and knew what to look for? Unsure if websites have access to an end user's set localStorage Items.

GitHubGuy89 avatar Jul 27 '24 21:07 GitHubGuy89