Giter Club home page Giter Club logo

redditp's Introduction

redditp

A full screen reddit presentation or slide show.

http://redditp.com

Hotkeys

  • a - toggles auto-next (play/pause)
  • t - collapse/uncollapse title
  • c - collapse/uncollapse controls
  • i - open image in a new tab
  • r - open comments in a new tab
  • u - open user slideshow in new tab
  • f - toggle full screen mode
  • m - toggle sound
  • g - skip gallery
  • Arrow keys, pgup/pgdown, spacebar change slides
  • Swipe gestures on phones

Features

  • All /r/ subreddits, including different ?sort stuff.
  • /user/ , /domain/ , /me/ url's work.
  • Url's ending with ['.jpg', '.jpeg', '.gif', '.bmp', '.png']
  • You can save the html file locally and use it, just make sure you add a separator e.g. the question mark in file:///c/myredditp.html?/r/gifs so the browser knows to pick up the right file and go to the right subreddit.
  • Support for /r/random and /r/randnsfw virtual subreddits. These'll be tricky unless I cheat as they contain redirects.

Possible future features, depending on feedback:

  • Zoom/Pan for comics
  • Imgur albums support
  • Offline access support, though I don't know if this is even possible actually (caching external image resources).
  • Login and upvoting support

Host your own redditp

Redditp relies on the /r/subreddit in the URL to fetch the JSON from the corresponding reddit endpoint. There are a few ways you can set up support for these URLs yourself:

  • You can use an Apache server with the .htaccess file.
  • Host on Netlify using the _redirects file. This is the current host for redditp.
  • Use NodeJS (see package.json).
  • Use a simple HTTP server and put the subreddit URL in the get parameters like http://localhost?/r/subreddit.
  • Use GitHub pages by copying index.html into 404.html which will make all unknown URLs reach the same index.html. This currently only works with a custom domain because of where the .js and .css files are located.

Credits

redditp's People

Contributors

amoshydra avatar char avatar d33tah avatar eanmclaughlin avatar estrohm avatar felixs-alt avatar frznvm0 avatar github-throwaway avatar goodolclint avatar ikkebr avatar isaacviel avatar jeffjose avatar johnnydarks avatar kiwidrew avatar kmcopper avatar leth avatar mrhant avatar mrspiffyclean avatar murgo avatar nielsz avatar omegasome avatar quantummaniac avatar ryman avatar smarek avatar stefanoamorelli avatar toastwaffle avatar ubershmekel avatar utopiabound avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redditp's Issues

Is there a max length of url for multireddits?

I am now subscribed to 242 picture subreddits (lots of /r/random) and the multireddit url is 2907 characters long which is causing the powerpoint to not load. redditp was working up until recently (as in before I added a few more subreddits) so I must have hit a limit. I was wondering if there is a hard coded limit that can be increased or if I just need to stay under it. I could simply unsubscribe to some of the less active/not as good subreddits to stay under whatever limit there is, but I'd like to know what it is.

Cheers!

NSFW- 18+ images

You may "Legally" have to display a screen before images that are meant for 18+. A nice option to add would be to omit them through a setting (checkbox).

Sometimes get a long string of black screens in place of pictures

Does anyone else sometimes get a long string of black screens in place of pictures?

The initial pictures load fine, but after a while, they go black.

It could be, say, 20 straight black screens (titles still appear over each one) before it resumes, and then another series of black screens will follow sometime later.

I thought that it occurred more in multi reddits over official front page reddits, but I'm not sure that it matters.

I also tried calling tweaking the speed, but I don't think that it makes a difference.

There is mention on the Redditp github of a problem where gallery URLs create blank screens:

Gallery URLs Create Blank Screens When Browsing

#21

It mentions black screens.

I'm not sure how you can tell if it's a gallery, but hovering my mouse over "image" to see the URL i in the status bar shows that black screens can seem to happen on any type.

I made a previous thread before about a "Failed Ajax" error: https://www.reddit.com/r/redditp/comments/2vmv7b/any_way_to_bypass_failed_ajax_error_and_keep_the/

(Now that I think about it, I don't think I've seen the error for a long time.

Thanks!)

