Git Product home page Git Product logo

star-thumn's Introduction

install

Description

This is a userscript for StackExchange chat. It replaces all direct links to images in starred messages widget with thumbnails of said images.

before after

It also shows the star counter on hover and allows you to star/unstar images.

animated gif

And shows a lightbox when any image is clicked.

lightbox

Current features:

  • Oneboxed images in chat will become thumbnails.
  • Add or remove stars normally. The star button appears on hover.
  • Linked images in the form of [text](image link) (assuming nothing else on the message) will become thumbnails with text being a title on the image.
  • Proper thumbnailing for imgur images.
  • Clicking on images will open a lightbox.

Planned features:

  • Accepting suggestions in answers below.

Install

You can find the repository that holds the code can be found here. To install, you must be able to run userscripts. Chrome does this by default (or with Tampermonkey) and Firefox does this with Greasemonkey.

Extra

Please note that this is still under development, and not all features are guaranteed to work properly.

star-thumn's People

Contributors

madarauchiha avatar somebody1234 avatar shinonomelab avatar canop avatar

Stargazers

Pieter Hordijk avatar Hong Dai Thanh avatar Unihedron avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

star-thumn's Issues

Option to get more starred images

Right now the list is limited by ~10 latest starred images from a special address. It should be possible to grab more images from the page with all starred messages in the room.

Images sometimes cropped at the bottom of the star list

In some cases, the starred images are too far down, and get cropped by the bottom bar. It seems that this is reproduceable if the browser's zoom is set to 100%, the user is in at least 1 other room, and the star list is expanded fully. It doesn't seem to be a problem unless the star list is expanded.

Image size and displayed number should depend on available space dimensions

Take this one for example:

Sizes are set to 150px max and images neatly fit without overlapping or going below the browser's lower border.

Sometimes 4 images get in on the same line and overlap. Sometimes the second line only has 2 while the first line has 4 images for some silly reason.

One way to solve this would be to set max image size to depend on the size of the free space. Images that go below browser rectangle should not be displayed or the image size should be decreased (to makesensical value) until they all fit.

Ideally, there should be an option to pick the minimum and maximum sizes or how many images to show at all times.

Needs README

Would appreciate someone contributing to this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.