Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This seems broken. #94

Open
koberulz opened this issue Feb 5, 2020 · 13 comments
Open

This seems broken. #94

koberulz opened this issue Feb 5, 2020 · 13 comments

Comments

@koberulz
Copy link

koberulz commented Feb 5, 2020

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

@Procyon-b
Copy link
Contributor

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
Copy link

psonnosp commented Mar 6, 2020

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
Copy link
Contributor

Procyon-b commented Mar 7, 2020

@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
Copy link

psonnosp commented Mar 8, 2020

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
Copy link
Contributor

Procyon-b commented Mar 8, 2020

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:

  • open manager
  • check the as Usercss checkbox next to Write new style
  • click Write new style
  • select all (ctrl+a) the default code, and paste the code below
  • save

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
Copy link
Contributor

@psonnosp Is it working ?

@psonnosp
Copy link

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
Copy link
Contributor

Procyon-b commented Mar 15, 2020

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
Copy link
Contributor

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
Copy link
Contributor

Procyon-b commented Mar 16, 2020

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
Copy link

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

@Procyon-b
Copy link
Contributor

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

@psonnosp
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants