ViewImage: Fails to get the visit button: Cannot read properties of null (reading 'cloneNode')

Describe the bug Just stopped working out of the blue, I’d been using it fine for the past couple years; I’m not exactly sure if it stopped working today or during the week. I’ve tried in different computers and browsers, using both Firefox and Chrome. I typically just use Firefox, but to make sure it wasn’t down to the browser I also tested it on Chrome, which gave a bit more info on the console per the screenshot:

Cannot read properties of null (reading 'cloneNode') and it points to content-script.js, line 134

Seems there is probably a new element or naming convention that doesn’t fall into the current 3 switch cases.

To Reproduce Search anything on Google Images.

Expected behavior I would expect it to show the usual “View Image” button.

Screenshots imagem

imagem

System Information

  • Browser: Firefox v100.0.2
  • Browser: Chrome v102.0.5005.63
  • Version: 3.6.2

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 6
  • Comments: 40 (13 by maintainers)

Most upvoted comments

I looked into this closer and it’s just that the Visit button has a new class name; this is the PR to fix the issue: https://github.com/bijij/ViewImage/pull/243

In the meantime, I also updated the script to be used with extensions such as GreaseMonkey, TamperMonkey, etc. You can grab the script here: https://gist.github.com/ner00/ec9ae47e202b8e99f19be44a5af6baf3

NOTE: The script linked above will not work if the extension is running at the same time. While the extension isn’t updated, you can disable it and use the script instead.

For those who might not know how to install custom scripts to run in your browser, like an extension, follow this:

  1. Make sure to disable or uninstall the View Image extension in your browser (go to settings, find the section with extensions, and disable or uninstall it).

    • Firefox addons URL: about:addons
    • Chrome extensions URL: chrome://extensions/
  2. Install an extension that allows to add custom scripts, most popular are Tampermonkey and Greasemonkey (choose one):

  3. Install the script mentioned, which can be installed directly by clicking here: https://gist.github.com/ner00/ec9ae47e202b8e99f19be44a5af6baf3/raw/viewimage.user.js

Should be fixed up now for firefox, again chrome is pending review. hopefully doesn’t take too long.

I’ve just released version 3.6.3 with the fix for this included, thanks for the PR! It should roll out to webstores over the next few hours. (Except a week for chrome possibly unfortunately)

Fixed the custom script mentioned here, update directly by clicking here.

As for the official extension, thanks for the update @bijij, unfortunately Google changed the Visit text span class today lol Also created a PR for that now.

Just updated to 3.6.3 but it still doesn’t work. I’m running Firefox 101.0 (64-bit).

Any Firefox users here?

Working now - thanks very much for your efforts.

Stopped working here this morning on Firefox 101.0.1 (64-bit).

Using Firefox 101.0.1 (64-bit)

The fix from ner00 didn’t work for me, unfortunately.

I did the following:

  1. Disabled View Image addon.
  2. Installed Greasemonkey for Firefox.
  3. Installed the script using the direct install link.

I also did a restart of Firefox after each of these steps and the View Image button is still not present.

If google’s going to repeatedly change class IDs we might be in for a few weeks of this game. unforunate. I’ll bump to 3.6.4 then.

Yeah, sure. It’s odd that they haven’t touched much of it in a long while and in a span of a week they changed 2 class names.

Fixed the custom script mentioned here, update directly by clicking here.

As for the official extension, thanks for the update @bijij, unfortunately Google changed the Visit text span class today lol Also created a PR for that now.

If google’s going to repeatedly change class IDs we might be in for a few weeks of this game. unforunate. I’ll bump to 3.6.4 then.