devunt / make-gis-great-again

This web extension adds back "View Image" button to Google Image Search results.
MIT License
768 stars 55 forks source link

This seems broken. #94

Open koberulz opened 4 years ago

koberulz commented 4 years ago

No button is visible for me anymore. Was working yesterday. Waterfox Classic v 2020.01

Procyon-b commented 4 years ago

You can try the current beta version (1.5.0.10). See issue #86. You can use it by getting it from my fork (method explained). Tampermonkey will handle updates for you. Or you can copy the code from the comments in that issue.

psonnosp commented 4 years ago

Did it not use to be an overlay in the lower left of each image with its dimensions? And there's no longer any option to search for alternative sizes.

Has Google changed something the last few days so this has disappeared or have I gone full senile?

Procyon-b commented 4 years ago

@psonnosp I didn't notice that. But yes, google has apparently removed the size overlay. But not from every versions of its layout. From what I can see in the source code, there is a possibility to bring it back. Until google breaks it again... ;)

I'm testing a stylesheet to load into stylus. When ready I can post it here if you want.

Concerning the search for alternative sizes, this has been remove months ago. There is another extension/userscript fixing this. I've also been participating there.

psonnosp commented 4 years ago

Yes, please do that, thanks.

The thing with it not being removed from every version has to be the case with alternative sizes to then cause I know I haven't been missing it for months. It's one of the things I use the most so kind of sure I would of get tired of it earlier if that was the case. But that doesn't matter, where can I find the script that fix it?

Procyon-b commented 4 years ago

The userscript/extension is google-image-sizer. (It's in my list of repositories) It has been updated just a couple of days ago, and still works. With versions of google images that still display the sizes, you'll notice a difference. Daniel has reversed the behavior of sizes captions (to match an old GIS behavior?): the size are always displayed, and hidden on mouse over.

As for the userstyle, here is my take. It's in userstyle format. You have to load it in stylus, or an extension which understand it.

How to install it in stylus:

In stylus context menu on google image pages, you'll see a gear symbol next to the stylesheet name. It opens a dialog to configure this stylesheet with the behavior you like best. If you check on change at the bottom of that dialog, change will be applied immediately. Don't let the editor opened at the same time unless Live preview is disabled on that page.

If it works for you, I will create a repository to host the file, and to keep users automatically updated.

/* ==UserStyle==
@name           google image search - size back
@namespace      github.com/Procyon-b
@version        0.1.0

latest version below
Procyon-b commented 4 years ago

@psonnosp Is it working ?

psonnosp commented 4 years ago

Sorry I've been a bit of lately. No idea what stylus is and google just showed me a lot of pens :D So don't know what to do with that.

As of the first script the only thing I found different was that it added more options under Size in search tools and that wasn't really what I was looking for. I was talking about the Search by Image-button that used to be located together with the View Image button that you see under the image when you click on a search result so it open to the right on the screen.

Procyon-b commented 4 years ago

Stylus is an extension that handles userstyles. Just like tampermonkey handles userscripts. The format used above is enhanced in a way that allows stylus to modify the stylesheet based on options (defined in the stylesheet) you have selected.

Search by Image-button

You're right. I completely forgot about it. I don't use it that often. I'll look into this.

Procyon-b commented 4 years ago

New version available in issue #95 And stylus for FF (56.0.2 if you're still using this) is here (if you ever want to test).

Procyon-b commented 4 years ago

CSS updated. 2 versions available. Simpler, more compatible, non-configurable version below.

[Edit] code replaced with simplified version.


stylus version:

/* ==UserStyle==
@name           google image search - size back
@namespace      github.com/Procyon-b
@version        0.3.0
@description    ...
@author         Achernar
@preprocessor stylus

@var checkbox Always  'Show: always / on mouse over' 1
@var checkbox hover   '  hide on mouse (if always show)' 1
@var checkbox top     'Display at the top' 0
==/UserStyle== */
@-moz-document regexp("https:\\/\\/www.google\\..*?\\/search\\?.*?tbm=isch.*") {

div[data-ow]::before {
  display: none;
  z-index: 9999;
  padding: 6px;
  color: #70757a;
  font: normal 11px arial,sans-serif;
  background-color: rgba(255, 255, 255, 0.9);
  content: attr(data-ow) " × " attr(data-oh);
  position: absolute;
  border-radius: 0 6px 0 0;
  bottom: 3.8em;
}

if top {
  div[data-ow]::before {
    border-radius: 0 0 6px 0;
    bottom: initial;
  }
}

if Always {
  div[data-ow]::before {
    display: inline-block;
  }
  if hover {
    div[data-ow]:hover::before {
      display: none;
    }
  }
}
if Always == 0 {
  div[data-ow]:hover::before {
    display: inline-block;
  }
}

}

simpler CSS version:

@-moz-document regexp("https:\\/\\/www.google\\..*?\\/search\\?.*?tbm=isch.*") {
/* ==UserStyle==
@name           google image search - size back
@namespace      github.com/Procyon-b
@version        0.3.0
@description    ...
@author         Achernar
==/UserStyle== */

div[data-ow]::before {
  display: inline-block;
  z-index: 9999;
  padding: 6px;
  color: #70757a;
  font: normal 11px arial,sans-serif;
  background-color: rgba(255, 255, 255, 0.9);
  content: attr(data-ow) " × " attr(data-oh);
  position: absolute;
  border-radius: 0 6px 0 0;
  bottom: 3.8em;
}
div[data-ow]:hover::before {
  display: none;
}
}
psonnosp commented 4 years ago

Thanks you so much for the help with this, much appreciated! 👍

Procyon-b commented 4 years ago

Have you tried the stylesheet with stylus, or only the last version of the script?

psonnosp commented 4 years ago

Both of them and no issues to report so far. So once again, thank you.