Này người xa lạ!

Còn chờ gì nữa mà không mau đăng nhập hoặc đăng ký để cùng tham gia thảo luận với cộng đồng!

Code bug

About: Mouseover Popup Image Viewer
Been getting a ton of javascript errors from every page load all from this userscript and I turned on console logging and it appears you are passing null without test into your tag function that does a toUpper:

The errors:


That function:


This appears to be affecting script execution so if you can look info it I would appreciate it. I also want to ask when this script started I really don't remember it being this obfuscated. Is there a reason you would be obfuscating a GM userscript like this? Honestly if I didn't have the history with this script and was new to it, there's no way on a new install I would even install it these days so i ask because I wonder how many others are avoiding it because they can't read the code to see what it's actually doing (easily without unobfuscating it etc.).

Anyway, I still love this script and do appreciate all the work you've put into it and if it were open sourced on Github I would love to be able to contribute to it!

Bình luận

  • This happens when MPIV checks document node for whatever reason.
    The simple fix is to replace tagName with nodeName.

    Also, the script doesn't adhere to the common code style recs, that's for sure. However, the script is not obfuscated, it's just terse. I've debugged it a few times to find the cause of a weird rule behavior and IMO the code is quite straightforward and easy to understand if you know the syntax of MPIV rules: the same short property names are used in the script.

  • Any idea how often this author actually check and responds to these bug reports? Changelog seems to indicate months between some pretty minor updates.

    You're right that is a fix but an even simpler fix is to code it properly to test for undefined, which is currently does not do and causes the mass number of errors being generated.
  • Roughly once a month over the last year, I think. It's not like the error breaks any functionality though.

Đăng nhập hoặc Đăng ký để gửi bình luận.