├── .eslintrc.js ├── .gitignore ├── .htaccess ├── .vscode ├── launch.json └── settings.json ├── 404.html ├── CNAME ├── LICENSE ├── README.md ├── _redirects ├── css └── style.css ├── dmca.html ├── docker-compose.yml ├── httpd.conf ├── images ├── 1437338478_screen-full.svg ├── favicon.png ├── fullscreen.png └── play.svg ├── index.html ├── js ├── EmbedIt.js ├── fix-tagsyo-link.js ├── ie_hacks.js ├── jquery.touchwipe.js ├── js.cookie.js └── script.js ├── nodejs ├── .eslintrc.js ├── app.js └── test-embedit.js ├── package-lock.json ├── package.json ├── redditp-redirect └── docker-compose.yml ├── server.js ├── start.cmd ├── test-data ├── reddit-image-v2.json └── reddit.com.json └── vercel.json /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "env": { 3 | "browser": true 4 | }, 5 | "globals": { 6 | "$": false, 7 | "toastr": false, 8 | "Cookies": false, 9 | "embedit": false, 10 | }, 11 | "extends": "eslint:recommended", 12 | "rules": { 13 | "accessor-pairs": "error", 14 | "array-bracket-newline": "error", 15 | "array-bracket-spacing": [ 16 | "error", 17 | "never" 18 | ], 19 | "array-callback-return": "error", 20 | "array-element-newline": "off", 21 | "arrow-body-style": "error", 22 | "arrow-parens": "error", 23 | "arrow-spacing": "error", 24 | "block-scoped-var": "off", 25 | "block-spacing": [ 26 | "error", 27 | "never" 28 | ], 29 | "brace-style": "off", 30 | "callback-return": "error", 31 | "camelcase": "off", 32 | "capitalized-comments": "off", 33 | "class-methods-use-this": "error", 34 | "comma-dangle": "off", 35 | "comma-spacing": "off", 36 | "comma-style": [ 37 | "error", 38 | "last" 39 | ], 40 | "complexity": "error", 41 | "computed-property-spacing": [ 42 | "error", 43 | "never" 44 | ], 45 | "consistent-return": "off", 46 | "consistent-this": "error", 47 | "curly": "off", 48 | "default-case": "off", 49 | "dot-location": [ 50 | "error", 51 | "property" 52 | ], 53 | "dot-notation": "off", 54 | "eol-last": "error", 55 | "eqeqeq": "off", 56 | "for-direction": "error", 57 | "func-call-spacing": "error", 58 | "func-name-matching": "error", 59 | "func-names": [ 60 | "error", 61 | "never" 62 | ], 63 | "func-style": "off", 64 | "function-paren-newline": "off", 65 | "generator-star-spacing": "error", 66 | "getter-return": "error", 67 | "global-require": "error", 68 | "guard-for-in": "error", 69 | "handle-callback-err": "error", 70 | "id-blacklist": "error", 71 | "id-length": "off", 72 | "id-match": "error", 73 | "implicit-arrow-linebreak": "error", 74 | "indent": "off", 75 | "indent-legacy": "off", 76 | "init-declarations": "off", 77 | "jsx-quotes": "error", 78 | "key-spacing": "off", 79 | "keyword-spacing": "off", 80 | "line-comment-position": "off", 81 | "linebreak-style": [ 82 | "error", 83 | "unix" 84 | ], 85 | "lines-around-comment": "off", 86 | "lines-around-directive": "error", 87 | "lines-between-class-members": "error", 88 | "max-depth": "error", 89 | "max-len": "off", 90 | "max-lines": "off", 91 | "max-nested-callbacks": "error", 92 | "max-params": "error", 93 | "max-statements": "off", 94 | "max-statements-per-line": "error", 95 | "multiline-comment-style": "off", 96 | "new-cap": "error", 97 | "new-parens": "error", 98 | "newline-after-var": "off", 99 | "newline-before-return": "off", 100 | "newline-per-chained-call": "off", 101 | "no-alert": "error", 102 | "no-array-constructor": "error", 103 | "no-await-in-loop": "error", 104 | "no-bitwise": "error", 105 | "no-buffer-constructor": "error", 106 | "no-caller": "error", 107 | "no-catch-shadow": "error", 108 | "no-confusing-arrow": "error", 109 | "no-console": "off", 110 | "no-continue": "off", 111 | "no-div-regex": "error", 112 | "no-duplicate-imports": "error", 113 | "no-else-return": "off", 114 | "no-empty-function": "error", 115 | "no-eq-null": "off", 116 | "no-eval": "error", 117 | "no-extend-native": "error", 118 | "no-extra-bind": "error", 119 | "no-extra-label": "error", 120 | "no-extra-parens": "off", 121 | "no-floating-decimal": "error", 122 | "no-implicit-globals": "off", 123 | "no-implied-eval": "error", 124 | "no-inline-comments": "off", 125 | "no-inner-declarations": [ 126 | "error", 127 | "functions" 128 | ], 129 | "no-invalid-this": "error", 130 | "no-iterator": "error", 131 | "no-label-var": "error", 132 | "no-labels": "error", 133 | "no-lone-blocks": "error", 134 | "no-lonely-if": "off", 135 | "no-loop-func": "error", 136 | "no-magic-numbers": "off", 137 | "no-mixed-operators": [ 138 | "error", 139 | { 140 | "allowSamePrecedence": true 141 | } 142 | ], 143 | "no-mixed-requires": "error", 144 | "no-multi-assign": "error", 145 | "no-multi-spaces": "off", 146 | "no-multi-str": "error", 147 | "no-multiple-empty-lines": "off", 148 | "no-native-reassign": "error", 149 | "no-negated-condition": "off", 150 | "no-negated-in-lhs": "error", 151 | "no-nested-ternary": "error", 152 | "no-new": "error", 153 | "no-new-func": "error", 154 | "no-new-object": "error", 155 | "no-new-require": "error", 156 | "no-new-wrappers": "error", 157 | "no-octal-escape": "error", 158 | "no-param-reassign": "off", 159 | "no-path-concat": "error", 160 | "no-plusplus": [ 161 | "error", 162 | { 163 | "allowForLoopAfterthoughts": true 164 | } 165 | ], 166 | "no-process-env": "error", 167 | "no-process-exit": "error", 168 | "no-proto": "error", 169 | "no-prototype-builtins": "error", 170 | "no-restricted-globals": "error", 171 | "no-restricted-imports": "error", 172 | "no-restricted-modules": "error", 173 | "no-restricted-properties": "error", 174 | "no-restricted-syntax": "error", 175 | "no-return-assign": "error", 176 | "no-return-await": "error", 177 | "no-script-url": "error", 178 | "no-self-compare": "error", 179 | "no-sequences": "error", 180 | "no-shadow": "error", 181 | "no-shadow-restricted-names": "error", 182 | "no-spaced-func": "error", 183 | "no-sync": "error", 184 | "no-tabs": "error", 185 | "no-template-curly-in-string": "error", 186 | "no-ternary": "off", 187 | "no-throw-literal": "error", 188 | "no-trailing-spaces": "off", 189 | "no-undef-init": "error", 190 | "no-undefined": "off", 191 | "no-underscore-dangle": "error", 192 | "no-unmodified-loop-condition": "error", 193 | "no-unneeded-ternary": "error", 194 | "no-unused-expressions": "error", 195 | "no-use-before-define": "off", 196 | "no-useless-call": "error", 197 | "no-useless-computed-key": "error", 198 | "no-useless-concat": "off", 199 | "no-useless-constructor": "error", 200 | "no-useless-rename": "error", 201 | "no-useless-return": "error", 202 | "no-var": "off", 203 | "no-void": "error", 204 | "no-warning-comments": "off", 205 | "no-whitespace-before-property": "error", 206 | "no-with": "error", 207 | "object-curly-newline": "off", 208 | "object-curly-spacing": "off", 209 | "object-property-newline": "error", 210 | "object-shorthand": "off", 211 | "one-var": "off", 212 | "one-var-declaration-per-line": "error", 213 | "operator-assignment": [ 214 | "error", 215 | "always" 216 | ], 217 | "operator-linebreak": "error", 218 | "padded-blocks": "off", 219 | "padding-line-between-statements": "error", 220 | "prefer-arrow-callback": "off", 221 | "prefer-const": "error", 222 | "prefer-destructuring": "off", 223 | "prefer-numeric-literals": "error", 224 | "prefer-promise-reject-errors": "error", 225 | "prefer-reflect": "off", 226 | "prefer-rest-params": "off", 227 | "prefer-spread": "error", 228 | "prefer-template": "off", 229 | "quote-props": "off", 230 | "quotes": "off", 231 | "radix": "error", 232 | "require-await": "error", 233 | "require-jsdoc": "off", 234 | "rest-spread-spacing": "error", 235 | "semi": "off", 236 | "semi-spacing": [ 237 | "error", 238 | { 239 | "after": true, 240 | "before": false 241 | } 242 | ], 243 | "semi-style": [ 244 | "error", 245 | "last" 246 | ], 247 | "sort-imports": "error", 248 | "sort-keys": "off", 249 | "sort-vars": "error", 250 | "space-before-blocks": "off", 251 | "space-before-function-paren": "off", 252 | "space-in-parens": "off", 253 | "space-infix-ops": "error", 254 | "space-unary-ops": "error", 255 | "spaced-comment": "off", 256 | "strict": [ 257 | "error", 258 | "never" 259 | ], 260 | "switch-colon-spacing": "error", 261 | "symbol-description": "error", 262 | "template-curly-spacing": "error", 263 | "template-tag-spacing": "error", 264 | "unicode-bom": [ 265 | "error", 266 | "never" 267 | ], 268 | "valid-jsdoc": "error", 269 | "vars-on-top": "off", 270 | "wrap-iife": "error", 271 | "wrap-regex": "error", 272 | "yield-star-spacing": "error" 273 | } 274 | }; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by http://www.gitignore.io 2 | 3 | ### Windows ### 4 | # Windows image file caches 5 | Thumbs.db 6 | ehthumbs.db 7 | 8 | # Folder config file 9 | Desktop.ini 10 | 11 | # Recycle Bin used on file shares 12 | $RECYCLE.BIN/ 13 | 14 | # Windows Installer files 15 | *.cab 16 | *.msi 17 | *.msm 18 | *.msp 19 | 20 | 21 | ### Node ### 22 | # Logs 23 | logs 24 | *.log 25 | 26 | # Runtime data 27 | pids 28 | *.pid 29 | *.seed 30 | 31 | # Directory for instrumented libs generated by jscoverage/JSCover 32 | lib-cov 33 | 34 | # Coverage directory used by tools like istanbul 35 | coverage 36 | 37 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 38 | .grunt 39 | 40 | # Compiled binary addons (http://nodejs.org/api/addons.html) 41 | build/Release 42 | 43 | # Dependency directory 44 | # Deployed apps should consider commenting this line out: 45 | # see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git 46 | node_modules 47 | /.DS_Store 48 | /.idea 49 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | #Action php54-cgi /php54.cgi 2 | #AddHandler php54-cgi .php 3 | 4 | # Updates here should coincide with rp.getRestOfUrl() 5 | RewriteEngine On 6 | 7 | RewriteBase / 8 | RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] 9 | RewriteRule ^(.*)$ http://%1/$1 [R=301,L] 10 | 11 | RewriteRule ^r/(.*) /index.html 12 | RewriteRule ^u(ser)?/(.*) /index.html 13 | RewriteRule ^domain/(.*) /index.html 14 | RewriteRule ^search(.*) /index.html 15 | 16 | # to hide .git, allow redditp.com/.compact, and letsencrypt looks at `.well-known` 17 | RewriteRule ^\.([^w].*) /index.html 18 | 19 | # new multireddits with /me/ 20 | RewriteRule ^me/(.*) /index.html 21 | 22 | ErrorDocument 404 /404.html 23 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible Node.js debug attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch via NPM", 11 | "runtimeExecutable": "npm", 12 | "windows": { 13 | "runtimeExecutable": "npm.cmd" 14 | }, 15 | "runtimeArgs": [ 16 | "run", 17 | "debug" 18 | ], 19 | "port": 9229 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "eslint.enable": true 3 | } -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | RedditP 404 6 | 10 | 11 | 12 | 29 | 30 | 31 |

