oldlander icon indicating copy to clipboard operation
oldlander copied to clipboard

Custom expando support

Open OctoNezd opened this issue 2 years ago • 26 comments

Sites to support:

  • [x] Reddit gallery
  • [x] i.redd.it
  • [ ] imgur
  • [x] v.redd.it
  • [x] youtube
  • [ ] vimeo?
  • [ ] vk?
  • [ ] tenor?
  • [ ] redgifs?

OctoNezd avatar Jun 29 '23 18:06 OctoNezd

To be more clear, what features are you looking for in the custom expando?

faraplay avatar Jul 15 '23 20:07 faraplay

Issue with RES is that it requires access for domains (e.g. twitter, v.redd.it, etc) - which mobile Firefox cant ask for. At first I thought of basically faking RES environment for their scripts to work but it sounds like a bad idea now that I think of it - custom implementation for them would probably be best way around.

OctoNezd avatar Jul 15 '23 20:07 OctoNezd

A custom implementation sounds like a good idea. If we're implementing the features ourselves though, it would probably be best to create separate issues for each of the features we want (e.g. ability to zoom, rotate).

faraplay avatar Jul 15 '23 22:07 faraplay

I think it would be nicer to grab a pre-existing library for that rather than reinventing the wheel, e.g. https://www.lightgalleryjs.com/ (first google search)

OctoNezd avatar Jul 16 '23 08:07 OctoNezd

image

lightgallery plays nicely it seems - gonna integrate it

OctoNezd avatar Jul 16 '23 12:07 OctoNezd

Careful with the license issue, if we want to use lightgallery we need to change our license to GPLv3

faraplay avatar Jul 16 '23 15:07 faraplay

It seems to me that it is required to use GPLv3 compliant license, no?

OctoNezd avatar Jul 16 '23 15:07 OctoNezd

quote per https://www.lightgalleryjs.com/docs/license/

Open source license

If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use this project under the terms of the GPLv3. Questions? Read the GPL FAQ.

If I understand correctly - MIT is compliant. Of course, no one would be able to repackage OldLander under proprietary license after that but I dont think I will sell it to some giant data harvesting company which would make extension closed source.

OctoNezd avatar Jul 16 '23 15:07 OctoNezd

Basic support added in 4ebe41a.

OctoNezd avatar Jul 16 '23 15:07 OctoNezd

v.redd.it (and probably others) can be implemented using video.js, and lightGallery is compatible with it,

OctoNezd avatar Jul 16 '23 16:07 OctoNezd

If I understand correctly - MIT is compliant. Of course, no one would be able to repackage OldLander under proprietary license after that but I dont think I will sell it to some giant data harvesting company which would make extension closed source.

I think the compatibility only goes one way (can use MIT license code in GPLv3 project, but can't use GPLv3 code in MIT license project). That's the impression I got from this: https://opensource.stackexchange.com/questions/1640/if-im-using-a-gpl-3-library-in-my-project-can-i-license-my-project-under-mit-l I assume you want to keep this project open source anyway so there shouldn't be issues in changing to GPLv3? I'm not an expert though.

faraplay avatar Jul 16 '23 16:07 faraplay

and looking at this - https://tech.popdata.org/the-gpl-license-and-linking-still-unclear-after-30-years/ noone understands this issue.

OctoNezd avatar Jul 16 '23 16:07 OctoNezd

Alright let's ignore the potential license problem for now then 😅

faraplay avatar Jul 16 '23 16:07 faraplay

Dumb question but how do you close the image preview?

faraplay avatar Jul 16 '23 16:07 faraplay

There is a cross in top left corner and you can click on black background?

OctoNezd avatar Jul 16 '23 17:07 OctoNezd

Thanks, clicking on the background works. But for me, the top left corner has the image count (e.g. 1/3, although it's usually 1/1) instead of a cross.

faraplay avatar Jul 16 '23 17:07 faraplay

Sorry, I am stupid and still confuse sides. Right side - see the screenshot I sent before.

OctoNezd avatar Jul 16 '23 18:07 OctoNezd

There's no cross for me on the right side either, only a zoom-in button. See screenshot:

faraplay avatar Jul 16 '23 18:07 faraplay

Hm, thats weird. Can you check whether the button gets created at all?

OctoNezd avatar Jul 16 '23 19:07 OctoNezd

image It looks like there is no close button at all

faraplay avatar Jul 16 '23 19:07 faraplay

Now the close button is appearing all of a sudden. I have no idea why it started working now

faraplay avatar Jul 16 '23 21:07 faraplay

Perhaps lightGallery is not as good as I hoped. Gonna look for alternative libraries later on I guess.

OctoNezd avatar Jul 16 '23 21:07 OctoNezd

Ok I found out what is making the close button appear/disappear. Steps to reproduce (on Firefox desktop):

  1. Turn on Responsive Design Mode (Ctrl+Shift+M)
  2. In the User Agent bar (labelled UA), type in anything with the word "Android". ("iPad", "iPhone", "Windows Phone" also work.)
  3. Load up reddit (or refresh if you already have it loaded)
  4. Open a lightscreen image preview.
  5. The download image and close buttons are now gone.

There might be some setting with user agents/detecting mobile devices in the library you could adjust to fix this? Edit: it looks like you just need to change this setting. image

faraplay avatar Jul 16 '23 21:07 faraplay

Ok I found out what is making the close button appear/disappear. Steps to reproduce (on Firefox desktop): ...

now made into separate issue #54

faraplay avatar Jul 20 '23 18:07 faraplay

vReddIt expandos are blocked by https://github.com/sachinchoolur/lightGallery/issues/1578

OctoNezd avatar Jan 04 '24 13:01 OctoNezd

Nevermind, issue seems to be on oldlander side. Perhaps videojs doesn't get injected correctly?

OctoNezd avatar Jan 04 '24 13:01 OctoNezd