I mention that thread because the conditions are still the same, as in these series' of black screens occur both in my very capable computer with Firefox, and my grandma's empty computer (bare settings) with Chrome.

Thanks.

Sound enable/disable preference

Hi, the same way we currently have nsfw preference, could there be an sound preference?

Simple way is to reflect the preference in muted attribute presence
Advanced would be to also transfer the volume level from one video tag to another (javascript accessible property videotag.volume with values from 0.0 to 1.0 meaning 0% to 100% volume)

If you agree with proposal, i'd be willing to create PR for your review

Link to .webm instead of .mp4 for http://giant.gfycat.com

First off, thanks so much for redditp!

I just noticed that redditp.com links to *.mp4 version of gfycat videos, when it should be linking to *.webm versions of it.

The *.mp4 versions are significantly larger with no appreciable visual gains. Here's an example -

http://gfycat.com/AcceptableWebbedBedbug

mp4 (13.5M) - http://giant.gfycat.com/AcceptableWebbedBedbug.mp4
webm (4.5M) - http://giant.gfycat.com/AcceptableWebbedBedbug.webm

That's almost 3x times savings. I'm sure your users would appreciate snappier gfy loads!


ffmpeg info of mp4 vs webm

mp4

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/sfw.test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.63.100
  Duration: 00:00:08.96, start: 0.000000, bitrate: 12609 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 12608 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
    Metadata:
      handler_name    :

webm

Input #0, matroska,webm, from '/tmp/sfw.test.webm':
  Duration: 00:00:08.96, start: 0.000000, bitrate: 4191 kb/s
    Stream #0:0: Video: vp8, yuv420p, 1920x1080, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)

RedditP Picks Up PgDn and PgUp Use for Browser's Tab Switching

I use Ctrl-PgUp and Ctrl-PgDn to navigate between tabs -- they're even mapped to some of my mouse's extra buttons.

Redditp picks up their usage and, when I'm switching to a tab that has Redditp, interprets the "Ctrl-PgDn" used to switch tabs as a "Next Photo" command. (Even with the Ctrl modifier key in use.)

Fix GFYCat /detail/ URLs

URLs like https://gfycat.com/gifs/detail/flatgrouchyblackfly fail to load.

The regex at EmbedIt.js#L86-L90 doesn't seem to accommodate this type of URL. Found this one that matches well: /(?:http:|https:|)(?:\/\/|)(?:gfycat\.com\/(?:\w*\/)*)(\w+$)/gi

Trouble Accessing Private Sub

I own the private sub r/myredditp and I'm having trouble using redditp to access the content, is there anyway to access the sub without making it public? I can submit proof of account for both u/lavekian and u/outrageousprophet if need be

[suggestion] handling of all images loaded

After all the images are loaded - dash is added to "numberButtons" and images are loaded again.
For example we have 3 photos, buttons will look following way:
[1] [2] [3] [-] [4] [5] [6] [-]

Why is it working this way?
Won't it be more intuitive to start displaying from 1st image again?

Rebuild and potential redditp2?

Hi there @ubershmekel. I have a proposal for you.
I thought this was a cool project with a bunch of potential.

The Rebuild

When I was looking through the issues and future features, I saw that many were going to be difficult to add without a code cleanup and/or rebuild.

So I'm currently working towards a rebuild over at JoshWillik/redditp.
You can see a (temporary) live demo of this system running here

