OctoNezd / oldlander

WebExt for to make old reddit more usable on phone
MIT License
141 stars 6 forks source link

Custom expando support #15

Open OctoNezd opened 1 year ago

OctoNezd commented 1 year ago

Sites to support:

faraplay commented 1 year ago

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

OctoNezd commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

image

lightgallery plays nicely it seems - gonna integrate it

faraplay commented 1 year ago

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

OctoNezd commented 1 year ago

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

OctoNezd commented 1 year ago

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 commented 1 year ago

Basic support added in 4ebe41a.

OctoNezd commented 1 year ago

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

faraplay commented 1 year ago

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 commented 1 year ago

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

faraplay commented 1 year ago

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

faraplay commented 1 year ago

Dumb question but how do you close the image preview?

OctoNezd commented 1 year ago

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

faraplay commented 1 year ago

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 commented 1 year ago

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

faraplay commented 1 year ago

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

OctoNezd commented 1 year ago

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

faraplay commented 1 year ago

image It looks like there is no close button at all

faraplay commented 1 year ago

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

OctoNezd commented 1 year ago

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

faraplay commented 1 year ago

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 commented 1 year ago

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 commented 8 months ago

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

OctoNezd commented 8 months ago

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