Tsuk1ko / nhentai-helper

🔞 A user script make it easy for you to download nHentai manga as zip (or cbz), also support some mirror sites. 一个可以让你轻松打包下载 nHentai 本子的用户脚本,并支持一些镜像站
https://greasyfork.org/scripts/375992
GNU General Public License v3.0
579 stars 45 forks source link

Userscript has error on nhentai.website #51

Closed blackheart35 closed 3 months ago

blackheart35 commented 3 months ago

The userscript doesn't work on nhentai.website anymore. It throws this error in the console:

grafik

It still worked about a week ago, so i'm not sure what changed. nhentai.net and nhentai.to also still work.

blackheart35 commented 3 months ago

If it helps anything, S$ seems to refer to the variable nativeNow in line 819 of the userscript. In line 823 nativeNow gets called and that seems to cause the problem. Now i still don't understand why this only happens on nhentai.website and i'm not familiar with debugging userscripts in the browser, so it's hard for me to get deeper into it.

blackheart35 commented 3 months ago

Ok, it seems i was a bit too quick with my last message. I tried calling Date.now() in my browser console both on nhentai.net and nhentai.website and somehow Date.now() isn't recognized on nhentai.website. So this is an issue with the website and not this userscript.

Anyway, would it be an option to polyfill this, if the issue on the site doesn't get resolved soon? I don't want to lose the option to download from nhentai.website, since they have a lot of missing galleries from the nhentai.net purges and are way more up to date than nhentai.to.

Tsuk1ko commented 3 months ago

Sorry, I seem to have missed this issue.

Some mirror sites do replace the Date class and cause it doesn't have the now() method, but this generally (in Chrome with Tampermonkey) won't affect the script because the script is running in a sandbox environment.

Please tell me your browser and script extensions so I can test it.

blackheart35 commented 3 months ago

I'm using Firefox and Violentmonkey. I tested it in Chrome too and had the same issue with Violentmonkey, but Tampermonkey seems to work fine.

Tsuk1ko commented 3 months ago

Fixed in 3.14.6