gboudreau / sabconnectplusplus

SABnzbd extension for Google Chrome
GNU General Public License v3.0
77 stars 44 forks source link

1-click nzb downloading not working with nzbindex.com #176

Closed mofofofo closed 4 years ago

mofofofo commented 5 years ago

1-click nzb downloading not working with nzbindex.com not working with Chrome Version 71.0.3578.98 (Official Build) (64-bit)

Wiethoofd commented 5 years ago

It is working for me, but the buttons don't always show up on first page load.

Additionally the 'Download selected' button doesn't show up anymore and the 'use display name instead of filename' needs some touching up thanks to the recent redesign of the website.

I have all of the issues above fixed, but need to figure out the 'wait for the page to fill with results' before I commit my improved code.

gissehel commented 4 years ago

I have the same problem, so I suppose it's still not fixed. I usually need to reload 4 / 5 times each page to have the download link appear.

It's most probably due to asynchronus loading of result search on the page. So the extension parse for result on the page before the result are here, doesn't find anything. Then the loading process end and the result are shown, but the extension doesn't parse the result anymore.

If my analysis is correct, the classical way to solve this is to listen for change on the page:

function DOMNodeInserted() {
  // search for links to add here
}
document.documentElement.addEventListener('DOMNodeInserted', DOMNodeInserted, false);
DOMNodeInserted();

By doing that, you must check that you didn't already add a link at that place, as the code can be triggered several times.

I suppose it's what @Wiethoofd is looking for when saying "wait for the page to fill with results".

gboudreau commented 4 years ago

v0.6.31 submitted to Chrome Web Store for review.