(Although the UI looks very different than the current redditp, that's not a necessary part of the system and it could be made to look like the current redditp with minimal to moderate effort.)

This rebuild is about 75% of the way towards feature parity with the existing redditp from a UI perspective.
From a media standpoint, I hope to have Gyfcat videos, imgur albums, imgur pages, and youtube videos by the time I'm done.

The rebuild features a plugin based architecture (as requested in #27). This should allow redditp to better handle a variety of media types.

The Proposal

I don't have time to run a redditp clone, so if you're willing, I'd love for you to adopt this rebuild when it's finished. I'd be more than willing to stick around and help if you need any pointers on the build system or the new features of Javascript. I might even add a feature or two, but I don't have time to be a lead mantainer.

Is this something you would be interested in?

Back button support

Many times while using redditp.com slideshow I want to go back to previous image and I instinctively hit the back button of my mouse, thus accidentally leaving the site and never finding the place I was at before as going forward just takes me to pic 1.

This could be solved by using the window.history API to push all slideshow images as states, or have the URL represent the state of the slideshow.

I could maybe do this myself and send a PR if this is something you would merge.

Page is very demanding when swiping fast

When I "scroll/swipe" quickly through the images, the page drains my battery like mad (10-20% within few minutes on a relatively new macbook) and fans starts blowing like I was playing some AAA game. Any idea what might be causing it?

OS: macOS 10.13.6
Browser: Safari 11.1.2

Gallery URLs Create Blank Screens When Browsing

RedditP's behavior with Imgur links with "/gallery/" or "/a/" in them creates several errors and non-efficiencies in the viewing experience.

Example: while reviewing http://www.redditp.com/r/comicbooks, there was a "Supervillain Origins: Sabretooth" link for which the link on Reddit was http://imgur.com/gallery/RnGz5. The screen on Redditp is completely black, and the "image" link appends a ".jpg" which, when clicked, leads you to a 404 page on Imgur.

offline mode

if there was a way that you could make images mass downloadable it would negate the need for an offline mode but i assume this would require a lot more server power because the images would probably half to be zipped. if i could chose a range like 1-100 and hit a download button it would probably be the greatest thing ever.

S,D Navigation.

currently you can switch links with arrows, I would like to add s,d support,would anyone be interested for a pr?

Chrome: Black screens, freezing, and “Mobile browsers won’t auto-play with a tap” - No problems with Firefox

I’m not the primary redditp user, but I noticed on the other person’s computer that in Chrome, it would sometimes freeze on a black screen.
After clicking the right arrow, you see “Mobile browsers won’t auto-play with a tap”.
I tried the presentation in Firefox, and I don’t think it ever stopped, or went black.

E.g. this one made it black on Chrome:
https://www.reddit.com/r/Eyebleach/comments/4xv5n9/mini_horse_and_his_mini_friend/

These issues equally happened on both their computer and my computer.
Chrome had black screens and “Mobile browsers won’t auto-play”, while FIrefox was fine.

Mild observation: slideshows of just a single subreddit seem to have less black screens then multireddits with multiple subreddits

Maybe it’s just me, but I seem to notice that slideshows of just a single subreddit seem to have less black screens then multireddits with multiple subreddits.

I’m getting little to no black screens with a slideshow of /r/pics.

As soon as I add just two more subreddits like /r/funny and /r/gifs, black screens show up.

Even previously fine /r/pics pictures go black in a 3 subreddit multireddit.

Slideshow Freezing

New user to redditp but I'm already a huge fan. I noticed that the slideshow freezes when the next image is a video. I can manually flip to the next image and the slideshow starts up again. I am experiencing this in Chrome and Firefox. Any way to fix this? Thanks!

Fix looping for short HTML5 GIFs

Current behavior:
Short GIFs in video format play once and immediately skip to next slide, disregarding rp.settings.timeToNextSlide

Expected behavior:
GIFs should loop for as long as the rp.settings.timeToNextSlide is. Regardless of whether they are an actual image file with a .gif extension or a .webm / .mp4 video.

See this fix in a fork

Any way to bypass "Failed Ajax" error, and keep the slideshow presentation going without user input? Also, Ajax errors seem to appear more frequently in Chrome than in Firefox

http://www.reddit.com/r/redditp/comments/2vmv7b/any_way_to_bypass_failed_ajax_error_and_keep_the/

Any way to bypass "Failed Ajax" error, and keep the slideshow presentation going without user input? Also, Ajax errors seem to appear more frequently in Chrome than in Firefox

Resume after "Failed Ajax" error

First off, this program is amazing, and has it has kept my old, Asian grandmother entertained for lots of time.

Thank you so much for creating it.

I opened the console with F12, which was suggested in a previous query about the "Failed Ajax" error.

There are several entries of "failed", with a link on the right.

I think that these were for previous images that appeared black, but the presentation continued on.

After a "Failed Ajax" comes up, it says "Uncaught TypeError: undefined is not a function".

What's on the right varies.

(It's a JSON file instead of a link?).


Here is the error on 3 separate occasions:

http://www.reddit.com/user/bboyjkang/m/citpo.json?jsonp=jQuery19109659527405165136_1423658241019&after=t3_2vhl6i&&_=1423658241022

http://www.reddit.com/user/bboyjkang/m/citpo.json?jsonp=jQuery191018773288885131478_1423706531735&after=t3_2vkyfn&&_=1423706531738

I think that there was one time where I couldn't copy the text on the right, but I could open it like the other 2 error instances, so I copied what was inside.

Here's part of it.

/**/jQuery1910120294198859483_1423693532073({"kind": "Listing", "data": {"modhash": "", "children": [{"kind": "t3", "data": {"domain": "farm8.staticflickr.com", "banned_by": null, "media_embed": {}, "subreddit": "CityPorn", "selftext_html": null, "selftext": "", "likes": null, "user_reports": [],

This is the multi Reddit that was made for my grandma, and was used to produce those errors.

http://redditp.com/user/bboyjkang/m/citpo


I don't mind these Failed Ajax errors, but I wish there was a way that the slideshow would recover from the stop, and resume without user input.

I tell my grandma to press the OK, and then the arrow keys to try to keep it going.

It doesn't work most of the time, so we have to start at the beginning again.

If it can eventually resolve itself without intervention, even if it has to skip several pictures, or takes a while, that would be helpful (has some mild arthritis).


"Failed Ajax" error occurs more frequently in Chrome?

A "Failed Ajax" error seems to occur more frequently in Chrome as opposed to Firefox.

This is the same case for both my computer, and my grandma's computer, where the errors will also mainly occur in Chrome.


For my computer:

I’m currently using Firefox, and that has all my extensions and stuff.

My Chrome only has a couple extensions, and disabling them didn’t affect the problem.

What little there is left is synced to my Google account, so I was easily able to test and recover from a fresh reinstallation.

Reinstalling Chrome (Revouninstaller, CCleaner, Voidtools Everything Search desktop search program for traces) didn’t help.

For my grandma’s computer:

My grandma’s Chrome browser almost nothing on it, and also disabling what was there did not change anything.

Her computer never had Firefox before, but I installed it recently, and tried the slideshow presentation there for a bit.

I don’t think there was an Ajax error, and if there was, it didn’t appear as fast as in Chrome.


The downside for me with Firefox is that it will crash when you leave the slideshow on long enough.

I think that it takes longer for that to happen in Chrome, and that’s when you get that purple screen with the, “Either Chrome ran out of memory or the process for the webpage was terminated for some other reason.”.

I don’t use the program often, and when I do, it's not for a long amount of time, so I don’t really notice these failed Ajax errors.

My grandma doesn’t complain when there’s an issue, so I don’t know the extent of these errors, and if it has always been this way.

Thanks.

Wrap to beginning while loading new images

When you get to the last loaded image, if you try to go to the next image too quickly (before the next batch of images has had time to load), you get sent back to the first image. I am able to reproduce this fairly consistently by setting the auto-next interval to 0.1s

A minor associated bug is that the number for the last image viewed remains blue after wrapping back to the beginning this way.

Show source subreddit

This probably isn't a popular request, but I wouldn't mind be able show/toggle the source subreddit if the using multiple subreddits, ie;

redditp/r/funny+gifs+pics

show souce when from /r/funny

Bug: Bad request when query string + nsfw subreddit

Non-webserver root install

The index.html is full of absolute references to redditp. Those only work if in the root of the webserver. For example:

    <link rel="stylesheet" type="text/css" href="/css/style.css" />
    <script type="text/javascript" src="/js/script.js"></script>

Please can you change them to relative links (omitting the leading / in the src seems to work for me), or document how to do so, or document why it won't work.

support old.reddit.com

on www.reddit.com I can just add a single p after reddit and get redirected to redditp.com.
but, with old.reddit.com I have to add a p and then remove old. to go to redditp.com
one is convenient, other is hassle.

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.