Sorry, couldn't find that page (404)...

32 |

Maybe try these presentations instead:

33 | 59 | 60 |

61 | You could also 62 | find the bug or email 63 | the author. 64 |

65 | 66 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | redditp.com -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # redditp 2 | 3 | A full screen reddit presentation or slide show. 4 | 5 | http://redditp.com 6 | 7 | ## Hotkeys 8 | 9 | - a - toggles auto-next (play/pause) 10 | - t - collapse/uncollapse title 11 | - c - collapse/uncollapse controls 12 | - i - open image in a new tab 13 | - r - open comments in a new tab 14 | - u - open user slideshow in new tab 15 | - f - toggle full screen mode 16 | - m - toggle sound 17 | - g - skip gallery 18 | - Arrow keys, pgup/pgdown, spacebar change slides 19 | - Swipe gestures on phones 20 | 21 | ## Features 22 | 23 | - All /r/ subreddits, including different ?sort stuff. 24 | - /user/ , /domain/ , /me/ url's work. 25 | - Url's ending with ['.jpg', '.jpeg', '.gif', '.bmp', '.png'] 26 | - You can save the html file locally and use it, just make sure you add a 27 | separator e.g. the question mark in file:///c/myredditp.html?/r/gifs so the 28 | browser knows to pick up the right file and go to the right subreddit. 29 | - Support for /r/random and /r/randnsfw virtual subreddits. These'll be tricky 30 | unless I cheat as they contain redirects. 31 | 32 | Possible future features, depending on feedback: 33 | 34 | - Zoom/Pan for comics 35 | - Imgur albums support 36 | - Offline access support, though I don't know if this is even possible actually 37 | (caching external image resources). 38 | - Login and upvoting support 39 | 40 | ## Host your own redditp 41 | 42 | Redditp relies on the `/r/subreddit` in the URL to fetch the JSON from the 43 | corresponding reddit endpoint. There are a few ways you can set up support for 44 | these URLs yourself: 45 | 46 | - You can use an Apache server with the `.htaccess` file. 47 | - Netlify removed redditp without warning. So now we're moving the hosting to 48 | Vercel, Cloudflare, or GitHub pages. Not sure. See vc.redditp.com for Vercel 49 | - Use NodeJS (see `package.json`). 50 | - Use a simple HTTP server and put the subreddit URL in the get parameters like 51 | `http://localhost?/r/subreddit`. 52 | - Use GitHub pages by copying `index.html` into `404.html` which will make all 53 | unknown URLs reach the same `index.html`. This currently only works with a 54 | custom domain because of where the `.js` and `.css` files are located. 55 | 56 | ## Credits 57 | 58 | - Ubershmekel http://yuvalg.com/ 59 | - [js-cookie](https://github.com/js-cookie/js-cookie) for managing cookies 60 | - Favicon by Double-J designs 61 | http://www.iconfinder.com/icondetails/68600/64/_icon 62 | - Slideshow based on http://demo.marcofolio.net/fullscreen_image_slider/ 63 | - Author of slideshow base: Marco Kuiper (http://www.marcofolio.net/) 64 | - And many more that have contributed to this project through feedback and pull 65 | requests https://github.com/ubershmekel/redditp/graphs/contributors 66 | -------------------------------------------------------------------------------- /_redirects: -------------------------------------------------------------------------------- 1 | # DOES THIS FILE EVEN WORK AT ALL? 2 | # vercel.json seems to be the only one that counts. 3 | # source dest httpcode 4 | /r/* / 200 5 | /u/* / 200 6 | /user/* / 200 7 | /domain/* / 200 8 | /search/* / 200 9 | /search / 200 10 | 11 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | /* BASIC RESET */ 2 | ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,body,html,p,blockquote,fieldset,input{margin:0; padding:0;} 3 | 4 | /* HTML ELEMENTS */ 5 | body { overflow:hidden; background-color: #000; color:#fff;} 6 | 7 | /* PICTURES */ 8 | #pictureSlider { 9 | position: absolute; 10 | left: 0; 11 | top: 0; 12 | width: 100%; 13 | height: 100%; 14 | z-index:-999; 15 | } 16 | 17 | #pictureSlider div { height:100%; width:100%; position:absolute; z-index:-999; } 18 | 19 | /* NAVIGATION BOX */ 20 | #navigationBoxes {float: left;} 21 | a { text-decoration:none; color:#eee; font-weight: bold; } 22 | a:hover { 23 | opacity: 1.0; 24 | border-bottom:1px dotted; 25 | } 26 | .navbox { width:450px; max-height: 40%; overflow: auto; position:relative; left: 0px; opacity: 0.9; background-color: rgba(0,0,0,0.7);z-index:2;} 27 | /* 108px so the next row is half-visible */ 28 | .numberButtonList { overflow: auto; max-height: 108px; } 29 | .navbox ul { list-style-type:none; display:block; margin:0px; right:10px; top:10px; text-align: left;} 30 | .navbox ul li { display: inline-block; list-style-type: none; } 31 | .numberButton { 32 | float: left; 33 | 34 | min-width: 15px; 35 | margin-left: 5px; 36 | text-decoration: none; 37 | color: #eee; 38 | 39 | font: bold 12px Helvetica, Arial, Sans-serif; 40 | text-align: center; 41 | line-height: 18px; 42 | padding: 3px 5px; 43 | } 44 | .over18 { 45 | color: #f99; 46 | } 47 | .galleryCount { 48 | color: rgb(158, 217, 8); 49 | } 50 | .navbox ul li a { 51 | cursor:pointer; 52 | 53 | } 54 | .numberButtonList ul li a:hover { background:#888; border: 0; } 55 | .numberButtonList ul li a.active { 56 | color: #00AAAA; 57 | -moz-box-shadow: 2px 2px 3px #eee; 58 | /* For IE 8 */ 59 | -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#EEEEEE')"; 60 | /* For IE 5.5 - 7 */ 61 | filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#EEEEEE'); 62 | } 63 | 64 | #controlsDiv {position: absolute; bottom: 64px; left: 0;right: 0;} 65 | #titleDiv {position: absolute; top: 0;left: 0;right: 0;} 66 | .navbox h2 { padding: 10px 20px 10px 10px; font: bold 20px Helvetica, Arial, Sans-serif; } 67 | .navbox h3 { padding: 0px 20px 10px 10px; font: bold 12px Helvetica, Arial, Sans-serif; } 68 | .navbox p { padding:20px 20px 20px 20px; font-family: "Segoe UI","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Arial,Tahoma,Verdana,sans-serif; font-size:13px; color:#111; } 69 | .navbox p.bottom { position:absolute; bottom:5px; right:5px; } 70 | 71 | .nbmenu { 72 | margin: 0 0 0 5px; 73 | width: 100%; 74 | font-family: "Segoe UI","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Arial,Tahoma,Verdana,sans-serif; 75 | font-size:14px; 76 | 77 | } 78 | 79 | .nbmenu li { 80 | text-align: left; 81 | padding: 6px; 82 | max-width: 300px; 83 | overflow: hidden; 84 | } 85 | 86 | #navboxContents { 87 | padding: 10px 25px 10px 0; 88 | margin:0; 89 | } 90 | 91 | label.checkbox { font-weight: bold; } 92 | 93 | .cam { background-image:url("../images/bg_cam_txt.png"); } 94 | .clouds { } 95 | .key { background-image:url("../images/bg_key_txt.png"); } 96 | .flowers { background-image:url("../images/bg_flowers_txt.png"); } 97 | 98 | .collapser { border: solid 1px #555; font-size: 20px; color: #bbb; padding: 0 10px; float:right; cursor: hand; cursor: pointer;} 99 | .checkbox { cursor: hand; cursor: pointer; } 100 | 101 | .prevArrow { 102 | position: absolute; 103 | top: 50%; 104 | left: 10px; 105 | width: 0; 106 | height: 0; 107 | 108 | border-top: 25px solid transparent; 109 | border-bottom: 25px solid transparent; 110 | border-right: 50px solid white; 111 | z-index:2; 112 | opacity: 0.8; 113 | 114 | cursor: hand; cursor: pointer; 115 | } 116 | 117 | .nextArrow { 118 | position: absolute; 119 | top: 50%; 120 | right: 10px; 121 | width: 0; 122 | height: 0; 123 | 124 | border-top: 25px solid transparent; 125 | border-bottom: 25px solid transparent; 126 | border-left: 50px solid white; 127 | z-index:2; 128 | opacity: 0.8; 129 | cursor: hand; cursor: pointer; 130 | } 131 | 132 | #fullScreenButton { 133 | width: 20px; 134 | padding-left: 10px; 135 | cursor:pointer; 136 | } 137 | 138 | #playButton { 139 | position: absolute; 140 | left: 0; 141 | top: 0; 142 | width: 100%; 143 | height: 100%; 144 | cursor: pointer; 145 | z-index: 2 146 | } 147 | -------------------------------------------------------------------------------- /dmca.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | RedditP DMCA 6 | 10 | 11 | 12 | 29 | 30 | 31 |

