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

Custom expando support #15

Open
4 of 9 tasks
OctoNezd opened this issue Jun 29, 2023 · 26 comments
Open
4 of 9 tasks

Custom expando support #15

OctoNezd opened this issue Jun 29, 2023 · 26 comments
Labels
RES-Drop Implementing features made by RES, more mobile friendly

Comments

@OctoNezd
Copy link
Owner

OctoNezd commented Jun 29, 2023

Sites to support:

  • Reddit gallery
  • i.redd.it
  • imgur
  • v.redd.it
  • youtube
  • vimeo?
  • vk?
  • tenor?
  • redgifs?
@OctoNezd OctoNezd added the RES-Drop Implementing features made by RES, more mobile friendly label Jun 29, 2023
@faraplay
Copy link
Contributor

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

@OctoNezd
Copy link
Owner Author

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.

@faraplay
Copy link
Contributor

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).

@OctoNezd
Copy link
Owner Author

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

image

lightgallery plays nicely it seems - gonna integrate it

@faraplay
Copy link
Contributor

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

@OctoNezd
Copy link
Owner Author

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

@OctoNezd
Copy link
Owner Author

OctoNezd commented Jul 16, 2023

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

Basic support added in 4ebe41a.

@OctoNezd
Copy link
Owner Author

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

@faraplay
Copy link
Contributor

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.

@OctoNezd
Copy link
Owner Author

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

@faraplay
Copy link
Contributor

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

@faraplay
Copy link
Contributor

Dumb question but how do you close the image preview?

@OctoNezd
Copy link
Owner Author

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

@faraplay
Copy link
Contributor

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.

@OctoNezd
Copy link
Owner Author

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

@faraplay
Copy link
Contributor

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

@OctoNezd
Copy link
Owner Author

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

@faraplay
Copy link
Contributor

image
It looks like there is no close button at all

@faraplay
Copy link
Contributor

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

@OctoNezd
Copy link
Owner Author

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

@faraplay
Copy link
Contributor

faraplay commented Jul 16, 2023

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

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

now made into separate issue #54

@OctoNezd
Copy link
Owner Author

OctoNezd commented Jan 4, 2024

vReddIt expandos are blocked by sachinchoolur/lightGallery#1578

@OctoNezd
Copy link
Owner Author

OctoNezd commented Jan 4, 2024

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

OctoNezd added a commit that referenced this issue Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RES-Drop Implementing features made by RES, more mobile friendly
Projects
None yet
Development

No branches or pull requests

2 participants