Sorry, couldn't find that page probably because of a DMCA takedown.

32 |

33 | Here's a link to the reddit page if that 34 | works. 35 |

36 |

Try these presentations instead:

37 | 63 | 64 |

65 | You could also 66 | find the bug or email 67 | the author. 68 |

69 | 70 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | redditp: 4 | image: httpd:2.2.32 5 | labels: 6 | - "traefik.enable=true" 7 | - "traefik.docker.network=reverseproxy_default" 8 | - "traefik.backend=redditp" 9 | - "traefik.frontend.rule=Host:redditp.com" 10 | networks: 11 | - "reverseproxy_default" 12 | restart: always 13 | volumes: 14 | - .:/usr/local/apache2/htdocs/:ro 15 | - ./httpd.conf:/usr/local/apache2/conf/httpd.conf:ro 16 | logging: 17 | options: 18 | max-size: "50m" 19 | 20 | networks: 21 | reverseproxy_default: 22 | external: 23 | name: reverseproxy_default 24 | -------------------------------------------------------------------------------- /httpd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This is the main Apache HTTP server configuration file. It contains the 3 | # configuration directives that give the server its instructions. 4 | # See for detailed information. 5 | # In particular, see 6 | # 7 | # for a discussion of each configuration directive. 8 | # 9 | # Do NOT simply read the instructions in here without understanding 10 | # what they do. They're here only as hints or reminders. If you are unsure 11 | # consult the online docs. You have been warned. 12 | # 13 | # Configuration and logfile names: If the filenames you specify for many 14 | # of the server's control files begin with "/" (or "drive:/" for Win32), the 15 | # server will use that explicit path. If the filenames do *not* begin 16 | # with "/", the value of ServerRoot is prepended -- so 'log/access_log' 17 | # with ServerRoot set to '/www' will be interpreted by the 18 | # server as '/www/log/access_log', where as '/log/access_log' will be 19 | # interpreted as '/log/access_log'. 20 | 21 | # 22 | # ServerRoot: The top of the directory tree under which the server's 23 | # configuration, error, and log files are kept. 24 | # 25 | # Do not add a slash at the end of the directory path. If you point 26 | # ServerRoot at a non-local disk, be sure to point the LockFile directive 27 | # at a local disk. If you wish to share the same ServerRoot for multiple 28 | # httpd daemons, you will need to change at least LockFile and PidFile. 29 | # 30 | ServerRoot "/usr/local/apache2" 31 | 32 | # 33 | # Listen: Allows you to bind Apache to specific IP addresses and/or 34 | # ports, instead of the default. See also the 35 | # directive. 36 | # 37 | # Change this to Listen on specific IP addresses as shown below to 38 | # prevent Apache from glomming onto all bound IP addresses. 39 | # 40 | #Listen 12.34.56.78:80 41 | Listen 80 42 | 43 | # 44 | # Dynamic Shared Object (DSO) Support 45 | # 46 | # To be able to use the functionality of a module which was built as a DSO you 47 | # have to place corresponding `LoadModule' lines at this location so the 48 | # directives contained in it are actually available _before_ they are used. 49 | # Statically compiled modules (those listed by `httpd -l') do not need 50 | # to be loaded here. 51 | # 52 | # Example: 53 | # LoadModule foo_module modules/mod_foo.so 54 | # 55 | LoadModule authn_file_module modules/mod_authn_file.so 56 | LoadModule authn_dbm_module modules/mod_authn_dbm.so 57 | LoadModule authn_anon_module modules/mod_authn_anon.so 58 | LoadModule authn_dbd_module modules/mod_authn_dbd.so 59 | LoadModule authn_default_module modules/mod_authn_default.so 60 | LoadModule authn_alias_module modules/mod_authn_alias.so 61 | LoadModule authz_host_module modules/mod_authz_host.so 62 | LoadModule authz_groupfile_module modules/mod_authz_groupfile.so 63 | LoadModule authz_user_module modules/mod_authz_user.so 64 | LoadModule authz_dbm_module modules/mod_authz_dbm.so 65 | LoadModule authz_owner_module modules/mod_authz_owner.so 66 | LoadModule authnz_ldap_module modules/mod_authnz_ldap.so 67 | LoadModule authz_default_module modules/mod_authz_default.so 68 | LoadModule auth_basic_module modules/mod_auth_basic.so 69 | LoadModule auth_digest_module modules/mod_auth_digest.so 70 | LoadModule file_cache_module modules/mod_file_cache.so 71 | LoadModule cache_module modules/mod_cache.so 72 | LoadModule disk_cache_module modules/mod_disk_cache.so 73 | LoadModule mem_cache_module modules/mod_mem_cache.so 74 | LoadModule dbd_module modules/mod_dbd.so 75 | LoadModule dumpio_module modules/mod_dumpio.so 76 | LoadModule reqtimeout_module modules/mod_reqtimeout.so 77 | LoadModule ext_filter_module modules/mod_ext_filter.so 78 | LoadModule include_module modules/mod_include.so 79 | LoadModule filter_module modules/mod_filter.so 80 | LoadModule substitute_module modules/mod_substitute.so 81 | LoadModule charset_lite_module modules/mod_charset_lite.so 82 | LoadModule deflate_module modules/mod_deflate.so 83 | LoadModule ldap_module modules/mod_ldap.so 84 | LoadModule log_config_module modules/mod_log_config.so 85 | LoadModule log_forensic_module modules/mod_log_forensic.so 86 | LoadModule logio_module modules/mod_logio.so 87 | LoadModule env_module modules/mod_env.so 88 | LoadModule mime_magic_module modules/mod_mime_magic.so 89 | LoadModule cern_meta_module modules/mod_cern_meta.so 90 | LoadModule expires_module modules/mod_expires.so 91 | LoadModule headers_module modules/mod_headers.so 92 | LoadModule ident_module modules/mod_ident.so 93 | LoadModule usertrack_module modules/mod_usertrack.so 94 | LoadModule unique_id_module modules/mod_unique_id.so 95 | LoadModule setenvif_module modules/mod_setenvif.so 96 | LoadModule version_module modules/mod_version.so 97 | LoadModule proxy_module modules/mod_proxy.so 98 | LoadModule proxy_connect_module modules/mod_proxy_connect.so 99 | LoadModule proxy_ftp_module modules/mod_proxy_ftp.so 100 | LoadModule proxy_http_module modules/mod_proxy_http.so 101 | LoadModule proxy_scgi_module modules/mod_proxy_scgi.so 102 | LoadModule proxy_ajp_module modules/mod_proxy_ajp.so 103 | LoadModule proxy_balancer_module modules/mod_proxy_balancer.so 104 | LoadModule ssl_module modules/mod_ssl.so 105 | LoadModule mime_module modules/mod_mime.so 106 | LoadModule dav_module modules/mod_dav.so 107 | LoadModule status_module modules/mod_status.so 108 | LoadModule autoindex_module modules/mod_autoindex.so 109 | LoadModule asis_module modules/mod_asis.so 110 | LoadModule info_module modules/mod_info.so 111 | LoadModule cgi_module modules/mod_cgi.so 112 | LoadModule dav_fs_module modules/mod_dav_fs.so 113 | LoadModule dav_lock_module modules/mod_dav_lock.so 114 | LoadModule vhost_alias_module modules/mod_vhost_alias.so 115 | LoadModule negotiation_module modules/mod_negotiation.so 116 | LoadModule dir_module modules/mod_dir.so 117 | LoadModule imagemap_module modules/mod_imagemap.so 118 | LoadModule actions_module modules/mod_actions.so 119 | LoadModule speling_module modules/mod_speling.so 120 | LoadModule userdir_module modules/mod_userdir.so 121 | LoadModule alias_module modules/mod_alias.so 122 | LoadModule rewrite_module modules/mod_rewrite.so 123 | 124 | 125 | 126 | # 127 | # If you wish httpd to run as a different user or group, you must run 128 | # httpd as root initially and it will switch. 129 | # 130 | # User/Group: The name (or #number) of the user/group to run httpd as. 131 | # It is usually good practice to create a dedicated user and group for 132 | # running httpd, as with most system services. 133 | # 134 | User daemon 135 | Group daemon 136 | 137 | 138 | 139 | 140 | # 'Main' server configuration 141 | # 142 | # The directives in this section set up the values used by the 'main' 143 | # server, which responds to any requests that aren't handled by a 144 | # definition. These values also provide defaults for 145 | # any containers you may define later in the file. 146 | # 147 | # All of these directives may appear inside containers, 148 | # in which case these default settings will be overridden for the 149 | # virtual host being defined. 150 | # 151 | 152 | # 153 | # ServerAdmin: Your address, where problems with the server should be 154 | # e-mailed. This address appears on some server-generated pages, such 155 | # as error documents. e.g. admin@your-domain.com 156 | # 157 | ServerAdmin you@example.com 158 | 159 | # 160 | # ServerName gives the name and port that the server uses to identify itself. 161 | # This can often be determined automatically, but we recommend you specify 162 | # it explicitly to prevent problems during startup. 163 | # 164 | # If your host doesn't have a registered DNS name, enter its IP address here. 165 | # 166 | #ServerName www.example.com:80 167 | 168 | # 169 | # DocumentRoot: The directory out of which you will serve your 170 | # documents. By default, all requests are taken from this directory, but 171 | # symbolic links and aliases may be used to point to other locations. 172 | # 173 | DocumentRoot "/usr/local/apache2/htdocs" 174 | 175 | # 176 | # Each directory to which Apache has access can be configured with respect 177 | # to which services and features are allowed and/or disabled in that 178 | # directory (and its subdirectories). 179 | # 180 | # First, we configure the "default" to be a very restrictive set of 181 | # features. 182 | # 183 | 184 | Options FollowSymLinks 185 | AllowOverride None 186 | Order deny,allow 187 | Deny from all 188 | 189 | 190 | # 191 | # Note that from this point forward you must specifically allow 192 | # particular features to be enabled - so if something's not working as 193 | # you might expect, make sure that you have specifically enabled it 194 | # below. 195 | # 196 | 197 | # 198 | # This should be changed to whatever you set DocumentRoot to. 199 | # 200 | 201 | # 202 | # Possible values for the Options directive are "None", "All", 203 | # or any combination of: 204 | # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 205 | # 206 | # Note that "MultiViews" must be named *explicitly* --- "Options All" 207 | # doesn't give it to you. 208 | # 209 | # The Options directive is both complicated and important. Please see 210 | # http://httpd.apache.org/docs/2.2/mod/core.html#options 211 | # for more information. 212 | # 213 | Options Indexes FollowSymLinks 214 | 215 | # 216 | # AllowOverride controls what directives may be placed in .htaccess files. 217 | # It can be "All", "None", or any combination of the keywords: 218 | # Options FileInfo AuthConfig Limit 219 | # 220 | AllowOverride All 221 | 222 | # 223 | # Controls who can get stuff from this server. 224 | # 225 | Order allow,deny 226 | Allow from all 227 | 228 | 229 | 230 | # 231 | # DirectoryIndex: sets the file that Apache will serve if a directory 232 | # is requested. 233 | # 234 | 235 | DirectoryIndex index.html 236 | 237 | 238 | # 239 | # The following lines prevent .htaccess and .htpasswd files from being 240 | # viewed by Web clients. 241 | # 242 | 243 | Order allow,deny 244 | Deny from all 245 | Satisfy All 246 | 247 | 248 | # 249 | # ErrorLog: The location of the error log file. 250 | # If you do not specify an ErrorLog directive within a 251 | # container, error messages relating to that virtual host will be 252 | # logged here. If you *do* define an error logfile for a 253 | # container, that host's errors will be logged there and not here. 254 | # 255 | ErrorLog /proc/self/fd/2 256 | 257 | # 258 | # LogLevel: Control the number of messages logged to the error_log. 259 | # Possible values include: debug, info, notice, warn, error, crit, 260 | # alert, emerg. 261 | # 262 | LogLevel warn 263 | 264 | 265 | # 266 | # The following directives define some format nicknames for use with 267 | # a CustomLog directive (see below). 268 | # 269 | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 270 | LogFormat "%h %l %u %t \"%r\" %>s %b" common 271 | 272 | 273 | # You need to enable mod_logio.c to use %I and %O 274 | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio 275 | 276 | 277 | # 278 | # The location and format of the access logfile (Common Logfile Format). 279 | # If you do not define any access logfiles within a 280 | # container, they will be logged here. Contrariwise, if you *do* 281 | # define per- access logfiles, transactions will be 282 | # logged therein and *not* in this file. 283 | # 284 | CustomLog /proc/self/fd/1 common 285 | 286 | # 287 | # If you prefer a logfile with access, agent, and referer information 288 | # (Combined Logfile Format) you can use the following directive. 289 | # 290 | #CustomLog "logs/access_log" combined 291 | 292 | 293 | 294 | # 295 | # Redirect: Allows you to tell clients about documents that used to 296 | # exist in your server's namespace, but do not anymore. The client 297 | # will make a new request for the document at its new location. 298 | # Example: 299 | # Redirect permanent /foo http://www.example.com/bar 300 | 301 | # 302 | # Alias: Maps web paths into filesystem paths and is used to 303 | # access content that does not live under the DocumentRoot. 304 | # Example: 305 | # Alias /webpath /full/filesystem/path 306 | # 307 | # If you include a trailing / on /webpath then the server will 308 | # require it to be present in the URL. You will also likely 309 | # need to provide a section to allow access to 310 | # the filesystem path. 311 | 312 | # 313 | # ScriptAlias: This controls which directories contain server scripts. 314 | # ScriptAliases are essentially the same as Aliases, except that 315 | # documents in the target directory are treated as applications and 316 | # run by the server when requested rather than as documents sent to the 317 | # client. The same rules about trailing "/" apply to ScriptAlias 318 | # directives as to Alias. 319 | # 320 | ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/" 321 | 322 | 323 | 324 | 325 | # 326 | # ScriptSock: On threaded servers, designate the path to the UNIX 327 | # socket used to communicate with the CGI daemon of mod_cgid. 328 | # 329 | #Scriptsock logs/cgisock 330 | 331 | 332 | # 333 | # "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased 334 | # CGI directory exists, if you have that configured. 335 | # 336 | 337 | AllowOverride None 338 | Options None 339 | Order allow,deny 340 | Allow from all 341 | 342 | 343 | # 344 | # DefaultType: the default MIME type the server will use for a document 345 | # if it cannot otherwise determine one, such as from filename extensions. 346 | # If your server contains mostly text or HTML documents, "text/plain" is 347 | # a good value. If most of your content is binary, such as applications 348 | # or images, you may want to use "application/octet-stream" instead to 349 | # keep browsers from trying to display binary files as though they are 350 | # text. 351 | # 352 | DefaultType text/plain 353 | 354 | 355 | # 356 | # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied 357 | # backend servers which have lingering "httpoxy" defects. 358 | # 'Proxy' request header is undefined by the IETF, not listed by IANA 359 | # 360 | RequestHeader unset Proxy early 361 | 362 | 363 | 364 | # 365 | # TypesConfig points to the file containing the list of mappings from 366 | # filename extension to MIME-type. 367 | # 368 | TypesConfig conf/mime.types 369 | 370 | # 371 | # AddType allows you to add to or override the MIME configuration 372 | # file specified in TypesConfig for specific file types. 373 | # 374 | #AddType application/x-gzip .tgz 375 | # 376 | # AddEncoding allows you to have certain browsers uncompress 377 | # information on the fly. Note: Not all browsers support this. 378 | # 379 | #AddEncoding x-compress .Z 380 | #AddEncoding x-gzip .gz .tgz 381 | # 382 | # If the AddEncoding directives above are commented-out, then you 383 | # probably should define those extensions to indicate media types: 384 | # 385 | AddType application/x-compress .Z 386 | AddType application/x-gzip .gz .tgz 387 | 388 | # 389 | # AddHandler allows you to map certain file extensions to "handlers": 390 | # actions unrelated to filetype. These can be either built into the server 391 | # or added with the Action directive (see below) 392 | # 393 | # To use CGI scripts outside of ScriptAliased directories: 394 | # (You will also need to add "ExecCGI" to the "Options" directive.) 395 | # 396 | #AddHandler cgi-script .cgi 397 | 398 | # For type maps (negotiated resources): 399 | #AddHandler type-map var 400 | 401 | # 402 | # Filters allow you to process content before it is sent to the client. 403 | # 404 | # To parse .shtml files for server-side includes (SSI): 405 | # (You will also need to add "Includes" to the "Options" directive.) 406 | # 407 | #AddType text/html .shtml 408 | #AddOutputFilter INCLUDES .shtml 409 | 410 | 411 | # 412 | # The mod_mime_magic module allows the server to use various hints from the 413 | # contents of the file itself to determine its type. The MIMEMagicFile 414 | # directive tells the module where the hint definitions are located. 415 | # 416 | #MIMEMagicFile conf/magic 417 | 418 | # 419 | # Customizable error responses come in three flavors: 420 | # 1) plain text 2) local redirects 3) external redirects 421 | # 422 | # Some examples: 423 | #ErrorDocument 500 "The server made a boo boo." 424 | #ErrorDocument 404 /missing.html 425 | #ErrorDocument 404 "/cgi-bin/missing_handler.pl" 426 | #ErrorDocument 402 http://www.example.com/subscription_info.html 427 | # 428 | 429 | # 430 | # MaxRanges: Maximum number of Ranges in a request before 431 | # returning the entire resource, or one of the special 432 | # values 'default', 'none' or 'unlimited'. 433 | # Default setting is to accept 200 Ranges. 434 | #MaxRanges unlimited 435 | 436 | # 437 | # EnableMMAP and EnableSendfile: On systems that support it, 438 | # memory-mapping or the sendfile syscall is used to deliver 439 | # files. This usually improves server performance, but must 440 | # be turned off when serving from networked-mounted 441 | # filesystems or if support for these functions is otherwise 442 | # broken on your system. 443 | # 444 | #EnableMMAP off 445 | #EnableSendfile off 446 | 447 | # Supplemental configuration 448 | # 449 | # The configuration files in the conf/extra/ directory can be 450 | # included to add extra features or to modify the default configuration of 451 | # the server, or you may simply copy their contents here and change as 452 | # necessary. 453 | 454 | # Server-pool management (MPM specific) 455 | #Include conf/extra/httpd-mpm.conf 456 | 457 | # Multi-language error messages 458 | #Include conf/extra/httpd-multilang-errordoc.conf 459 | 460 | # Fancy directory listings 461 | #Include conf/extra/httpd-autoindex.conf 462 | 463 | # Language settings 464 | #Include conf/extra/httpd-languages.conf 465 | 466 | # User home directories 467 | #Include conf/extra/httpd-userdir.conf 468 | 469 | # Real-time info on requests and configuration 470 | #Include conf/extra/httpd-info.conf 471 | 472 | # Virtual hosts 473 | #Include conf/extra/httpd-vhosts.conf 474 | 475 | # Local access to the Apache HTTP Server Manual 476 | #Include conf/extra/httpd-manual.conf 477 | 478 | # Distributed authoring and versioning (WebDAV) 479 | #Include conf/extra/httpd-dav.conf 480 | 481 | # Various default settings 482 | #Include conf/extra/httpd-default.conf 483 | 484 | # Secure (SSL/TLS) connections 485 | #Include conf/extra/httpd-ssl.conf 486 | # 487 | # Note: The following must must be present to support 488 | # starting without SSL on platforms with no /dev/random equivalent 489 | # but a statically compiled-in mod_ssl. 490 | # 491 | 492 | SSLRandomSeed startup builtin 493 | SSLRandomSeed connect builtin 494 | 495 | -------------------------------------------------------------------------------- /images/1437338478_screen-full.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubershmekel/redditp/43f0c8b9e4e5f8e59ce5690fc8d70b012af22937/images/favicon.png -------------------------------------------------------------------------------- /images/fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubershmekel/redditp/43f0c8b9e4e5f8e59ce5690fc8d70b012af22937/images/fullscreen.png -------------------------------------------------------------------------------- /images/play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 23 | 27 | 31 | 32 | 43 | 54 | 55 | 77 | 79 | 80 | 82 | image/svg+xml 83 | 85 | 86 | 87 | 88 | 89 | 94 | 97 | 102 | Mobile browserswon't autoplaywithout a tap 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | redditP 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 31 | 32 | 33 | 36 | 69 | 70 | 73 | 76 | 92 | 113 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 |
125 |
126 | 127 | 197 | 209 | 210 | 245 | 246 | 247 |
248 | 249 |
250 | 251 |
252 |
253 | 254 | 255 | 256 | 257 | -------------------------------------------------------------------------------- /js/EmbedIt.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-global-assign,no-native-reassign 2 | embedit = {}; 3 | 4 | embedit.imageTypes = { 5 | image: "image", 6 | gfycat: "gfycat", 7 | gifv: "gifv", 8 | redgif: "redgif", 9 | }; 10 | 11 | embedit.redditBaseUrl = "http://old.reddit.com"; 12 | 13 | if (typeof window === "undefined") { 14 | // eslint-disable-next-line no-redeclare 15 | var window = {}; 16 | } 17 | 18 | if (window.location && window.location.protocol === "https:") { 19 | // page is secure 20 | embedit.redditBaseUrl = "https://old.reddit.com"; 21 | } 22 | 23 | embedit.video = function (webmUrl, mp4Url) { 24 | // imgur is annoying and when you use the tags 25 | // it tries to redirect you to the gifv page instead of serving 26 | // video. We can only circumvent that by putting the src 27 | // on the