├── .stylelintignore ├── lib ├── vendor │ ├── index.scss │ └── index.js ├── css │ ├── modules │ │ ├── _selectedEntry.scss │ │ ├── _redditUserInfo.scss │ │ ├── _userInfo.scss │ │ ├── _tableTools.scss │ │ ├── _temporaryDropdownLinks.scss │ │ ├── _troubleshooter.scss │ │ ├── _easterEgg.scss │ │ ├── _submitIssue.scss │ │ ├── _sourceSnudown.scss │ │ ├── _subredditInfo.scss │ │ ├── _version.scss │ │ ├── _noParticipation.scss │ │ ├── _wheelBrowse.scss │ │ ├── _showParent.scss │ │ ├── _saveComments.scss │ │ ├── _modhelper.scss │ │ ├── _newCommentCount.scss │ │ ├── _voteEnhancements.scss │ │ └── _commandLine.scss │ └── _zindex.scss ├── core │ ├── migrate │ │ └── index.js │ ├── modules │ │ ├── index.js │ │ └── storage.js │ ├── metadata │ │ └── index.js │ └── options │ │ └── index.js ├── environment │ ├── .eslintrc.json │ ├── foreground │ │ ├── privateBrowsing.js │ │ ├── loadScript.js │ │ ├── download.js │ │ ├── id.js │ │ ├── history.js │ │ ├── messaging.js │ │ ├── xhrCache.js │ │ ├── session.js │ │ └── pageAction.js │ ├── background │ │ ├── i18n.js │ │ ├── download.js │ │ ├── localePersistor.js │ │ ├── loadScript.js │ │ ├── history.js │ │ ├── tabs.js │ │ ├── ajax.js │ │ ├── messaging.js │ │ ├── session.js │ │ ├── xhrCache.js │ │ ├── storage.js │ │ └── permissions │ │ │ └── prompt.entry.js │ └── utils │ │ └── api.js ├── images │ ├── mail.png │ ├── bacon.png │ ├── icon60x30.png │ ├── mailgray.png │ ├── commentTools.png │ ├── colorblindMail.png │ ├── droparrowgray.gif │ ├── legacyFavicon.png │ ├── dashboardLoader.gif │ ├── hosts │ │ └── giphy-logo.png │ ├── moderatorShield.png │ ├── nightmode │ │ ├── arrows.png │ │ ├── aboutHeader.png │ │ └── snooBalloons.png │ ├── accountSwitcherSnoo.png │ ├── expandoEmpty.svg │ ├── expandoClose.svg │ ├── expandoClose-active.svg │ ├── expandoPadlock.svg │ ├── expandoVideo.svg │ ├── expandoVideo-active.svg │ ├── expandoPadlock-active.svg │ ├── expandoImage.svg │ ├── expandoImage-active.svg │ ├── expandoImageGallery.svg │ └── expandoImageGallery-active.svg ├── constants │ ├── jsapi.js │ ├── sessionStorage.js │ ├── localStorage.js │ └── urlHashes.js ├── fonts │ └── batch-icons-webfont.woff ├── utils │ ├── value.js │ ├── __tests__ │ │ ├── value.js │ │ ├── string.js │ │ ├── generator.js │ │ └── color.js │ ├── profiling.js │ ├── subreddits.js │ ├── color.js │ ├── html.js │ ├── time.js │ ├── hash.js │ ├── thingMetadata.js │ ├── object.js │ ├── flow.js │ └── generator.js ├── modules │ ├── backupAndRestore │ │ └── providers │ │ │ ├── index.js │ │ │ └── Provider.js │ ├── filteReddit │ │ ├── postCases │ │ │ ├── IsLocked.js │ │ │ ├── IsNSFW.js │ │ │ ├── IsSpoiler.js │ │ │ ├── PostTitle.js │ │ │ ├── Username.js │ │ │ ├── Subreddit.js │ │ │ ├── Domain.js │ │ │ ├── LinkFlair.js │ │ │ ├── UserFlair.js │ │ │ ├── CommentsOpened.js │ │ │ ├── IsVisited.js │ │ │ ├── UserTag.js │ │ │ └── PostAfter.js │ │ ├── commentCases │ │ │ ├── IsDeleted.js │ │ │ ├── IsRead.js │ │ │ └── CommentContent.js │ │ └── browseCases │ │ │ ├── CurrentLocation.js │ │ │ ├── Dow.js │ │ │ ├── CurrentSub.js │ │ │ ├── BrowsingFrontPage.js │ │ │ ├── CurrentUserProfile.js │ │ │ ├── index.js │ │ │ ├── Toggle.js │ │ │ ├── Date.js │ │ │ └── LoggedInAs.js │ ├── hosts │ │ ├── default.js │ │ ├── reddituploads.js │ │ ├── twimg.js │ │ ├── ppy.js │ │ ├── memedad.js │ │ ├── supgif.js │ │ ├── archiveis.js │ │ ├── livememe.js │ │ ├── ridewithgps.js │ │ ├── vlipsy.js │ │ ├── poly.js │ │ ├── imgflip.js │ │ ├── makeameme.js │ │ ├── snag.js │ │ ├── streamja.js │ │ ├── redditpoll.js │ │ ├── adultswim.js │ │ ├── streamwo.js │ │ ├── instagram.js │ │ ├── steampowered.js │ │ ├── xboxdvr.js │ │ ├── gamerdvr.js │ │ ├── memecrunch.js │ │ ├── vlive.js │ │ ├── hastebin.js │ │ ├── clyp.js │ │ ├── liveleak.js │ │ ├── strawpollcom.js │ │ ├── strawpollme.js │ │ ├── navertv.js │ │ ├── pornhub.js │ │ ├── bime.js │ │ ├── coub.js │ │ ├── defaultVideo.js │ │ ├── vimeo.js │ │ ├── pastebin.js │ │ ├── facebookvideo.js │ │ ├── codepen.js │ │ ├── archilogic.js │ │ ├── soundcloud.js │ │ ├── tuckbot.js │ │ ├── znipe.js │ │ ├── dropbox.js │ │ ├── pixiv.js │ │ ├── streamvi.js │ │ ├── jsfiddle.js │ │ ├── redditmedia.js │ │ ├── defaultAudio.js │ │ ├── getyarn.js │ │ ├── dailymotion.js │ │ ├── simplecove.js │ │ ├── xkcd.js │ │ ├── giphy.js │ │ ├── spotify.js │ │ └── photobucket.js │ ├── redditUserInfo.js │ ├── requestPermissions.js │ ├── spoilerTags.js │ ├── contribute.js │ ├── tableTools.js │ ├── disableChat.js │ └── localDate.js ├── options │ ├── options.html │ └── handleBlocking.js └── background.entry.js ├── changelog ├── v0.9.0.md ├── v0.9.7.md ├── v1.6.1.md ├── v1.6.2.md ├── v5.11.1.md ├── v5.22.14.md ├── v3.1.md ├── v5.11.2.md ├── v5.5.8.md ├── v5.5.6.md ├── v5.8.6.md ├── v5.9.8.md ├── v5.6.4.md ├── _EXAMPLE.md ├── v5.9.7.md ├── UNRELEASED.md ├── v4.7.3.md ├── v5.1.5.md ├── v5.12.5.md ├── v5.5.9.md ├── v1.8.6.md ├── v5.5.4.md ├── v5.10.2.md ├── v5.22.9.md ├── v5.22.12.md ├── v5.22.17.md ├── v5.22.8.md ├── v4.5.0.1.md ├── v1.6.6.md ├── v5.21.1.md ├── v5.6.5.md ├── v5.3.3.md ├── v5.1.7.md ├── v5.18.6.md ├── v4.2.0.1.md ├── v5.8.3.md ├── v5.12.8.md ├── v5.17.4.md ├── v5.5.7.md ├── v5.12.6.md ├── v5.5.5.md ├── v5.7.5.md ├── v5.3.8.md ├── v5.12.2.md ├── v5.20.9.md ├── v5.16.6.md ├── v5.22.2.md ├── v5.9.9.md ├── v5.20.11.md ├── v5.20.12.md ├── v5.16.5.md ├── v5.18.2.md ├── v5.18.8.md ├── v5.1.9.md ├── v5.11.3.md ├── v5.8.4.md ├── v5.22.10.md ├── v5.22.15.md ├── v5.12.1.md ├── v5.12.4.md ├── v5.22.6.md ├── v4.3.0.1.md ├── v5.22.5.md ├── v4.3.1.1.md ├── v5.21.3.md ├── v5.22.16.md ├── v5.13.2.md ├── v1.5.2.md ├── v5.20.1.md ├── v5.6.3.md ├── v1.5.1.md ├── v5.13.1.md ├── v5.7.3.md ├── v5.17.5.md ├── v5.18.10.md ├── v5.16.1.md ├── v5.19.1.md ├── v5.22.7.md ├── v5.7.1.md ├── v5.11.8.md ├── v5.18.14.md ├── v5.4.1.md ├── v5.8.2.md ├── v5.18.9.md ├── v5.18.3.md ├── v5.16.9.md ├── v5.9.4.md ├── v5.2.2.md ├── v5.9.6.md ├── v5.18.11.md ├── v5.18.1.md ├── v5.22.3.md ├── v5.22.4.md ├── v5.11.7.md ├── v4.3.0.4.md ├── v5.20.4.md ├── v5.15.2.md ├── v5.5.11.md ├── v5.7.2.md ├── v5.11.6.md ├── v5.12.7.md ├── v5.16.10.md ├── v5.11.4.md ├── v5.18.13.md ├── v5.12.3.md ├── v5.8.1.md ├── v5.13.6.md ├── v5.16.7.md ├── v5.18.7.md ├── v5.9.3.md ├── v5.10.3.md ├── v5.20.8.md ├── v5.14.1.md ├── v5.18.5.md ├── v5.6.1.md ├── v5.16.2.md ├── v5.21.2.md ├── v5.10.1.md ├── v5.16.4.md ├── v1.0.md ├── v5.18.4.md ├── v5.5.10.md ├── v5.1.4.md ├── v1.5.md ├── v5.11.9.md ├── v5.17.3.md ├── v1.6.md ├── v5.20.7.md ├── v5.1.8.md ├── v5.16.3.md ├── v5.7.6.md ├── v5.22.11.md ├── v5.9.5.md ├── v5.20.6.md ├── v1.8.md ├── v4.7.4.md ├── v5.3.5.md ├── v5.22.1.md ├── v1.6.5.md ├── v5.20.10.md ├── v5.5.2.md ├── v5.5.12.md └── v1.1.md ├── flow ├── lib │ ├── chrome.js.flow │ ├── escapeStringRegexp.js.flow │ ├── .eslintrc.json │ └── snudown.js.flow ├── stub │ └── sibling-loader.js.flow └── .eslintrc.json ├── images ├── beta48.png ├── css-on.png ├── icon16.png ├── icon44.png ├── icon48.png ├── icon50.png ├── icon64.png ├── store1.png ├── store2.png ├── store3.png ├── store4.png ├── beta128.png ├── css-off.png ├── icon128.png ├── icon150.png ├── icon256.png ├── icon512.png ├── css-off-small.png ├── css-on-small.png ├── promo1400x560.png ├── promo440x280.png └── promo920x680.png ├── .eslintignore ├── .github ├── FUNDING.yml ├── PULL_REQUEST_TEMPLATE.md └── ISSUE_TEMPLATE.md ├── examples └── .eslintrc.json ├── tests ├── .eslintrc.json ├── commentTools.js ├── newCommentCount.js ├── commandLine.js ├── spamButton.js ├── commentQuickCollapse.js ├── pageNavigator.js ├── subredditInfo.js └── notifications.js ├── postcss.config.js ├── .babelrc ├── .codeclimate.yml ├── .editorconfig ├── ava.config.js ├── DEPLOY.md ├── .flowconfig └── locales └── locales └── index.js /.stylelintignore: -------------------------------------------------------------------------------- 1 | lib/vendor/**/* 2 | -------------------------------------------------------------------------------- /lib/vendor/index.scss: -------------------------------------------------------------------------------- 1 | @import './guiders'; 2 | -------------------------------------------------------------------------------- /changelog/v0.9.0.md: -------------------------------------------------------------------------------- 1 | ## v0.90 2 | 3 | Initial release! 4 | -------------------------------------------------------------------------------- /flow/lib/chrome.js.flow: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | declare var chrome: any; 4 | -------------------------------------------------------------------------------- /lib/css/modules/_selectedEntry.scss: -------------------------------------------------------------------------------- 1 | .entry { padding-right: 5px; } 2 | -------------------------------------------------------------------------------- /lib/core/migrate/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export { migrate } from './migrate'; 4 | -------------------------------------------------------------------------------- /lib/environment/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "webextensions": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /images/beta48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/beta48.png -------------------------------------------------------------------------------- /images/css-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/css-on.png -------------------------------------------------------------------------------- /images/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/icon16.png -------------------------------------------------------------------------------- /images/icon44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/icon44.png -------------------------------------------------------------------------------- /images/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/icon48.png -------------------------------------------------------------------------------- /images/icon50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/icon50.png -------------------------------------------------------------------------------- /images/icon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/icon64.png -------------------------------------------------------------------------------- /images/store1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/store1.png -------------------------------------------------------------------------------- /images/store2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/store2.png -------------------------------------------------------------------------------- /images/store3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/store3.png -------------------------------------------------------------------------------- /images/store4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/store4.png -------------------------------------------------------------------------------- /images/beta128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/beta128.png -------------------------------------------------------------------------------- /images/css-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/css-off.png -------------------------------------------------------------------------------- /images/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/icon128.png -------------------------------------------------------------------------------- /images/icon150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/icon150.png -------------------------------------------------------------------------------- /images/icon256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/icon256.png -------------------------------------------------------------------------------- /images/icon512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/icon512.png -------------------------------------------------------------------------------- /lib/images/mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/mail.png -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # Build output 2 | /dist 3 | 4 | # Vendor files 5 | /lib/vendor/*.js 6 | !/lib/vendor/index.js 7 | -------------------------------------------------------------------------------- /lib/constants/jsapi.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const JSAPI_CONSUMER_NAME = 'reddit-enhancement-suite'; 4 | -------------------------------------------------------------------------------- /lib/images/bacon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/bacon.png -------------------------------------------------------------------------------- /images/css-off-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/css-off-small.png -------------------------------------------------------------------------------- /images/css-on-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/css-on-small.png -------------------------------------------------------------------------------- /images/promo1400x560.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/promo1400x560.png -------------------------------------------------------------------------------- /images/promo440x280.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/promo440x280.png -------------------------------------------------------------------------------- /images/promo920x680.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/images/promo920x680.png -------------------------------------------------------------------------------- /lib/images/icon60x30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/icon60x30.png -------------------------------------------------------------------------------- /lib/images/mailgray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/mailgray.png -------------------------------------------------------------------------------- /lib/constants/sessionStorage.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const LAST_SELECTED_ENTRY_KEY = 'RES.lastSelectedEntry'; 4 | -------------------------------------------------------------------------------- /lib/images/commentTools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/commentTools.png -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [honestbleeps] 4 | patreon: honestbleeps 5 | -------------------------------------------------------------------------------- /lib/images/colorblindMail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/colorblindMail.png -------------------------------------------------------------------------------- /lib/images/droparrowgray.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/droparrowgray.gif -------------------------------------------------------------------------------- /lib/images/legacyFavicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/legacyFavicon.png -------------------------------------------------------------------------------- /lib/images/dashboardLoader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/dashboardLoader.gif -------------------------------------------------------------------------------- /lib/images/hosts/giphy-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/hosts/giphy-logo.png -------------------------------------------------------------------------------- /lib/images/moderatorShield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/moderatorShield.png -------------------------------------------------------------------------------- /lib/images/nightmode/arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/nightmode/arrows.png -------------------------------------------------------------------------------- /flow/stub/sibling-loader.js.flow: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | type Filename = string; 4 | 5 | export default ({}: { [key: Filename]: any }); 6 | -------------------------------------------------------------------------------- /lib/fonts/batch-icons-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/fonts/batch-icons-webfont.woff -------------------------------------------------------------------------------- /lib/images/accountSwitcherSnoo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/accountSwitcherSnoo.png -------------------------------------------------------------------------------- /lib/images/nightmode/aboutHeader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/nightmode/aboutHeader.png -------------------------------------------------------------------------------- /lib/images/nightmode/snooBalloons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skyme5/Reddit-Enhancement-Suite/master/lib/images/nightmode/snooBalloons.png -------------------------------------------------------------------------------- /lib/css/modules/_redditUserInfo.scss: -------------------------------------------------------------------------------- 1 | .res-redditUserInfo-hideAuthorTooltip { 2 | .author-tooltip { 3 | display: none !important; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /changelog/v0.9.7.md: -------------------------------------------------------------------------------- 1 | ## v0.97 2 | 3 | ### Bug fixes 4 | 5 | - Core system 6 | - Fixed a bug where the script would stop checking for auto updates. 7 | -------------------------------------------------------------------------------- /examples/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "import/no-unresolved": 0 // paths here will only work after the example is pasted into lib/ 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /changelog/v1.6.1.md: -------------------------------------------------------------------------------- 1 | ## v1.61 2 | 3 | ### Bug fixes 4 | 5 | - Keyboard Navigation 6 | - Fixed an issue with numbered comment links not working in Firefox 7 | 8 | -------------------------------------------------------------------------------- /changelog/v1.6.2.md: -------------------------------------------------------------------------------- 1 | ## v1.62 2 | 3 | ### Bug fixes 4 | 5 | - Hide Child Comments 6 | - Embarassingly released this completely broken in 1.61 - it's fixed now. 7 | 8 | -------------------------------------------------------------------------------- /changelog/v5.11.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.11.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.11.1) 2 | 3 | ### Housekeeping / Other 4 | 5 | - Test deployment 6 | -------------------------------------------------------------------------------- /changelog/v5.22.14.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.14](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.14) 2 | 3 | This is a version bump release, there are no changes. -------------------------------------------------------------------------------- /flow/lib/escapeStringRegexp.js.flow: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | declare module 'escape-string-regexp' { 4 | /*:: declare export default (unescaped: string) => string; */ 5 | } 6 | -------------------------------------------------------------------------------- /lib/environment/foreground/privateBrowsing.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function isPrivateBrowsing(): boolean { 4 | return chrome.extension.inIncognitoContext; 5 | } 6 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | Relevant issue: 3 | Tested in browser: 4 | -------------------------------------------------------------------------------- /changelog/v3.1.md: -------------------------------------------------------------------------------- 1 | ## v3.1 2 | 3 | ### Bug fixes 4 | 5 | - Style Tweaks 6 | - Fixed a bug that caused RES to break for users who had never ignored a subreddit stylesheet. 7 | -------------------------------------------------------------------------------- /changelog/v5.11.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.11.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.11.2) 2 | 3 | ### Housekeeping / Other 4 | 5 | - Test deployment again 6 | -------------------------------------------------------------------------------- /changelog/v5.5.8.md: -------------------------------------------------------------------------------- 1 | ## [v5.5.8](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.5.8) 2 | 3 | ### Housekeeping / Other 4 | 5 | - Try Opera deployment again 6 | -------------------------------------------------------------------------------- /tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "flowtype/no-unused-expressions": 0, 4 | "flowtype/require-valid-file-annotation": 0, 5 | "import/no-commonjs": 0 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /changelog/v5.5.6.md: -------------------------------------------------------------------------------- 1 | ## [v5.5.6](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.5.6) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix templates in Edge (thanks @erikdesjardins) 6 | -------------------------------------------------------------------------------- /changelog/v5.8.6.md: -------------------------------------------------------------------------------- 1 | ## [v5.8.6](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.8.6) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix reddit's user info cards being hidden by default 6 | -------------------------------------------------------------------------------- /changelog/v5.9.8.md: -------------------------------------------------------------------------------- 1 | ## [v5.9.8](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.9.8) 2 | 3 | ### Housekeeping / Other 4 | 5 | - Test automated deployment of changelogs 6 | -------------------------------------------------------------------------------- /changelog/v5.6.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.6.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.6.4) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix spam button message recipient (thanks @erikdesjardins) 6 | -------------------------------------------------------------------------------- /changelog/_EXAMPLE.md: -------------------------------------------------------------------------------- 1 | ### New Features 2 | 3 | - None (thanks nobody) 4 | 5 | ### Bug Fixes 6 | 7 | - None (thanks nobody) 8 | 9 | ### Housekeeping / Other 10 | 11 | - None (thanks nobody) 12 | -------------------------------------------------------------------------------- /changelog/v5.9.7.md: -------------------------------------------------------------------------------- 1 | ## [v5.9.7](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.9.7) 2 | 3 | ### Bug Fixes 4 | 5 | - (beta) Restore keyboard nav performance (thanks @larsjohnsen) 6 | -------------------------------------------------------------------------------- /changelog/UNRELEASED.md: -------------------------------------------------------------------------------- 1 | ### New Features 2 | 3 | - None (thanks nobody) 4 | 5 | ### Bug Fixes 6 | 7 | - None (thanks nobody) 8 | 9 | ### Housekeeping / Other 10 | 11 | - None (thanks nobody) 12 | -------------------------------------------------------------------------------- /changelog/v4.7.3.md: -------------------------------------------------------------------------------- 1 | ## [v4.7.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v4.7.3) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix Microsoft Edge migration issue with max size (thanks @larsjohnsen) 6 | -------------------------------------------------------------------------------- /lib/images/expandoEmpty.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | /* @noflow */ 2 | 3 | /* eslint-disable import/no-commonjs */ 4 | 5 | const autoprefixer = require('autoprefixer'); 6 | 7 | module.exports = { 8 | plugins: [autoprefixer], 9 | }; 10 | -------------------------------------------------------------------------------- /changelog/v5.1.5.md: -------------------------------------------------------------------------------- 1 | ## [v5.1.5](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.1.5) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix stylesheet snippets depending on custom toggles (thanks @erikdesjardins) 6 | -------------------------------------------------------------------------------- /changelog/v5.12.5.md: -------------------------------------------------------------------------------- 1 | ## [v5.12.5](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.12.5) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix Imgur videos with audio not being handled correctly (thanks @larsjohnsen) 6 | -------------------------------------------------------------------------------- /lib/utils/value.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function firstValid(...vals: mixed[]): mixed { 4 | return vals.find(val => 5 | val !== undefined && val !== null && (typeof val !== 'number' || !isNaN(val)), 6 | ); 7 | } 8 | -------------------------------------------------------------------------------- /lib/environment/background/i18n.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { getLocaleDictionary } from '../../../locales'; 4 | import { addListener } from './messaging'; 5 | 6 | addListener('i18n', locale => getLocaleDictionary(locale)); 7 | -------------------------------------------------------------------------------- /lib/modules/backupAndRestore/providers/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export { File } from './File'; 4 | export { GoogleDrive } from './GoogleDrive'; 5 | export { OneDrive } from './OneDrive'; 6 | export { Dropbox } from './Dropbox'; 7 | -------------------------------------------------------------------------------- /lib/css/modules/_userInfo.scss: -------------------------------------------------------------------------------- 1 | #authorInfoToolTip { 2 | .blueButton { 3 | float: right; 4 | margin-left: 8px; 5 | margin-top: 12px; 6 | } 7 | 8 | .redButton { 9 | float: right; 10 | margin-left: 8px; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/constants/localStorage.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const CACHED_LANG_KEY = 'RES.i18nCachedLang'; 4 | export const CACHED_MESSAGES_KEY = 'RES.i18nCachedMessages'; 5 | export const CACHED_MESSAGES_TOKEN_KEY = 'RES.i18nCachedMessagesToken'; 6 | -------------------------------------------------------------------------------- /lib/environment/foreground/loadScript.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { memoize } from 'lodash-es'; 4 | import { sendMessage } from './messaging'; 5 | 6 | export const loadScript = memoize((url: string) => sendMessage('loadScript', { url })); 7 | -------------------------------------------------------------------------------- /changelog/v5.5.9.md: -------------------------------------------------------------------------------- 1 | ## [v5.5.9](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.5.9) 2 | 3 | ### Housekeeping / Other 4 | 5 | - Clean up test build slightly (thanks @erikdesjardins) 6 | - Test Opera deployment again (again) 7 | -------------------------------------------------------------------------------- /changelog/v1.8.6.md: -------------------------------------------------------------------------------- 1 | ## v1.86 2 | 3 | ### Bug fixes 4 | 5 | - Core code 6 | - Fixed a bug that affected gold users who turned off ads (console wouldn't open) 7 | - Inline Image Viewer 8 | - Fixed a minor bug with the sprite sheet for show/hide images. 9 | -------------------------------------------------------------------------------- /changelog/v5.5.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.5.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.5.4) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix cookie-related issues (thanks @erikdesjardins) 6 | - Fix network requests in Edge (thanks @erikdesjardins) 7 | -------------------------------------------------------------------------------- /lib/css/modules/_tableTools.scss: -------------------------------------------------------------------------------- 1 | .res-tableTools-sort { 2 | .md th { 3 | cursor: pointer; 4 | } 5 | 6 | .sort-asc::after { 7 | content: '\0020\25B4'; 8 | } 9 | 10 | .sort-desc::after { 11 | content: '\0020\25BE'; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/vendor/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | // Import only the functionality of sortablejs which is needed 4 | import Sortable, { AutoScroll } from 'sortablejs/modular/sortable.core.esm'; 5 | 6 | Sortable.mount(new AutoScroll()); 7 | export { Sortable }; 8 | -------------------------------------------------------------------------------- /changelog/v5.10.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.10.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.10.2) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix invalid entries breaking filtering entirely (thanks @larsjohnsen) 6 | - Fix sidebar live preview (thanks @erikdesjardins) 7 | -------------------------------------------------------------------------------- /changelog/v5.22.9.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.9](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.9) 2 | 3 | ### New Features 4 | 5 | - None 6 | 7 | ### Bug Fixes 8 | 9 | - Fix announcement module 10 | 11 | ### Housekeeping / Other 12 | 13 | - None -------------------------------------------------------------------------------- /lib/core/modules/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export { 4 | allowedModules, 5 | all, 6 | get, 7 | getByCategory, 8 | getUnchecked, 9 | isEnabled, 10 | isRunning, 11 | } from './modules'; 12 | 13 | export { 14 | setEnabled, 15 | } from './storage'; 16 | -------------------------------------------------------------------------------- /changelog/v5.22.12.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.12](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.12) 2 | 3 | ### New Features 4 | 5 | - Added Reddit Tor/Onion Site support 6 | 7 | ### Bug Fixes 8 | 9 | - 10 | 11 | ### Housekeeping / Other 12 | 13 | - -------------------------------------------------------------------------------- /flow/lib/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "flowtype/boolean-style": 0, // lib files may be generated from TS so boolean style may differ 4 | "flowtype/type-id-match": 0 // type names in this dir are dictated by the API names, so we can't change them 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /flow/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "flowtype/no-dupe-keys": 0, // dupe keys in declarations are used for overloading 4 | "flowtype/no-weak-types": 0, // used in generic bounds 5 | "no-unused-vars": 0 // none of the flow declarations will be used directly 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /changelog/v5.22.17.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.17](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.17) 2 | 3 | ### New Features 4 | 5 | - N/A 6 | 7 | ### Bug Fixes 8 | 9 | - Revert 10 character change due to regression. 10 | 11 | ### Housekeeping / Other 12 | 13 | - N/A -------------------------------------------------------------------------------- /changelog/v5.22.8.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.8](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.8) 2 | 3 | ### New Features 4 | 5 | - None 6 | 7 | ### Bug Fixes 8 | 9 | - Fixes home button type error (thanks @larsjohnsen) 10 | 11 | ### Housekeeping / Other 12 | 13 | - None -------------------------------------------------------------------------------- /lib/utils/__tests__/value.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import test from 'ava'; 4 | 5 | import { firstValid } from '../value'; 6 | 7 | test('firstValid', t => { 8 | t.is(firstValid(null, undefined, 'foo'), 'foo'); 9 | t.is(firstValid(null, undefined, NaN, Infinity), Infinity); 10 | }); 11 | -------------------------------------------------------------------------------- /changelog/v4.5.0.1.md: -------------------------------------------------------------------------------- 1 | ## [v4.5.0.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/tag/v4.5.0.1) 2 | 3 | - Fixed a couple of issues with night mode coloring 4 | - Fixed a few issues with "use subreddit stylesheet" for some users 5 | - Various other small / emergency bug fixes 6 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | '@babel/plugin-proposal-export-namespace-from', 4 | ["@babel/plugin-proposal-class-properties", { "loose": true }], 5 | "@babel/plugin-transform-modules-commonjs", 6 | "@babel/plugin-transform-flow-strip-types" 7 | ], 8 | "sourceMaps": "inline" 9 | } 10 | -------------------------------------------------------------------------------- /changelog/v1.6.6.md: -------------------------------------------------------------------------------- 1 | ## v1.66 2 | 3 | ### New features 4 | 5 | - Keyboard Navigation 6 | - Added "Next" and "Prev" keyboard shortcuts (n and p respectively) for link pages. 7 | 8 | ### Bug fixes 9 | 10 | - Keyboard Nav 11 | - Fixed a bug where relative links weren't working in chrome. 12 | -------------------------------------------------------------------------------- /changelog/v5.21.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.21.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.21.1) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - None (thanks nobody) 10 | 11 | ### Housekeeping / Other 12 | 13 | - None (thanks nobody) 14 | -------------------------------------------------------------------------------- /changelog/v5.6.5.md: -------------------------------------------------------------------------------- 1 | ## [v5.6.5](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.6.5) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix double expando buttons, mediaBrowseMode, and expanding self posts with keyboard nav (thanks @erikdesjardins) 6 | - Fix flair filters (thanks @erikdesjardins) 7 | -------------------------------------------------------------------------------- /changelog/v5.3.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.3.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.3.3) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix performance regression from filter changes (thanks @larsjohnsen) 6 | - Fix YouTube expandos not working with autoplay or start/end params (thanks @erikdesjardins) 7 | -------------------------------------------------------------------------------- /lib/css/modules/_temporaryDropdownLinks.scss: -------------------------------------------------------------------------------- 1 | .RES-dropdown-button { 2 | visibility: hidden; 3 | margin-left: 1em; 4 | float: right; 5 | 6 | form:hover & { 7 | visibility: visible; 8 | opacity: 0.5; 9 | } 10 | 11 | &:hover { 12 | visibility: visible; 13 | opacity: 1; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/environment/background/download.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addListener } from './messaging'; 4 | 5 | addListener('download', ({ url, filename }, { tab: { incognito } }) => { 6 | chrome.downloads.download({ url, filename, ...(process.env.BUILD_TARGET !== 'firefox' ? {} : { incognito }) }); 7 | }); 8 | -------------------------------------------------------------------------------- /.codeclimate.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | plugins: 4 | eslint: 5 | enabled: true 6 | channel: "eslint-4" 7 | duplication: 8 | enabled: true 9 | config: 10 | languages: 11 | - javascript 12 | fixme: 13 | enabled: true 14 | 15 | exclude_patterns: 16 | - "lib/vendor/" 17 | -------------------------------------------------------------------------------- /changelog/v5.1.7.md: -------------------------------------------------------------------------------- 1 | ## [v5.1.7](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.1.7) 2 | 3 | ### Housekeeping / Other 4 | 5 | - Update expando icons for new color scheme 6 | - Minor storage refactoring (thanks @erikdesjardins) 7 | - Minor filterline optimization (thanks @erikdesjardins) 8 | -------------------------------------------------------------------------------- /changelog/v5.18.6.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.6](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.6) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fixes some mouse click issues 10 | 11 | ### Housekeeping / Other 12 | 13 | - None (thanks nobody) 14 | -------------------------------------------------------------------------------- /lib/core/metadata/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import packageInfo from 'exec-loader?cache!./packageInfo'; 4 | 5 | export const { 6 | announcementsSubreddit, 7 | name, 8 | version, 9 | isBeta, 10 | isPatch, 11 | isMinor, 12 | isMajor, 13 | updatedURL, 14 | homepageURL, 15 | } = packageInfo; 16 | -------------------------------------------------------------------------------- /lib/environment/background/localePersistor.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addListener } from './messaging'; 4 | 5 | let lastRedditLocale = navigator.language || 'en'; 6 | 7 | addListener('getLastRedditLocale', () => lastRedditLocale); 8 | addListener('setLastRedditLocale', v => { lastRedditLocale = v; }); 9 | -------------------------------------------------------------------------------- /lib/utils/profiling.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | let counter = 0; 4 | export function markStart(): string { 5 | const tag = (++counter).toString(); 6 | performance.mark(tag); 7 | return tag; 8 | } 9 | 10 | export function markEnd(tag: string, name: string) { 11 | performance.measure(name, tag); 12 | } 13 | -------------------------------------------------------------------------------- /changelog/v4.2.0.1.md: -------------------------------------------------------------------------------- 1 | ## v4.2.0.1 2 | 3 | ### Bug fixes 4 | 5 | - Temporarily removed bitcointip module due to server load issues 6 | - Tweaks to night mode 7 | - added back option for users to have border on keyhighlight 8 | - Fixed a bug where "use subreddit stylesheet" option showed up in places it shouldn't. 9 | -------------------------------------------------------------------------------- /changelog/v5.8.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.8.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.8.3) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix "use subreddit style" checkbox appearing on user pages (thanks @nishanthvijayan) 6 | - Potentially fix RES not starting in Chrome in some situations (thanks @erikdesjardins) 7 | -------------------------------------------------------------------------------- /lib/constants/urlHashes.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const RES_DISABLED_HASH = '#res:disabled'; 4 | export const RES_SETTINGS_HASH = '#res:settings'; 5 | export const RES_SETTINGS_REDIRECT_TO_STANDALONE_HASH = '#res:settings-redirect-standalone-options-page'; 6 | export const RES_NER_PAGE_HASH = '#res:ner-page'; 7 | -------------------------------------------------------------------------------- /changelog/v5.12.8.md: -------------------------------------------------------------------------------- 1 | ## [v5.12.8](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.12.8) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Updated Gfycat to use new API endpoint (thanks @larsjohnsen) 10 | 11 | ### Housekeeping / Other 12 | 13 | - None (thanks nobody) 14 | -------------------------------------------------------------------------------- /changelog/v5.17.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.17.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.17.4) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - None (thanks nobody) 10 | 11 | ### Housekeeping / Other 12 | 13 | - Update deps and rebuild, hoping that Webpack works this time 14 | -------------------------------------------------------------------------------- /changelog/v5.5.7.md: -------------------------------------------------------------------------------- 1 | ## [v5.5.7](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.5.7) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix alignment of expando icons in self posts with compressed link display (thanks @erikdesjardins) 6 | 7 | ### Housekeeping / Other 8 | 9 | - Opera release automation (thanks @erikdesjardins) 10 | -------------------------------------------------------------------------------- /lib/css/modules/_troubleshooter.scss: -------------------------------------------------------------------------------- 1 | body:not(.loggedin) #optionContainer-troubleshooter-clearUserInfoCache .optionDescription::before, 2 | body:not(.loggedin) #optionContainer-troubleshooter-clearSubreddits .optionDescription::before { 3 | content: 'Functionality only for logged in users - '; 4 | color: #f00; 5 | font-weight: bold; 6 | } 7 | -------------------------------------------------------------------------------- /changelog/v5.12.6.md: -------------------------------------------------------------------------------- 1 | ## [v5.12.6](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.12.6) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - None (thanks nobody) 10 | 11 | ### Housekeeping / Other 12 | 13 | - Re-releasing v5.12.5 to fix AMO store listing (thanks @andytuba) 14 | -------------------------------------------------------------------------------- /changelog/v5.5.5.md: -------------------------------------------------------------------------------- 1 | ## [v5.5.5](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.5.5) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix Account Switcher not displaying an error when login fails (thanks @erikdesjardins) 6 | 7 | ### Housekeeping / Other 8 | 9 | - Replace mustache templates with native (thanks @erikdesjardins) 10 | -------------------------------------------------------------------------------- /lib/options/options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | RES Settings Console 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /changelog/v5.7.5.md: -------------------------------------------------------------------------------- 1 | ## [v5.7.5](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.7.5) 2 | 3 | This release is the beta counterpart to 5.6.5. 4 | 5 | ### Bug Fixes 6 | 7 | - Fix double expando buttons, mediaBrowseMode, and expanding self posts with keyboard nav (thanks @erikdesjardins) 8 | - Fix flair filters (thanks @erikdesjardins) 9 | -------------------------------------------------------------------------------- /lib/environment/background/loadScript.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { apiToPromise } from '../utils/api'; 4 | import { addListener } from './messaging'; 5 | 6 | addListener('loadScript', async ({ url }, { tab: { id: tabId }, frameId }) => { 7 | await apiToPromise(chrome.tabs.executeScript)(tabId, { file: url, frameId, runAt: 'document_start' }); 8 | }); 9 | -------------------------------------------------------------------------------- /changelog/v5.3.8.md: -------------------------------------------------------------------------------- 1 | ## [v5.3.8](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.3.8) 2 | 3 | ### Housekeeping / Other 4 | 5 | - Notification with a link to show filter reasons is displayed when all posts are filtered out (thanks @larsjohnsen) 6 | - Attempt to work around an issue with the Firefox submission API (thanks @erikdesjardins) 7 | -------------------------------------------------------------------------------- /lib/core/options/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export { 4 | save, 5 | } from './options'; 6 | 7 | export { 8 | loadRaw, 9 | get, 10 | getValue, 11 | set, 12 | storage, 13 | } from './storage'; 14 | 15 | export { 16 | getModifiedText, 17 | } from './modified'; 18 | 19 | export * as stage from './stage'; 20 | 21 | export * as table from './table'; 22 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/IsLocked.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Case } from '../Case'; 4 | 5 | export class IsLocked extends Case { 6 | static text = 'Locked'; 7 | 8 | static fields = ['post is locked']; 9 | static unique = true; 10 | 11 | trueText = 'locked'; 12 | 13 | evaluate(thing: *) { 14 | return thing.isLocked(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /changelog/v5.12.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.12.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.12.2) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix image sizing in Firefox with disableAnimations enabled (thanks @larsjohnsen) 6 | - Fix displayed user tag when text and color are empty (thanks @larsjohnsen) 7 | - Improve layout of user tags without text (thanks @larsjohnsen) 8 | -------------------------------------------------------------------------------- /changelog/v5.20.9.md: -------------------------------------------------------------------------------- 1 | ## [v5.20.9](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.20.9) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - host vreddit: Fixed access to new videos Firefox by requesting user permissions to *.redd.it 10 | 11 | ### Housekeeping / Other 12 | 13 | - None (thanks nobody) 14 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/IsNSFW.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Case } from '../Case'; 4 | 5 | export class IsNSFW extends Case { 6 | static text = 'NSFW'; 7 | 8 | static fields = ['post is marked NSFW']; 9 | 10 | static unique = true; 11 | 12 | trueText = 'nsfw'; 13 | 14 | evaluate(thing: *) { 15 | return thing.isNSFW(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/utils/subreddits.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const fakeSubreddits = [ 4 | 'mod', 5 | 'friends', 6 | 'random', 7 | 'myrandom', 8 | 'all', 9 | 'contrib', 10 | 'popular', 11 | ]; 12 | 13 | export function isFakeSubreddit(subreddit: string): boolean { 14 | return fakeSubreddits.some(fakeSubreddit => fakeSubreddit === subreddit.toLowerCase()); 15 | } 16 | -------------------------------------------------------------------------------- /lib/modules/hosts/default.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('default', { 6 | name: 'default', 7 | domains: [], 8 | detect: ({ pathname }) => (/\.(webp|gif|jpe?g|png|svg)$/i).test(pathname), 9 | handleLink(href) { 10 | return { 11 | type: 'IMAGE', 12 | src: href, 13 | }; 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /changelog/v5.16.6.md: -------------------------------------------------------------------------------- 1 | ## [v5.16.6](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.16.6) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Restore check that `document.body` is defined, to prevent initalization before the browser is ready 10 | 11 | ### Housekeeping / Other 12 | 13 | - None (thanks nobody) 14 | -------------------------------------------------------------------------------- /changelog/v5.22.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.2) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix a race condition which in some circumstances breakes accountSwitcher and hiding / unhiding posts. 10 | 11 | ### Housekeeping / Other 12 | 13 | - None (thanks nobody) 14 | -------------------------------------------------------------------------------- /changelog/v5.9.9.md: -------------------------------------------------------------------------------- 1 | ## [v5.9.9](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.9.9) 2 | 3 | ### Bug Fixes 4 | 5 | - Avoid non-looping gifs when imgur API gives malformed response (thanks @erikdesjardins) 6 | - (beta) Fix Selector custom filter case (thanks @larsjohnsen) 7 | - (beta) Fix getVideoTimes crashing for disabled thumbnails (thanks @larsjohnsen) 8 | -------------------------------------------------------------------------------- /lib/environment/foreground/download.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { sendMessage } from './messaging'; 4 | 5 | export function download(url: string, filename?: string) { 6 | // Firefox and Chrome is same-origin only 7 | sendMessage('download', { 8 | // resolve relative URLs 9 | url: new URL(url, location.href).href, 10 | filename, 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /lib/environment/foreground/id.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function getExtensionId(): string { 4 | return chrome.runtime.id; 5 | } 6 | 7 | export const getURL = chrome.runtime.getURL; 8 | 9 | export const getOptionsURL = (hash: string = '') => new URL(hash, getURL('options.html')); 10 | export const isOptionsPage = () => location.origin === getOptionsURL().origin; 11 | -------------------------------------------------------------------------------- /lib/modules/hosts/reddituploads.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('reddituploads', { 6 | name: 'reddituploads', 7 | domains: ['reddituploads.com'], 8 | attribution: false, 9 | detect: () => true, 10 | handleLink(href) { 11 | return { 12 | type: 'IMAGE', 13 | src: href, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /changelog/v5.20.11.md: -------------------------------------------------------------------------------- 1 | ## [v5.20.11](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.20.11) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - showImages: Also auto-pause videos containing sound when muted 10 | - subredditManager: Fix mod shortcuts 11 | 12 | ### Housekeeping / Other 13 | 14 | - None (thanks nobody) 15 | -------------------------------------------------------------------------------- /changelog/v5.20.12.md: -------------------------------------------------------------------------------- 1 | ## [v5.20.12](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.20.12) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - showImages: Also auto-pause videos containing sound when muted 10 | - subredditManager: Fix mod shortcuts 11 | 12 | ### Housekeeping / Other 13 | 14 | - None (thanks nobody) 15 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/commentCases/IsDeleted.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Case } from '../Case'; 4 | 5 | export class IsDeleted extends Case { 6 | static text = 'Deleted'; 7 | 8 | static fields = ['comment is deleted']; 9 | 10 | static unique = true; 11 | 12 | trueText = 'deleted'; 13 | 14 | evaluate(thing: *) { 15 | return thing.isDeleted(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/IsSpoiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Case } from '../Case'; 4 | 5 | export class IsSpoiler extends Case { 6 | static text = 'Spoiler'; 7 | 8 | static fields = ['post is marked spoiler']; 9 | 10 | static unique = true; 11 | 12 | trueText = 'spoiler'; 13 | 14 | evaluate(thing: *) { 15 | return thing.isSpoiler(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/utils/color.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import tinycolor from 'tinycolor2'; 4 | 5 | export function colorToArray(colorString: string): [number, number, number] { 6 | const { r, g, b } = tinycolor(colorString).toRgb(); 7 | return [r, g, b]; 8 | } 9 | 10 | export function colorFromArray([r, g, b]: number[]): string { 11 | return tinycolor({ r, g, b }).toHexString(); 12 | } 13 | -------------------------------------------------------------------------------- /changelog/v5.16.5.md: -------------------------------------------------------------------------------- 1 | ## [v5.16.5](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.16.5) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix subredditManager bar sometimes being emptied (and breaking much other functionality) (thanks @larsjohnsen) 10 | 11 | ### Housekeeping / Other 12 | 13 | - None (thanks nobody) 14 | -------------------------------------------------------------------------------- /changelog/v5.18.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.2) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fixes some posts not being processed when loaded with neverEndingReddit 10 | - commentTools: Fixes table builder 11 | 12 | ### Housekeeping / Other 13 | 14 | - None (thanks nobody) 15 | -------------------------------------------------------------------------------- /changelog/v5.18.8.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.8](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.8) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix some Streamvi expandos (thanks @NickKoester) 10 | - Fix resizing of rotated expandos (thanks @larsjohnsen) 11 | 12 | ### Housekeeping / Other 13 | 14 | - None (thanks nobody) 15 | -------------------------------------------------------------------------------- /lib/utils/html.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | const escapeLookups = { 4 | '&': '&', 5 | '"': '"', 6 | "'": ''', // eslint-disable-line quotes 7 | '<': '<', 8 | '>': '>', 9 | '/': '/', 10 | }; 11 | 12 | export function escapeHTML(str: ?string): string { 13 | return str ? 14 | str.toString().replace(/[&"'<>\/]/g, m => escapeLookups[m]) : 15 | ''; 16 | } 17 | -------------------------------------------------------------------------------- /changelog/v5.1.9.md: -------------------------------------------------------------------------------- 1 | ## [v5.1.9](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.1.9) 2 | 3 | ### New Features 4 | 5 | - loophouse.tv expandos (thanks @mubashariqbal) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix captions not appearing for video expandos (thanks @erikdesjardins) 10 | - Fix /r/all filtered subreddit remove button nightmode style (thanks @erikdesjardins) 11 | -------------------------------------------------------------------------------- /changelog/v5.11.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.11.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.11.3) 2 | 3 | ### New Features 4 | 5 | - New shift-C keyboard shortcut to hide all child comments (thanks @honestbleeps) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix unloading media breaking resizes (thanks @larsjohnsen) 10 | 11 | ### Housekeeping / Other 12 | 13 | - Test deployment #3 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | indent_style = tab 10 | 11 | end_of_line = lf 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | insert_final_newline = true 15 | 16 | [*.md] 17 | trim_trailing_whitespace = false 18 | -------------------------------------------------------------------------------- /changelog/v5.8.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.8.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.8.4) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix styling issues with new profile sidebar in Night Mode (thanks @kevingrahl) 6 | - Fix floating elements not disappearing when scrolling up in some situations (thanks @larsjohnsen) 7 | - Fix styling issues with new report modal in Night Mode (thanks @kevingrahl) 8 | -------------------------------------------------------------------------------- /lib/background.entry.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | // load environment listeners 4 | import 'sibling-loader!./environment/background/ajax'; 5 | 6 | import { migrate } from './core/migrate'; 7 | 8 | import { addListener } from './environment/background/messaging'; 9 | 10 | migrate(); 11 | 12 | // Restoring a backup may require migrations to be run 13 | addListener('runMigrations', migrate); 14 | -------------------------------------------------------------------------------- /lib/images/expandoClose.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /changelog/v5.22.10.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.10](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.10) 2 | 3 | ### New Features 4 | 5 | - None 6 | 7 | ### Bug Fixes 8 | 9 | - Fix RedGifs not expanding (thanks @MoonViolin) 10 | - Fix minor code typo (thanks @laggingreflex) 11 | - Fix leading whitespaces on image download (thanks @maryarankin) 12 | 13 | ### Housekeeping / Other 14 | 15 | - None -------------------------------------------------------------------------------- /changelog/v5.22.15.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.15](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.15) 2 | 3 | ### New Features 4 | 5 | - N/A 6 | 7 | ### Bug Fixes 8 | 9 | - Revert profile styling based on feedback 10 | - Revert change causing stylesheet flashing on pageload for Firefox 11 | - Revert pinVideo change causing feature regression 12 | 13 | ### Housekeeping / Other 14 | 15 | - N/A -------------------------------------------------------------------------------- /lib/core/modules/storage.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as Storage from '../../environment/foreground/storage'; 4 | 5 | export const storage = Storage.wrapBlob('RES.modulePrefs', 6 | (): boolean => { throw new Error('Default module enabled state should never be accessed'); }); 7 | 8 | export function setEnabled(moduleId: string, enable: boolean) { 9 | return storage.set(moduleId, enable); 10 | } 11 | -------------------------------------------------------------------------------- /lib/images/expandoClose-active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /changelog/v5.12.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.12.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.12.1) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix Night Mode not working on new (but non-redesign) profile pages (thanks @andytuba) 6 | - Fix cleanSlate preset (thanks @erikdesjardins) 7 | 8 | ### Housekeeping / Other 9 | 10 | - Updated the localization files 11 | - Don't run on /chat pages (thanks @andytuba) 12 | -------------------------------------------------------------------------------- /changelog/v5.12.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.12.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.12.4) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix Subreddit Info appearing on comments links in the reddit redesign (thanks @erikdesjardins) 6 | - Fix User Tagger not appearing in the reddit redesign in Firefox (thanks @andytuba) 7 | - Fix Comment Navigator navigating to partially filtered comments (thanks @larsjohnsen) 8 | -------------------------------------------------------------------------------- /changelog/v5.22.6.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.6](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.6) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - showParent: Fix Shift-P not working (thanks @gurnec) 10 | - backupAndRestore: Include leading 0's on dates in file name (thanks @thybag) 11 | 12 | ### Housekeeping / Other 13 | 14 | - None (thanks nobody) 15 | -------------------------------------------------------------------------------- /changelog/v4.3.0.1.md: -------------------------------------------------------------------------------- 1 | ## v4.3.0.1 2 | 3 | ### Bug fixes 4 | 5 | - fix for broken colorBlindFriendly option 6 | - fix for broken "night mode whitelist" - clicking "use subreddit style" while using night mode on subs that aren't yet specified as night mode friendly should now stick upon page reloads 7 | - various additional night mode CSS tweaks/improvements 8 | - additional CSS fix for expando buttons on comments page 9 | -------------------------------------------------------------------------------- /changelog/v5.22.5.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.5](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.5) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - showImages: Fix audible videos in gallery not pausing when collapsing the expando 10 | - voteEnhancement: Fix numeric sort of negative numbers 11 | 12 | ### Housekeeping / Other 13 | 14 | - None (thanks nobody) 15 | -------------------------------------------------------------------------------- /lib/environment/background/history.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { apiToPromise } from '../utils/api'; 4 | import { addListener } from './messaging'; 5 | 6 | addListener('addURLToHistory', url => { 7 | chrome.history.addUrl({ url }); 8 | }); 9 | 10 | addListener('isURLVisited', async url => { 11 | const visits = await apiToPromise(chrome.history.getVisits)({ url }); 12 | return visits.length > 0; 13 | }); 14 | -------------------------------------------------------------------------------- /lib/modules/hosts/twimg.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('twimg', { 6 | name: 'twimg', 7 | domains: ['pbs.twimg.com'], 8 | logo: 'https://twitter.com/favicon.ico', 9 | detect: ({ pathname }) => (/^\/media\/[\w\-]+\.\w+/i).test(pathname), 10 | handleLink(href) { 11 | return { 12 | type: 'IMAGE', 13 | src: href, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /ava.config.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default { 4 | files: [ 5 | '**/__tests__/*.js', 6 | // Ignore tests which breaks due to unsupported runtime 7 | '!lib/modules/backupAndRestore/__tests__/serialization.js', 8 | '!lib/utils/__tests__/string.js', 9 | '!lib/utils/__tests__/async.js', 10 | '!lib/utils/__tests__/array.js', 11 | ], 12 | require: [ 13 | '@babel/register', 14 | 'esm', 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /changelog/v4.3.1.1.md: -------------------------------------------------------------------------------- 1 | ## v4.3.1.1 2 | 3 | ### Bug fixes 4 | 5 | - Fixed an issue affecting many buttons (view source, flair selection, etc) 6 | - Fixed an issue with keyboard navigation parent buttons (thanks @gavin19) 7 | - Fixed an issue with j key navigation on dashboard 8 | - Fixed character counter on big editor 9 | - For now, snoonet module is disabled - stay tuned for an exciting new development soon, though! 10 | -------------------------------------------------------------------------------- /changelog/v5.21.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.21.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.21.3) 2 | 3 | ### New Features 4 | 5 | - showImages: [https://old.reddit.com/#res:settings/showImages/collapseInlineMedia](Option) to collapse embedded / inline videos. 6 | 7 | ### Bug Fixes 8 | 9 | - None (thanks nobody) 10 | 11 | ### Housekeeping / Other 12 | 13 | - Make the `geolocation` permission optional 14 | -------------------------------------------------------------------------------- /lib/css/modules/_easterEgg.scss: -------------------------------------------------------------------------------- 1 | @import '../zindex'; 2 | 3 | #baconBit { 4 | position: fixed; 5 | width: 32px; 6 | height: 32px; 7 | background-image: url('../images/bacon.png'); 8 | top: -5%; 9 | left: -5%; 10 | z-index: $zindex-baconbit; 11 | transform: rotate(0deg); 12 | transition: all 2s linear; 13 | 14 | &.makeitrain { 15 | top: 100%; 16 | left: 100%; 17 | transform: rotate(2000deg); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /changelog/v5.22.16.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.16](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.16) 2 | 3 | ### New Features 4 | 5 | - Add YouTube shorts support (thanks @jmonteiro64) 6 | 7 | ### Bug Fixes 8 | 9 | - Add support for 10 character post IDs 10 | - Revert "Update pixiv.js to new embed URL" 11 | - Fix captions not appearing on some media types (thanks @brookst) 12 | 13 | ### Housekeeping / Other 14 | 15 | - N/A -------------------------------------------------------------------------------- /changelog/v5.13.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.13.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.13.2) 2 | 3 | ### Bug Fixes 4 | 5 | - Settings Console search field is properly updated when opened externally (thanks @larsjohnsen) 6 | 7 | ### Housekeeping / Other 8 | 9 | - Improve latency of Settings Console search (thanks @larsjohnsen) 10 | - Update to Babel 7 (thanks @mc10) 11 | - Possibly fix Edge deployment (thanks @erikdesjardins) 12 | -------------------------------------------------------------------------------- /lib/css/modules/_submitIssue.scss: -------------------------------------------------------------------------------- 1 | #RESSubmitWizard { 2 | padding: 0; 3 | 4 | .guiders_content { 5 | max-height: 90vh; 6 | overflow-y: scroll; 7 | padding: 5px 12px; 8 | } 9 | 10 | #RESSubmitAprilFools { 11 | background: #F87; 12 | color: black; 13 | margin-top: 2em; 14 | padding: 1em; 15 | } 16 | 17 | h2:not(:first-child) { 18 | margin-top: 1em; 19 | border-top: 1px gray dashed; 20 | padding-top: 1em; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /changelog/v1.5.2.md: -------------------------------------------------------------------------------- 1 | ## v1.52 2 | 3 | ### Bug fixes 4 | 5 | - Never Ending Reddit 6 | - Fixed a bug on pages with Sponsored Links - reddit is misbehaving here, outputting two divs with the same ID - bad reddit! Bad! 7 | - SingleClick Opener 8 | - Fixed a bug with l+c links not being shown on links from Never Ending Reddit 9 | - Keyboard Navigation 10 | - Fixed basically the same thing as with Never Ending Reddit on pages with sponsored links. 11 | -------------------------------------------------------------------------------- /changelog/v5.20.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.20.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.20.1) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - nightmode: Fix toggling of subreddit theme, and subreddit style refreshing when opening new tabs (thanks @larsjohnsen) 10 | 11 | ### Housekeeping / Other 12 | 13 | - filteReddit comment filterline: Show postAge filter by default (thanks @larsjohnsen) 14 | -------------------------------------------------------------------------------- /changelog/v5.6.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.6.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.6.3) 2 | 3 | ### New Features 4 | 5 | - Add /r/profileposts link to subreddit manager to match reddit (thanks @andytuba) 6 | 7 | ### Bug Fixes 8 | 9 | - Update spam button to message /r/reddit.com now that /r/spam is defunct (thanks @BenMcGarry) 10 | 11 | ### Housekeeping / Other 12 | 13 | - Update the localization files (thanks @erikdesjardins) 14 | -------------------------------------------------------------------------------- /lib/modules/hosts/ppy.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('ppy.sh', { 6 | name: 'ppy.sh', 7 | domains: ['osu.ppy.sh'], 8 | logo: 'https://s.ppy.sh/favicon.ico', 9 | detect: ({ pathname }) => (/^\/ss\/(\d+(?:\/[0-9a-f]+)?)/i).exec(pathname), 10 | handleLink(href, [, code]) { 11 | return { 12 | type: 'IMAGE', 13 | src: `https://osu.ppy.sh/ss/${code}`, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /changelog/v1.5.1.md: -------------------------------------------------------------------------------- 1 | ## v1.51 2 | 3 | ### Bug fixes 4 | 5 | - Live Comment Preview 6 | - Fixed a bug where the bold/italic bar didn't go away after submitting a comment 7 | - User Tagger 8 | - Color coded vote weight now a separate element [v] to avoid CSS conflicts 9 | - Drastically increased efficiency of rescanning when new data is pulled in 10 | - Keyboard Navigation 11 | - Drastically increased efficiency of rescanning when new data is pulled in 12 | -------------------------------------------------------------------------------- /changelog/v5.13.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.13.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.13.1) 2 | 3 | ### Bug Fixes 4 | 5 | - Allow multiple custom post filters by new comment count (thanks @larsjohnsen) 6 | - Work around XKCD API broken multibyte encoding (thanks @kdreagle) 7 | 8 | ### Housekeeping / Other 9 | 10 | - Switch from jQuery to native in a few places (thanks @larsjohnsen) 11 | - Fix Edge deployment (thanks @erikdesjardins) 12 | -------------------------------------------------------------------------------- /changelog/v5.7.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.7.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.7.3) 2 | 3 | ### New Features 4 | 5 | - New gearIconClickAction option to configure the gear icon, defaults to opening the menu (thanks @corylulu) 6 | 7 | ### Housekeeping / Other 8 | 9 | - Subreddit filterline configuration doesn't apply to duplicates pages (thanks @larsjohnsen) 10 | - Remove unnecessary permissions in Firefox (thanks @erikdesjardins) 11 | -------------------------------------------------------------------------------- /lib/modules/hosts/memedad.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('memedad', { 6 | name: 'memedad', 7 | domains: ['memedad.com'], 8 | logo: 'https://memedad.com/favicon.ico', 9 | detect: ({ pathname }) => (/^\/meme\/([0-9]+)/i).exec(pathname), 10 | handleLink(href, [, id]) { 11 | return { 12 | type: 'IMAGE', 13 | src: `https://memedad.com/memes/${id}.jpg`, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /lib/modules/hosts/supgif.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('supgif', { 6 | name: 'Supgif', 7 | domains: ['supgif.com'], 8 | attribution: false, 9 | detect: ({ pathname }) => (/^\/c\/([\w\-]+)/i).exec(pathname), 10 | handleLink(href, [, id]) { 11 | return { 12 | type: 'IFRAME', 13 | embed: `https://www.supgif.com/embed/${id}`, 14 | fixedRatio: true, 15 | }; 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /changelog/v5.17.5.md: -------------------------------------------------------------------------------- 1 | ## [v5.17.5](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.17.5) 2 | 3 | ### New Features 4 | 5 | - Add expando support for channel-based Twitch clip URL scheme (thanks @1bakedpotato) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix storage pruning of options with default values (thanks @larsjohnsen) 10 | - Fix CLI RESStorage update (thanks @larsjohnsen) 11 | 12 | ### Housekeeping / Other 13 | 14 | - None (thanks nobody) 15 | -------------------------------------------------------------------------------- /changelog/v5.18.10.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.10](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.10) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - showImages: Restore gallery to filmstrip button 10 | - subredditManager: Fix lastViewtime being set to N/A 11 | - troubleshooter disableRES: Don't auto-navigate to frontpage 12 | 13 | ### Housekeeping / Other 14 | 15 | - Fix production build reproduciblity 16 | -------------------------------------------------------------------------------- /lib/environment/foreground/history.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { sendMessage } from './messaging'; 4 | import { isPrivateBrowsing } from './privateBrowsing'; 5 | 6 | export async function addURLToHistory(url: string): Promise { 7 | if (isPrivateBrowsing()) return; 8 | 9 | await sendMessage('addURLToHistory', url); 10 | } 11 | 12 | export function isURLVisited(url: string): Promise { 13 | return sendMessage('isURLVisited', url); 14 | } 15 | -------------------------------------------------------------------------------- /lib/modules/hosts/archiveis.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('archive.is', { 6 | name: 'archive.is', 7 | domains: ['archive.is'], 8 | logo: 'https://archive.is/favicon.ico', 9 | detect: ({ pathname }) => (/^\/(\w+)(?:\/|$)/i).exec(pathname), 10 | handleLink(href, [, code]) { 11 | return { 12 | type: 'IMAGE', 13 | src: `https://archive.fo/${code}/scr.png`, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /lib/modules/hosts/livememe.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('livememe', { 6 | name: 'livememe', 7 | domains: ['livememe.com'], 8 | logo: 'https://livememe.com/favicon.ico', 9 | detect: ({ pathname }) => (/^\/(?!edit)(\w{7})(?:\/|$)/i).exec(pathname), 10 | handleLink(href, [, id]) { 11 | return { 12 | type: 'IMAGE', 13 | src: `https://e.lvme.me/${id}.jpg`, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /changelog/v5.16.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.16.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.16.1) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - showImages gallery: Fix audio being played when preloading a video piece (thanks @larsjohnsen) 10 | - Fix date formating breaking much functionality when using certain locales (thanks @larsjohnsen) 11 | 12 | ### Housekeeping / Other 13 | 14 | - None (thanks nobody) 15 | -------------------------------------------------------------------------------- /changelog/v5.19.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.19.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.19.1) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - hosts: Fix Twitch after latest API changes (thanks @XenoBen) 10 | 11 | ### Housekeeping / Other 12 | 13 | - Load dependencies, when possible, as ES modules (thanks @larsjohnsen) 14 | - console.warn when overwritting option table, list, builder (thanks @larsjohsen) 15 | -------------------------------------------------------------------------------- /changelog/v5.22.7.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.7](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.7) 2 | 3 | ### New Features 4 | 5 | - Updated media hosts for streamja and streamwo (thanks @ElijahPepe) 6 | 7 | ### Bug Fixes 8 | 9 | - Fixes home button missing on subreddit bar (thanks @corylulu) 10 | - Disable mouse selecting on subreddit info button (thanks @tankorsmash) 11 | 12 | ### Housekeeping / Other 13 | 14 | - Dependency updates (thanks @larsjohnsen) -------------------------------------------------------------------------------- /changelog/v5.7.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.7.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.7.1) 2 | 3 | ### New Features 4 | 5 | - Tag icons appear faster (thanks @corylulu) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix the release build (thanks @erikdesjardins) 10 | - Fix hiding links and other actions in Chrome (thanks @erikdesjardins) 11 | - Reduce the likelihood of multiple tabs trying to automatically backup/restore at the same time (thanks @erikdesjardins) 12 | -------------------------------------------------------------------------------- /changelog/v5.11.8.md: -------------------------------------------------------------------------------- 1 | ## [v5.11.8](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.11.8) 2 | 3 | ### New Features 4 | 5 | - New User Tagger preset tags (thanks @pll33) 6 | - New "front" command line command (thanks @vogon101) 7 | - New streamja.com host (thanks @ngdio) 8 | 9 | ### Bug Fixes 10 | 11 | - (beta) Fix Subreddit Tagger doing nothing (thanks @erikdesjardins) 12 | 13 | ### Housekeeping / Other 14 | 15 | - Update dependencies (thanks @mc10) 16 | -------------------------------------------------------------------------------- /lib/environment/utils/api.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function apiToPromise(func: (...args: mixed[]) => void): (...args: mixed[]) => Promise { 4 | return (...args) => 5 | new Promise((resolve, reject) => { 6 | func(...args, (...results) => { 7 | if (chrome.runtime.lastError) { 8 | reject(new Error(chrome.runtime.lastError.message)); 9 | } else { 10 | resolve(results.length > 1 ? results : results[0]); 11 | } 12 | }); 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /lib/modules/hosts/ridewithgps.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('ridewithgps', { 6 | name: 'ridewithgps', 7 | domains: ['ridewithgps.com'], 8 | attribution: false, 9 | detect: ({ pathname }) => (/^\/(trips|routes)\/(\d+)/i).exec(pathname), 10 | handleLink(href, [, type, id]) { 11 | return { 12 | type: 'IFRAME', 13 | embed: `https://ridewithgps.com/${type}/${id}/embed`, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /lib/utils/__tests__/string.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import test from 'ava'; 4 | 5 | import { encode, safe } from '../string'; 6 | 7 | test('encode', t => { 8 | t.is( 9 | encode`https://example.com?url=${'https://reddit.com/r/resissues+enhancement'}`, 10 | 'https://example.com?url=https%3A%2F%2Freddit.com%2Fr%2Fresissues%2Benhancement', 11 | ); 12 | }); 13 | 14 | test('safe', t => { 15 | t.deepEqual( 16 | safe('foo'), 17 | { __safe__: 'foo' }, 18 | ); 19 | }); 20 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/browseCases/CurrentLocation.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { fullLocation } from '../../../utils'; 4 | import { Case } from '../Case'; 5 | 6 | export class CurrentLocation extends Case { 7 | static text = 'When browsing in location'; 8 | 9 | static defaultConditions = { patt: fullLocation() }; 10 | static fields = ['when browsing ', { type: 'text', id: 'patt' }]; 11 | 12 | evaluate() { 13 | return fullLocation() === this.value.patt; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/modules/hosts/vlipsy.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('vlipsy', { 6 | name: 'Vlipsy', 7 | domains: ['vlipsy.com'], 8 | logo: 'https://vlipsy.com/favicon.ico', 9 | detect: ({ pathname }) => (/^\/vlip\/(?:\w+-)*(\w+)$/).exec(pathname), 10 | handleLink(href, [, id]) { 11 | return { 12 | type: 'IFRAME', 13 | embed: `https://vlipsy.com/embed/${id}`, 14 | fixedRatio: true, 15 | }; 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /changelog/v5.18.14.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.14](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.14) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix Google Drive backups (thanks @larsjohnsen) 6 | - Fix dashboard widget fetch URL (thanks @larsjohnsen) 7 | 8 | ### Housekeeping / Other 9 | 10 | - Make local development faster (thanks @BenMcGarry) 11 | - Remove vestigial CSS from Liquipedia expandos (thanks @BenMcGarry) 12 | - Lockdown extension context CSP (thanks @erikdesjardins) 13 | -------------------------------------------------------------------------------- /lib/css/modules/_sourceSnudown.scss: -------------------------------------------------------------------------------- 1 | .viewSource { 2 | > .bottom-area::before { 3 | display: none; 4 | } 5 | 6 | textarea { 7 | background: repeating-linear-gradient(-225deg, transparent, transparent 40px, rgba(166, 166, 166, .05) 40px, rgba(166, 166, 166, .05) 80px), white; 8 | 9 | &[readonly] { 10 | background: repeating-linear-gradient(-225deg, transparent, transparent 40px, rgba(166, 166, 166, .1) 40px, rgba(166, 166, 166, .1) 80px), white; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/css/modules/_subredditInfo.scss: -------------------------------------------------------------------------------- 1 | .subredditInfoToolTip { 2 | .subredditLabel { 3 | float: left; 4 | width: 140px; 5 | margin-bottom: 12px; 6 | } 7 | 8 | .subredditDetail { 9 | float: left; 10 | width: 240px; 11 | margin-bottom: 12px; 12 | } 13 | 14 | .blueButton { 15 | float: right; 16 | margin-left: 8px; 17 | } 18 | 19 | .redButton { 20 | float: right; 21 | margin-left: 8px; 22 | } 23 | 24 | .bottomButtons { 25 | user-select: none; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/modules/hosts/poly.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('poly', { 6 | name: 'Poly', 7 | domains: ['poly.google.com'], 8 | // Embed already contains attribution 9 | attribution: false, 10 | detect: ({ pathname }) => (/^\/view\/([a-zA-Z0-9-]+)\/?$/i).exec(pathname), 11 | handleLink(href, [, id]) { 12 | return { 13 | type: 'IFRAME', 14 | embed: `https://poly.google.com/view/${id}/embed`, 15 | }; 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /changelog/v5.4.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.4.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.4.1) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix User Tagger not applying to newly-loaded child comments (thanks @erikdesjardins) 6 | - Fix color options not appearing when an option they depend on is toggled (thanks @erikdesjardins) 7 | - Fix submit page title character count not working (thanks @erikdesjardins) 8 | - Fix Night Mode being toggled on for some users when installing 5.4.0 (thanks @erikdesjardins) 9 | -------------------------------------------------------------------------------- /changelog/v5.8.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.8.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.8.2) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix subreddit autocomplete suggestions (thanks @erikdesjardins) 6 | - Fix encoding issue when restoring Google Drive backups (thanks @larsjohnsen) 7 | - Fix submitting comments with the Big Editor (thanks @erikdesjardins) 8 | - Fix snag.gy expandos (thanks @erikdesjardins) 9 | - Fix error in Style Tweaks on pages without a sidebar (thanks @erikdesjardins) 10 | -------------------------------------------------------------------------------- /lib/modules/hosts/imgflip.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('imgflip', { 6 | name: 'imgflip', 7 | domains: ['imgflip.com'], 8 | logo: 'https://imgflip.com/favicon02.png', 9 | detect: ({ pathname }) => (/^\/(i|gif)\/([a-z0-9]+)/).exec(pathname), 10 | handleLink(href, [, type, id]) { 11 | return { 12 | type: 'IMAGE', 13 | src: `https://i.imgflip.com/${id}.${type === 'gif' ? 'gif' : 'jpg'}`, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /lib/modules/hosts/makeameme.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('makeameme', { 6 | name: 'makeameme', 7 | domains: ['makeameme.org'], 8 | logo: 'https://makeameme.org/images/favicons/favicon-32x32.png', 9 | detect: ({ pathname }) => (/^\/meme\/([\w\-]+)/i).exec(pathname), 10 | handleLink(href, [, id]) { 11 | return { 12 | type: 'IMAGE', 13 | src: `https://makeameme.org/media/created/${id}.jpg`, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /lib/modules/hosts/snag.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('snag', { 6 | name: 'snag.gy', 7 | logo: 'https://snaggys3static-snaggy.netdna-ssl.com/favicon.png', 8 | domains: ['snag.gy'], 9 | detect: ({ pathname }) => (/^\/(\w+)(?:\.(\w+))?$/i).exec(pathname), 10 | handleLink(href, [, id, extension]) { 11 | return { 12 | type: 'IMAGE', 13 | src: `https://i.snag.gy/${id}.${extension || 'jpg'}`, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /changelog/v5.18.9.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.9](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.9) 2 | 3 | ### New Features 4 | 5 | - new hosts: redgifs 6 | 7 | ### Bug Fixes 8 | 9 | - userTagger list: Restore pagination, add search (thanks @larsjohnsen) 10 | - filteReddit expando filter: Fix false negative (thanks @larsjohnsen) 11 | - accountSwitcher: Show loading icon when switching accounts (thanks @FrankSalmick) 12 | 13 | ### Housekeeping / Other 14 | 15 | - None (thanks nobody) 16 | -------------------------------------------------------------------------------- /changelog/v5.18.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.3) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix hide button showing 'unhidehide' when noCtrlF is disabled 10 | - accountSwitcher: Fix otp (2FA) not getting prompted 11 | - subredditManager: Fix dropdrop getting closed on when sorting 12 | - userTagger: Fix ignore button position 13 | 14 | ### Housekeeping / Other 15 | 16 | - None (thanks nobody) 17 | -------------------------------------------------------------------------------- /lib/css/modules/_version.scss: -------------------------------------------------------------------------------- 1 | #res-concurrent-installs { 2 | position: fixed; 3 | bottom: 20px; 4 | left: 20px; 5 | right: 20px; 6 | padding: 10px 0; 7 | border: 3px rgb(255, 180, 180) solid; 8 | color: black; 9 | background: rgb(255, 220, 220); 10 | font-size: 20px; 11 | text-align: center; 12 | 13 | ul { 14 | font-weight: bold; 15 | margin: .3em; 16 | } 17 | 18 | li { 19 | display: inline-block; 20 | } 21 | 22 | li:not(:last-child)::after { 23 | content: ', '; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/modules/hosts/streamja.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('streamja', { 6 | name: 'streamja', 7 | domains: ['streamja.com'], 8 | logo: 'https://streamja.com/favicon.ico', 9 | detect: ({ pathname }) => (/^\/([^\/]+)$/i).exec(pathname), 10 | handleLink(href, [, code]) { 11 | const embed = `https://streamja.com/embed/${code}`; 12 | return { 13 | type: 'IFRAME', 14 | embed, 15 | fixedRatio: true, 16 | }; 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /changelog/v5.16.9.md: -------------------------------------------------------------------------------- 1 | ## [v5.16.9](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.16.9) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix nightmode issue with links on old Reddit profiles (thanks @XenoBen) 10 | - Thing isNSFW: Add support for commentsLinklist (thanks @larsjohnsen) 11 | - neverEndingReddit: Fix support for moderation log on pages > 2 (thanks @larsjohnsen) 12 | 13 | ### Housekeeping / Other 14 | 15 | - None (thanks nobody) 16 | -------------------------------------------------------------------------------- /changelog/v5.9.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.9.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.9.4) 2 | 3 | ### New Features 4 | 5 | - New faviconNotificationBGColor option (thanks @BenMcGarry) 6 | - Expanding direct links to SVGs (thanks @erikdesjardins) 7 | 8 | ### Bug Fixes 9 | 10 | - Fix nightmode styles for crossposts (thanks @BenMcGarry) 11 | - Fix nightmode styles for API docs (thanks @BenMcGarry) 12 | 13 | ### Housekeeping / Other 14 | 15 | - Make bundle smaller (thanks @mc10, @erikdesjardins) 16 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/PostTitle.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { PatternCase } from '../Case'; 4 | 5 | export class PostTitle extends PatternCase { 6 | static text = 'Post title'; 7 | 8 | static fields = ['post\'s title contains ', { type: 'text', id: 'patt' }]; 9 | 10 | trueText = `title contains ${this.conditions.patt}`; 11 | 12 | value = this.build(false); 13 | 14 | evaluate(thing: *) { 15 | const title = thing.getTitle(); 16 | return this.value.some(v => v.test(title)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /changelog/v5.2.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.2.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.2.2) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix some Comment Navigator CSS applying to unintended elements (thanks @gavin19) 6 | - Fix expandos occasionally not working when loading a new Never Ending Reddit Page (thanks @larsjohnsen) 7 | - Fix moveToTopComment keyboard shortcut not scrolling (thanks @erikdesjardins) 8 | - Fix Night Mode being applied to mod.reddit.com when enabling Night Mode on other tabs (thanks @erikdesjardins) 9 | -------------------------------------------------------------------------------- /changelog/v5.9.6.md: -------------------------------------------------------------------------------- 1 | ## [v5.9.6](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.9.6) 2 | 3 | ### New Features 4 | 5 | - Add YouTube video time overlay to the thumbnail, like v.reddit (thanks @wojtekmaj) 6 | 7 | ### Bug Fixes 8 | 9 | - (beta) Fix i18n of builder add item text (thanks @larsjohnsen) 10 | - (beta) Fix forced reflow when selecting entries (thanks @larsjohnsen) 11 | 12 | ### Housekeeping / Other 13 | 14 | - (beta) Don't display simple string filters as regex (thanks @larsjohnsen) 15 | -------------------------------------------------------------------------------- /lib/modules/redditUserInfo.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Module } from '../core/module'; 4 | 5 | export const module: Module<*> = new Module('redditUserInfo'); 6 | 7 | module.moduleName = 'redditUserInfoName'; 8 | module.category = 'usersCategory'; 9 | module.description = 'redditUserInfoDesc'; 10 | module.options = { 11 | hideAuthorTooltip: { 12 | type: 'boolean', 13 | value: false, 14 | description: 'redditUserInfoHideDesc', 15 | title: 'redditUserInfoHideTitle', 16 | bodyClass: true, 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /lib/modules/requestPermissions.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Module } from '../core/module'; 4 | 5 | export const module: Module<*> = new Module('requestPermissions'); 6 | 7 | module.moduleName = 'requestPermissionsName'; 8 | module.description = 'requestPermissionsDesc'; 9 | module.category = 'aboutCategory'; 10 | module.disabledByDefault = true; 11 | module.permissions = { 12 | get requiredPermissions() { return (chrome: any).runtime.getManifest().optional_permissions; }, // eslint-disable-line no-undef 13 | }; 14 | -------------------------------------------------------------------------------- /changelog/v5.18.11.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.11](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.11) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix browser detection for new Edge (thanks @BenMcGarry) 10 | - Fix typo in NeverEndingReddit (thanks @larsjohnsen) 11 | - Fix lastVisited sorting in Subreddit Manager (thanks @larsjohnsen) 12 | - Fix Google Drive backup restoring (thanks @erikdesjardins) 13 | 14 | ### Housekeeping / Other 15 | 16 | - None (thanks nobody) 17 | -------------------------------------------------------------------------------- /lib/modules/hosts/redditpoll.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('redditpoll', { 6 | name: 'redditpoll', 7 | domains: ['reddit.com'], 8 | attribution: false, 9 | detect({ pathname }) { return pathname.match(/^\/poll\/(\w+)/); }, 10 | handleLink(href, [, id]) { 11 | return { 12 | type: 'IFRAME', 13 | expandoClass: 'selftext', 14 | embed: `https://www.reddit.com/poll/${id}`, 15 | height: '500px', 16 | width: '700px', 17 | }; 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /lib/modules/hosts/adultswim.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('adultswim', { 6 | name: 'Adult Swim', 7 | domains: ['adultswim.com'], 8 | logo: 'https://www.adultswim.com/favicon.ico', 9 | detect: ({ pathname }) => (/^\/videos\/([^\/]+\/[^\/]+)(?:\/|$)/i).exec(pathname), 10 | handleLink(href, [, path]) { 11 | return { 12 | type: 'IFRAME', 13 | embed: `https://www.adultswim.com/utilities/embed/${path}`, 14 | fixedRatio: true, 15 | }; 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /changelog/v5.18.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.1) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - filteReddit: Fix "hide permanently" 10 | - showImages: Simplify sfwHistory, make the viewed expando indicator less distingushable, fix download button 11 | - notifications: Fix compatibility with Toolbox 12 | - accountSwitcher: Fix usernames being shown in lower case 13 | 14 | ### Housekeeping / Other 15 | 16 | - None (thanks nobody) 17 | -------------------------------------------------------------------------------- /changelog/v5.22.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.3) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - view full context button: Restore position to "infobox" 10 | - filteReddit filterline: Fix buttons styling 11 | - Fix hideCommentsOnHeaderDoubleClick 12 | - watcher: Don't register posts without id as duplicates, which may cause deleted posts to be removed from DOM 13 | 14 | ### Housekeeping / Other 15 | 16 | - None (thanks nobody) 17 | -------------------------------------------------------------------------------- /lib/environment/background/tabs.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addListener } from './messaging'; 4 | 5 | addListener('openNewTabs', ({ urls, focusIndex }, { tab }) => { 6 | urls.forEach((url, i) => { 7 | chrome.tabs.create({ 8 | url, 9 | active: i === focusIndex, 10 | index: tab.index + 1 + i, 11 | openerTabId: tab.id, 12 | // Firefox needs cookieStoreId to open in correct container 13 | ...(process.env.BUILD_TARGET === 'firefox' ? { cookieStoreId: tab.cookieStoreId } : {}), 14 | }); 15 | }); 16 | }); 17 | 18 | -------------------------------------------------------------------------------- /lib/modules/hosts/streamwo.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('streamwo', { 6 | name: 'streamwo', 7 | domains: ['streamwo.com'], 8 | logo: 'https://streamwo.com/favicon.png', 9 | detect: ({ pathname }) => (/^\/([^\/]+)$/i).exec(pathname), 10 | handleLink(href, [, code]) { 11 | return { 12 | type: 'VIDEO', 13 | loop: true, 14 | sources: [{ 15 | source: `https://playbain.com/${code}.mp4`, 16 | type: 'video/mp4', 17 | }], 18 | }; 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /tests/commentTools.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'ignores source textareas': browser => { 3 | browser 4 | .url('https://en.reddit.com/r/RESIntegrationTests/comments/5uicy8/comment_tools/') 5 | .waitForElementVisible('#siteTable') 6 | .click('.thing.link .viewSource a') 7 | .waitForElementVisible('.thing.link .viewSource textarea') 8 | .click('.thing.link .viewSource textarea') 9 | .assert.not.elementPresent('.markdownEditor-wrapper') 10 | .assert.not.elementPresent('.livePreview') 11 | .end(); 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/browseCases/Dow.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Case } from '../Case'; 4 | 5 | const days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; 6 | 7 | export class Dow extends Case { 8 | static text = 'Day of week'; 9 | 10 | static defaultConditions = { days: [] }; 11 | static fields = ['current day of the week is ', { type: 'checkset', items: days, id: 'days' }]; 12 | 13 | evaluate() { 14 | const currentDOW = days[new Date().getDay()]; 15 | return this.value.days.includes(currentDOW); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/modules/hosts/instagram.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('instagram', { 6 | name: 'Instagram', 7 | domains: ['instagram.com', 'instagr.am'], 8 | attribution: false, 9 | detect: ({ pathname }) => (/^\/p\/([a-z0-9_\-]{10,})(?:\/|$)/i).exec(pathname), 10 | handleLink: (href, [, id]) => ({ 11 | type: 'IFRAME', 12 | expandoClass: 'image', 13 | embed: `https://instagram.com/p/${id}/embed/captioned/`, 14 | width: '600px', 15 | height: '700px', 16 | }), 17 | }); 18 | -------------------------------------------------------------------------------- /lib/modules/hosts/steampowered.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('steampowered', { 6 | name: 'Steam', 7 | logo: 'https://store.steampowered.com/favicon.ico', 8 | domains: ['steampowered.com', 'steamusercontent.com'], 9 | detect: ({ pathname }) => (/^\/ugc\/(\d{15,20}\/\w{40})(?:$|\/)/i).exec(pathname), 10 | handleLink(href, [pathname]) { 11 | return { 12 | type: 'IMAGE', 13 | src: `http://images.akamai.steamusercontent.com${pathname}`, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /lib/modules/hosts/xboxdvr.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('xboxdvr', { 6 | name: 'XboxDVR', 7 | domains: ['xboxdvr.com'], 8 | logo: 'https://gamerdvr.com/assets/favicon-240671aabcbf14dcaa1f3f2b406091d2.png', 9 | detect: ({ pathname }) => (/^\/(gamer\/[^\/]+\/\w+\/\d+)(?:\/|$)/).exec(pathname), 10 | handleLink(href, [, path]) { 11 | return { 12 | type: 'IFRAME', 13 | embed: `https://xboxdvr.com/${path}/embed`, 14 | fixedRatio: true, 15 | }; 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /changelog/v5.22.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.4) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - betteReddit truncateLongLinks: Don't truncate on the comment page 10 | - watcher: Don't register posts without a placeholder id as duplicates:Otherwise they may be inadvertently removed from the DOM 11 | - showImages gallery: Fix videos starting inadvertently when scrolling 12 | 13 | ### Housekeeping / Other 14 | 15 | - None (thanks nobody) 16 | -------------------------------------------------------------------------------- /lib/modules/hosts/gamerdvr.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('gamerdvr', { 6 | name: 'GamerDVR', 7 | domains: ['gamerdvr.com'], 8 | logo: 'https://gamerdvr.com/assets/favicon-240671aabcbf14dcaa1f3f2b406091d2.png', 9 | detect: ({ pathname }) => (/^\/(gamer\/[^\/]+\/\w+\/\d+)(?:\/|$)/).exec(pathname), 10 | handleLink(href, [, path]) { 11 | return { 12 | type: 'IFRAME', 13 | embed: `https://gamerdvr.com/${path}/embed`, 14 | fixedRatio: true, 15 | }; 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /lib/modules/hosts/memecrunch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('memecrunch', { 6 | name: 'memecrunch', 7 | domains: ['memecrunch.com'], 8 | logo: 'https://memecrunch.com/static/favicon.ico', 9 | detect: ({ pathname }) => (/^\/meme\/([0-9A-Z]+)\/([\w\-]+)(\/image\.(png|jpg))?/i).exec(pathname), 10 | handleLink(href, [, id, format]) { 11 | return { 12 | type: 'IMAGE', 13 | src: `https://memecrunch.com/meme/${id}/${format || 'null'}/image.png`, 14 | }; 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /lib/modules/hosts/vlive.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('vlive', { 6 | name: 'VLive', 7 | domains: ['vlive.tv'], 8 | logo: 'https://www.vlive.tv/favicon.ico', 9 | detect: ({ pathname }) => (/^\/(?:video)\/([0-9]+)/i).exec(pathname), 10 | handleLink(href, [, id]) { 11 | const embed = `https://vlive.tv/embed/${id}`; 12 | return { 13 | type: 'IFRAME', 14 | embed, 15 | embedAutoplay: `${embed}?autoPlay=true`, 16 | fixedRatio: true, 17 | }; 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /lib/environment/foreground/messaging.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { createMessageHandler } from '../utils/messaging'; 4 | import { apiToPromise } from '../utils/api'; 5 | 6 | const _sendMessage = apiToPromise(chrome.runtime.sendMessage); 7 | 8 | const { 9 | _handleMessage, 10 | sendMessage, 11 | addListener, 12 | } = createMessageHandler(obj => _sendMessage(obj)); 13 | 14 | chrome.runtime.onMessage.addListener((obj, sender, sendResponse) => _handleMessage(obj, sendResponse)); 15 | 16 | export { 17 | sendMessage, 18 | addListener, 19 | }; 20 | -------------------------------------------------------------------------------- /lib/images/expandoPadlock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /lib/images/expandoVideo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /lib/modules/hosts/hastebin.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('hastebin', { 6 | name: 'hastebin', 7 | domains: ['hastebin.com'], 8 | attribution: false, 9 | detect: ({ pathname }) => (/^\/(?:raw\/)?([^\/]+)/i).exec(pathname), 10 | handleLink(href, [, filename]) { 11 | return { 12 | type: 'IFRAME', 13 | expandoClass: 'selftext', 14 | muted: true, 15 | embed: `https://hastebin.com/${filename}`, 16 | height: '500px', 17 | width: '800px', 18 | }; 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /lib/environment/background/ajax.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { fromPairs } from 'lodash-es'; 4 | import { addListener } from './messaging'; 5 | 6 | addListener('ajax', async ({ method, url, headers, data, credentials }) => { 7 | const rawResponse = await fetch(url, { 8 | method, 9 | headers, 10 | credentials, 11 | body: data, 12 | }); 13 | 14 | return { 15 | ok: rawResponse.ok, 16 | status: rawResponse.status, 17 | headers: fromPairs(Array.from(rawResponse.headers.entries())), 18 | text: await rawResponse.text(), 19 | }; 20 | }); 21 | -------------------------------------------------------------------------------- /lib/images/expandoVideo-active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /lib/modules/hosts/clyp.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('clyp', { 6 | name: 'clyp', 7 | domains: ['clyp.it'], 8 | logo: 'https://d2cjvbryygm0lr.cloudfront.net/favicon.ico', 9 | detect: ({ pathname }) => (/^\/(playlist\/)?([A-Za-z0-9]+)/i).exec(pathname), 10 | handleLink(href, [, playlist, id]) { 11 | return { 12 | type: 'IFRAME', 13 | embed: `https://clyp.it/${playlist ? 'playlist/' : ''}${id}/widget`, 14 | height: '160px', 15 | width: '600px', 16 | }; 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/browseCases/CurrentSub.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { currentSubreddit } from '../../../utils'; 4 | import { Case } from '../Case'; 5 | 6 | export class CurrentSub extends Case { 7 | static text = 'When browsing a subreddit'; 8 | 9 | static defaultConditions = { patt: '' }; 10 | static fields = ['when browsing /r/', { type: 'text', id: 'patt' }]; 11 | 12 | value = Case.buildRegex(this.conditions.patt); 13 | 14 | evaluate() { 15 | const sub = currentSubreddit(); 16 | return !!sub && this.value.test(sub); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/modules/hosts/liveleak.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('liveleak', { 6 | name: 'LiveLeak', 7 | domains: ['liveleak.com'], 8 | logo: 'https://www.liveleak.com/favicon.ico', 9 | detect: ({ pathname, search }) => (pathname === '/view' && search), 10 | handleLink: (href, query) => ({ 11 | type: 'IFRAME', 12 | embed: `https://www.liveleak.com/ll_embed${query}`, 13 | embedAutoplay: `https://www.liveleak.com/ll_embed${query}&autostart=true`, 14 | fixedRatio: true, 15 | }), 16 | }); 17 | -------------------------------------------------------------------------------- /changelog/v5.11.7.md: -------------------------------------------------------------------------------- 1 | ## [v5.11.7](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.11.7) 2 | 3 | ### New Features 4 | 5 | - Account Switcher now works in the redesign (thanks @andytuba) 6 | - RES settings gear menu now works in the redesign (thanks @andytuba) 7 | - NSFW toggle state updates across tabs (thanks @larsjohnsen) 8 | - Stylesheet toggleKey option autocompletes available toggles (thanks @larsjohnsen) 9 | - New Keyboard Navigation linkNumberAltModeModifier option to disable or change the alt-number shortcuts (thanks @larsjohnsen) 10 | -------------------------------------------------------------------------------- /lib/modules/hosts/strawpollcom.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('strawpoll.com', { 6 | name: 'strawpoll.com', 7 | domains: ['strawpoll.com'], 8 | attribution: false, 9 | detect: ({ pathname }) => (/^\/(?:embed\/)?([a-z0-9]+)/i).exec(pathname), 10 | handleLink(href, [, id]) { 11 | return { 12 | type: 'IFRAME', 13 | expandoClass: 'selftext', 14 | muted: true, 15 | embed: `https://strawpoll.com/embed/${id}`, 16 | height: '450px', 17 | width: '700px', 18 | }; 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /lib/modules/hosts/strawpollme.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('strawpoll', { 6 | name: 'strawpoll.me', 7 | domains: ['strawpoll.me'], 8 | attribution: false, 9 | detect: ({ pathname }) => (/^\/(?:embed_\d\/)?(\d+)/i).exec(pathname), 10 | handleLink(href, [, uid]) { 11 | return { 12 | type: 'IFRAME', 13 | expandoClass: 'selftext', 14 | muted: true, 15 | embed: `https://www.strawpoll.me/embed_1/${uid}`, 16 | height: '500px', 17 | width: '700px', 18 | }; 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /changelog/v4.3.0.4.md: -------------------------------------------------------------------------------- 1 | ## v4.3.0.4 2 | 3 | ### New features 4 | 5 | - added subscribe button to subreddit hover popup 6 | - added m.imgur.com support 7 | 8 | ### Bug fixes 9 | 10 | - various fixes for Firefox 23+ 11 | - fixed a flickr expando issue 12 | - CSS fix for hidden userbar toggle 13 | - fixed an issue with hyphens in usernames 14 | - fixed an issue with +shortcut button not appearing at /subreddits (formerly /reddits) 15 | - various code cleanup / housekeeping (thanks @mc10!) 16 | - Yet more Opera 12.* specific tweaks to regain functionality in Opera 17 | 18 | -------------------------------------------------------------------------------- /lib/modules/backupAndRestore/providers/Provider.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | /* eslint-disable no-unused-vars */ 4 | export class Provider { 5 | static key = 'abstract'; 6 | static text = 'Abstract'; 7 | static notifyBackupDone = true; 8 | static supportsAutomaticBackups = false; 9 | 10 | init({}: *): Promise { // eslint-disable-line no-empty-pattern 11 | return Promise.resolve(this); 12 | } 13 | 14 | read(): Promise { throw new Error('unimplemented'); } 15 | 16 | write(data: string): Promise { throw new Error('unimplemented'); } 17 | } 18 | -------------------------------------------------------------------------------- /lib/modules/hosts/navertv.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('Naver', { 6 | name: 'Naver', 7 | domains: ['tv.naver.com'], 8 | logo: 'https://www.naver.com/favicon.ico?1', 9 | detect: ({ pathname }) => (/^\/(?:v)\/([0-9]+)/i).exec(pathname), 10 | handleLink(href, [, id]) { 11 | const embed = `https://tv.naver.com/embed/${id}`; 12 | return { 13 | type: 'IFRAME', 14 | embed, 15 | embedAutoplay: `${embed}?autoPlay=true`, 16 | fixedRatio: true, 17 | }; 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /lib/environment/background/messaging.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { createMessageHandler } from '../utils/messaging'; 4 | import { apiToPromise } from '../utils/api'; 5 | 6 | const _sendMessage = apiToPromise(chrome.tabs.sendMessage); 7 | 8 | const { 9 | _handleMessage, 10 | sendMessage, 11 | addListener, 12 | } = createMessageHandler((obj, tabId) => _sendMessage(tabId, obj)); 13 | 14 | chrome.runtime.onMessage.addListener((obj, sender, sendResponse) => _handleMessage(obj, sendResponse, sender)); 15 | 16 | export { 17 | sendMessage, 18 | addListener, 19 | }; 20 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/browseCases/BrowsingFrontPage.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { 4 | currentMultireddit, 5 | currentSubreddit, 6 | currentUserProfile, 7 | isPageType, 8 | } from '../../../utils'; 9 | import { Case } from '../Case'; 10 | 11 | export class BrowsingFrontPage extends Case { 12 | static text = 'Browsing the front page'; 13 | static fields = ['when browsing the front page']; 14 | 15 | evaluate() { 16 | return isPageType('linklist') && 17 | !currentSubreddit() && 18 | !currentMultireddit() && 19 | !currentUserProfile(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/commentCases/IsRead.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Case } from '../Case'; 4 | import * as ReadComments from '../../readComments'; 5 | import * as Modules from '../../../core/modules'; 6 | 7 | export class IsRead extends Case { 8 | static text = 'Read'; 9 | 10 | static fields = ['comment is read']; 11 | static get disabled(): boolean { 12 | return !Modules.isEnabled(ReadComments); 13 | } 14 | 15 | static unique = true; 16 | 17 | trueText = 'read'; 18 | 19 | evaluate(thing: *) { 20 | return ReadComments.isRead(thing); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /changelog/v5.20.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.20.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.20.4) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - showImages DASH player: Load first fragment before starting playback, to avoid potential race condition in Firefox 10 | - host v.redd.it: Disable [forceReplaceNativeExpando](https://www.reddit.com/#res:settings/showImages/forceReplaceNativeExpando) by default, so Reddit's player appears in the comment section 11 | 12 | ### Housekeeping / Other 13 | 14 | - None (thanks nobody) 15 | -------------------------------------------------------------------------------- /lib/modules/hosts/pornhub.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('pornhub', { 6 | name: 'Pornhub', 7 | domains: [ 8 | 'www.pornhub.com', 9 | 'www.pornhubpremium.com', 10 | ], 11 | attribution: false, 12 | detect: ({ searchParams }) => searchParams.get('viewkey'), 13 | handleLink(href, path) { 14 | const url = `https://www.pornhub.com/embed/${path}`; 15 | 16 | return { 17 | type: 'IFRAME', 18 | embed: url, 19 | embedAutoplay: `${url}?autoplay=1`, 20 | fixedRatio: true, 21 | }; 22 | }, 23 | }); 24 | -------------------------------------------------------------------------------- /lib/utils/time.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const MINUTE = 1000 * 60; 4 | export const HOUR = 60 * MINUTE; 5 | export const DAY = 24 * HOUR; 6 | export const WEEK = 7 * DAY; 7 | 8 | export function fromSecondsToTime(timeInSeconds: number) { 9 | const seconds = timeInSeconds % 60; 10 | const minutes = Math.floor(timeInSeconds / 60) % 60; 11 | const hours = Math.floor(timeInSeconds / 3600); 12 | 13 | const time = [minutes, seconds]; 14 | if (hours > 0) { 15 | time.unshift(hours); 16 | } 17 | 18 | return time.map(part => String(part).padStart(2, '0')).join(':'); 19 | } 20 | -------------------------------------------------------------------------------- /changelog/v5.15.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.15.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.15.2) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix issue on Firefox where initial scroll on comment pages may be incorrect when filters are enabled (thanks @larsjohnsen) 10 | 11 | ### Housekeeping / Other 12 | 13 | - showImages: Unload media when collapsing where possible (thanks @larsjohnsen) 14 | - Thing: Add debug function `getThingIsVisibleInconsistencies` to check that method Thing#isVisible works correctly (thanks @larsjohnsen) 15 | -------------------------------------------------------------------------------- /lib/css/modules/_noParticipation.scss: -------------------------------------------------------------------------------- 1 | .res-noParticipation { 2 | &.res-noParticipation-disableVoteButtons { 3 | .arrow.up:not(.upmod), 4 | .arrow.down:not(.downmod) { 5 | visibility: hidden; 6 | } 7 | } 8 | 9 | &.res-noParticipation-disableCommentTextarea { 10 | .usertext textarea[disabled] { 11 | background-color: #ccc; 12 | } 13 | } 14 | } 15 | 16 | .RES-spoiler { 17 | &-title { 18 | font-style: italic; 19 | text-decoration: dotted underline; 20 | cursor: help; 21 | } 22 | 23 | &:not(:hover):not(:active) &-contents { 24 | display: none; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/css/modules/_wheelBrowse.scss: -------------------------------------------------------------------------------- 1 | @use 'sass:math'; 2 | 3 | $full-width: 32px; 4 | 5 | .res-wheel-browse { 6 | position: relative; 7 | width: 16px; 8 | height: 16px; 9 | transition: width .1s linear; 10 | border-radius: 5px; 11 | cursor: crosshair; 12 | background-color: rgba(0, 0, 0, .24); 13 | overflow: hidden; 14 | 15 | &:hover { 16 | width: $full-width; 17 | } 18 | 19 | &-gallery { 20 | position: absolute; 21 | width: math.div($full-width, 2); 22 | height: 100%; 23 | left: math.div($full-width, 2); 24 | background-color: rgba(255, 0, 0, .24); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/modules/hosts/bime.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('bime', { 6 | name: 'Bime Analytics Dashboards', 7 | domains: ['bime.io'], 8 | logo: 'https://a.bime.io/assets/favicons/favicon.ico', 9 | detect: ({ href }) => (/https?:\/\/([^.]+)\.bime\.io(?:\/([a-z0-9_-]+))+/i).exec(href), 10 | handleLink: (href, [, user, dashboardId]) => ({ 11 | type: 'IFRAME', 12 | embed: `https://${user}.bime.io/dashboard/${dashboardId}`, 13 | expandoClass: 'selftext', 14 | width: '960px', 15 | height: '540px', 16 | }), 17 | }); 18 | -------------------------------------------------------------------------------- /lib/modules/spoilerTags.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Module } from '../core/module'; 4 | 5 | export const module: Module<*> = new Module('spoilerTags'); 6 | 7 | module.moduleName = 'spoilerTagsName'; 8 | module.category = 'appearanceCategory'; 9 | module.description = 'spoilerTagsDesc'; 10 | module.include = [ 11 | 'profile', 12 | ]; 13 | module.bodyClass = true; 14 | module.options = { 15 | transition: { 16 | title: 'spoilerTagsTransitionTitle', 17 | type: 'boolean', 18 | value: true, 19 | description: 'spoilerTagsTransitionDesc', 20 | bodyClass: true, 21 | }, 22 | }; 23 | -------------------------------------------------------------------------------- /lib/css/modules/_showParent.scss: -------------------------------------------------------------------------------- 1 | #parentCommentWrapper { 2 | position: absolute; 3 | left: 10px; 4 | right: 10px; 5 | } 6 | 7 | .parentArrow { 8 | text-align: center; 9 | margin-top: -5px; 10 | margin-bottom: 5px; 11 | } 12 | 13 | .res-showParent-direction-up { 14 | .parentArrow::before, 15 | .parentArrow::after { 16 | padding: 1ex; 17 | content: '↓'; 18 | } 19 | } 20 | 21 | .res-showParent-direction-down { 22 | .parentArrow::before, 23 | .parentArrow::after { 24 | padding: 1ex; 25 | content: '↑'; 26 | } 27 | } 28 | 29 | a.bylink.parentlink { 30 | float: right; 31 | } 32 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/Username.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { PatternCase } from '../Case'; 4 | 5 | export class Username extends PatternCase { 6 | static text = 'Username'; 7 | 8 | static thingToCriterion(thing: *) { return thing.getAuthor(); } 9 | 10 | static fields = ['posted by /u/', { type: 'text', id: 'patt' }]; 11 | 12 | trueText = `by ${this.conditions.patt}`; 13 | 14 | value = this.build(true); 15 | 16 | evaluate(thing: *) { 17 | const user = thing.getAuthor(); 18 | if (!user) return null; 19 | return this.value.some(v => v.test(user)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/modules/hosts/coub.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('coub', { 6 | name: 'Coub', 7 | domains: ['coub.com'], 8 | detect: ({ pathname }) => (/^\/(?:view|embed)\/(\w+)(\.gifv)?/i).exec(pathname), 9 | handleLink(href, [, hash, isGifv]) { 10 | const src = isGifv ? 11 | `https://coub.com/view/${hash}.gifv?res=true` : 12 | `https://coub.com/embed/${hash}?autoplay=true&res=true`; 13 | 14 | return { 15 | type: 'IFRAME', 16 | muted: !!isGifv, 17 | embed: src, 18 | fixedRatio: true, 19 | }; 20 | }, 21 | }); 22 | -------------------------------------------------------------------------------- /lib/modules/hosts/defaultVideo.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('defaultVideo', { 6 | name: 'defaultVideo', 7 | domains: [], 8 | detect: ({ pathname }) => (/\.(webm|mp4|ogv|3gp|mkv)$/i).exec(pathname), 9 | handleLink(href, [, extension]) { 10 | // Change ogv to ogg format. 11 | if (extension === 'ogv') extension = 'ogg'; 12 | 13 | const format = `video/${extension}`; 14 | 15 | return { 16 | type: 'VIDEO', 17 | sources: [{ 18 | source: href, 19 | type: format, 20 | }], 21 | }; 22 | }, 23 | }); 24 | -------------------------------------------------------------------------------- /tests/newCommentCount.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'subscribing to threads': browser => { 3 | browser 4 | .url('https://en.reddit.com/r/RESIntegrationTests/comments/5xkz4j/subscribing_to_threads/') 5 | .waitForElementVisible('#REScommentSubToggle') 6 | .assert.containsText('#REScommentSubToggle', 'subscribe') 7 | .click('#REScommentSubToggle') 8 | .assert.containsText('#REScommentSubToggle', 'unsubscribe') 9 | .refresh() 10 | .waitForElementVisible('#REScommentSubToggle') 11 | .assert.containsText('#REScommentSubToggle', 'unsubscribe') 12 | .end(); 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /lib/environment/background/session.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addListener } from './messaging'; 4 | 5 | const session = new Map(); 6 | addListener('session', ([operation, key, value]) => { 7 | switch (operation) { 8 | case 'get': 9 | return session.get(key); 10 | case 'set': 11 | session.set(key, value); 12 | break; 13 | case 'delete': 14 | return session.delete(key); 15 | case 'has': 16 | return session.has(key); 17 | case 'clear': 18 | return session.clear(); 19 | default: 20 | throw new Error(`Invalid session operation: ${operation}`); 21 | } 22 | }); 23 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/browseCases/CurrentUserProfile.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { currentUserProfile } from '../../../utils'; 4 | import { Case } from '../Case'; 5 | 6 | export class CurrentUserProfile extends Case { 7 | static text = 'When browsing a user profile'; 8 | 9 | static defaultConditions = { patt: '' }; 10 | static fields = ['when browsing /u/', { type: 'text', id: 'patt' }, '\'s posts']; 11 | 12 | value = Case.buildRegex(this.conditions.patt); 13 | 14 | evaluate() { 15 | const user = currentUserProfile(); 16 | return !!user && this.value.test(user); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/modules/hosts/vimeo.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('vimeo', { 6 | name: 'vimeo', 7 | domains: ['vimeo.com'], 8 | attribution: false, 9 | detect: ({ pathname }) => (/^\/([0-9]+)(?:\/|$)/i).exec(pathname), 10 | handleLink(href, [, id]) { 11 | const embed = `https://player.vimeo.com/video/${id}`; 12 | return { 13 | type: 'IFRAME', 14 | embed, 15 | embedAutoplay: `${embed}?autoplay=true`, 16 | pause: '{"method":"pause"}', 17 | play: '{"method":"play"}', 18 | fixedRatio: true, 19 | }; 20 | }, 21 | }); 22 | -------------------------------------------------------------------------------- /changelog/v5.5.11.md: -------------------------------------------------------------------------------- 1 | ## [v5.5.11](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.5.11) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix Pixiv embeds (thanks @erikdesjardins) 6 | - Fix Streamable expandos missing controls (thanks @erikdesjardins) 7 | 8 | ### Housekeeping / Other 9 | 10 | - Internal element creation cleanup (thanks @larsjohnsen) 11 | - Show a notification for minor version updates by default (thanks @erikdesjardins) 12 | - Correct naming of "Home" (née "Front") link in Subreddit Manager (thanks @erikdesjardins) 13 | - Support DeviantART "link" images (thanks @erikdesjardins) 14 | -------------------------------------------------------------------------------- /changelog/v5.7.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.7.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.7.2) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix cloud backups forgetting your login after a browser restart in Chrome (thanks @erikdesjardins) 6 | - Fix newCommentCount occasionally overwriting other tabs' updated counts (thanks @larsjohnsen) 7 | - Fix loading stylesheets from subreddits in Stylesheet Loader (thanks @erikdesjardins) 8 | 9 | ### Housekeeping / Other 10 | 11 | - Updated the localization files (thanks @erikdesjardins) 12 | - Tweak warnings for cloud backup permissions (thanks @erikdesjardins) 13 | -------------------------------------------------------------------------------- /lib/css/modules/_saveComments.scss: -------------------------------------------------------------------------------- 1 | .RES-save { 2 | cursor: help; 3 | } 4 | 5 | #res-saveComments { 6 | padding: 0 10px; 7 | font-size: small; 8 | 9 | .res-module-description { 10 | max-width: 60em; 11 | margin-bottom: 15px; 12 | } 13 | 14 | .res-saveComments-tip { 15 | font-size: small; 16 | margin-top: 10px; 17 | margin-bottom: 10px; 18 | } 19 | 20 | .res-savedComment { 21 | margin: 10px 0; 22 | padding: 10px 0; 23 | 24 | &.md { 25 | font-size: small; 26 | max-width: none; 27 | } 28 | 29 | .savedCommentFooter { 30 | font-size: x-small; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/modules/hosts/pastebin.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('pastebin', { 6 | name: 'pastebin', 7 | domains: ['pastebin.com'], 8 | attribution: false, 9 | detect: ({ href }) => (/^https?:\/\/(?:www\.)?pastebin\.com\/(?:raw\.php\?i=|index\/)?([a-z0-9]{8})/i).exec(href), 10 | handleLink(href, [, id]) { 11 | return { 12 | type: 'IFRAME', 13 | expandoClass: 'selftext', 14 | muted: true, 15 | embed: `https://pastebin.com/embed_iframe.php?i=${id}`, 16 | height: '500px', 17 | width: '700px', 18 | }; 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /lib/utils/hash.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { range } from './generator'; 4 | 5 | const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; 6 | export function randomHash(len: number = 5): string { 7 | const arr = new Array(len); 8 | for (const i of range(0, len)) { 9 | arr[i] = chars.charAt(Math.random() * chars.length | 0); 10 | } 11 | return arr.join(''); 12 | } 13 | 14 | export function hashCode(str: string): number { 15 | let hash = 0; 16 | for (const char of str) { 17 | hash = (((hash << 5) - hash) + char.charCodeAt(0)) | 0; 18 | } 19 | return hash; 20 | } 21 | -------------------------------------------------------------------------------- /lib/environment/background/xhrCache.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { LRUCache } from '../../utils/Cache'; 4 | import { addListener } from './messaging'; 5 | 6 | const cache = new LRUCache(512); 7 | addListener('XHRCache', ([operation, key, value]) => { 8 | switch (operation) { 9 | case 'set': 10 | cache.set(key, value); 11 | break; 12 | case 'check': 13 | return cache.get(key, value); 14 | case 'delete': 15 | return cache.delete(key); 16 | case 'clear': 17 | return cache.clear(); 18 | default: 19 | throw new Error(`Invalid XHRCache operation: ${operation}`); 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /lib/modules/hosts/facebookvideo.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('facebookvideo', { 6 | name: 'facebookvideo', 7 | domains: ['facebook.com'], 8 | attribution: false, // shown in embed 9 | detect: ({ pathname }) => (/^\/([a-z0-9]+)\/(?:videos)\/([0-9]+)/i).exec(pathname), 10 | handleLink(href, [, channel, id]) { 11 | const embed = `https://www.facebook.com/plugins/video.php?href=https://www.facebook.com/${channel}/videos/${id}`; 12 | return { 13 | type: 'IFRAME', 14 | embed, 15 | fixedRatio: true, 16 | }; 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /lib/options/handleBlocking.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | // The browser may block localStorage etc on embedded pages, preventing the settings console from rendering 4 | // Detect this early, so that settingsNavigation can open it in a new tab instead 5 | if (window !== window.top) { 6 | let blocked = true; 7 | try { 8 | // Storage is necessary for RES 9 | blocked = !Number.isInteger(localStorage.length + sessionStorage.length); 10 | } catch (e) { 11 | if (blocked) { 12 | window.parent.postMessage({ failedToLoad: true }, '*'); 13 | throw new Error('Storage is not available'); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /changelog/v5.11.6.md: -------------------------------------------------------------------------------- 1 | ## [v5.11.6](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.11.6) 2 | 3 | ### New Features 4 | 5 | - New "toggle" command line command for custom toggles (thanks @larsjohnsen, @octagonal) 6 | - Toggling a custom toggle updates all tabs where supported (thanks @larsjohnsen) 7 | 8 | ### Bug Fixes 9 | 10 | - (beta) Fix comment collapsing not collapsing enclosed expando (thanks @larsjohnsen) 11 | 12 | ### Housekeeping / Other 13 | 14 | - Remove dead media hosts (thanks @BenMcGarry) 15 | - Update redesign API usage (thanks @andytuba) 16 | - Update deps (thanks @mc10) 17 | -------------------------------------------------------------------------------- /changelog/v5.12.7.md: -------------------------------------------------------------------------------- 1 | ## [v5.12.7](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.12.7) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - None (thanks nobody) 10 | 11 | ### Housekeeping / Other 12 | 13 | - Removed miiverse media host (site is defunct) (thanks andytuba, XenoBen) 14 | - Rename flow/lib/*.js to ...js.flow to signal contents do not require functional review (thanks andytuba) 15 | - Improved "sanitize HTML for displaying as text" (thanks andytuba) 16 | - Added extra layer of sanitizing for HTML with external origins (thanks andytuba) 17 | -------------------------------------------------------------------------------- /lib/modules/hosts/codepen.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('codepen', { 6 | name: 'CodePen', 7 | domains: ['codepen.io'], 8 | attribution: false, // shown in embed 9 | detect: ({ pathname }) => (/^\/(?!anon)([a-z0-9_-]+)\/(?:pen|full|details|debug)\/([a-z]+)\b/i).exec(pathname), 10 | handleLink(href, [, user, hash]) { 11 | return { 12 | type: 'IFRAME', 13 | muted: true, 14 | height: '500px', 15 | width: '700px', 16 | expandoClass: 'selftext', 17 | embed: `https://codepen.io/${user}/embed/${hash}`, 18 | }; 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /changelog/v5.16.10.md: -------------------------------------------------------------------------------- 1 | ## [v5.16.10](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.16.10) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Don't crash when the font loading API is disabled (thanks @larsjohnsen) 10 | - Fix userTagger automatically closing when when opened from userInfo (thanks @larsjohnsen) 11 | - Fix save button not posting in BigEditor (thanks @larsjohnsen) 12 | 13 | ### Housekeeping / Other 14 | 15 | - Fix nightmode on /report, don't add `.link` border (thanks @BenMcGarry) 16 | - Simplify table value access (thanks @larsjohnsen) 17 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/Subreddit.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { PatternCase } from '../Case'; 4 | 5 | export class Subreddit extends PatternCase { 6 | static text = 'Subreddit'; 7 | 8 | static thingToCriterion(thing: *) { return thing.getSubreddit(); } 9 | 10 | static fields = ['posted in /r/', { type: 'text', id: 'patt' }]; 11 | 12 | trueText = `in ${this.conditions.patt}`; 13 | 14 | value = this.build(true); 15 | 16 | evaluate(thing: *) { 17 | const subreddit = thing.getSubreddit(); 18 | if (!subreddit) return null; 19 | return this.value.some(v => v.test(subreddit)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/modules/hosts/archilogic.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('archilogic', { 6 | name: 'archilogic', 7 | domains: ['spaces.archilogic.com'], 8 | logo: 'https://about.archilogic.com/wp-content/uploads/2017/01/favicon-96x96.png', 9 | detect: ({ pathname }) => (/^\/(3d|model)/).exec(pathname), 10 | handleLink(href) { 11 | const formattedUrl = href 12 | .replace('/model/', '/3d/') // force /3d/ 13 | .replace('http:', 'https:'); // force https 14 | 15 | return { 16 | type: 'IFRAME', 17 | embed: formattedUrl, 18 | }; 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /tests/commandLine.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'basic functionality': browser => { 3 | if (browser.options.desiredCapabilities.browserName === 'firefox') { 4 | // geckodriver doesn't support elementSendKeys https://github.com/mozilla/geckodriver/issues/159 5 | browser.end(); 6 | return; 7 | } 8 | 9 | browser 10 | .url('https://en.reddit.com/wiki/pages/') 11 | .waitForElementVisible('#RESSettingsButton') 12 | .keys(['.']) 13 | .assert.visible('#keyCommandLineWidget') 14 | .keys(['?']) 15 | .assert.containsText('#keyCommandForm', 'navigates to subreddit') 16 | .end(); 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /tests/spamButton.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'basic functionality': browser => { 3 | browser 4 | .url('https://en.reddit.com/wiki/pages/#res:settings-redirect-standalone-options-page/spamButton') 5 | .waitForElementVisible('#RESConsoleContainer') 6 | .click('.moduleToggle') 7 | .url('https://en.reddit.com/r/RESIntegrationTests/comments/5ui5yr/spam_button/') 8 | .waitForElementVisible('#siteTable') 9 | .assert.attributeContains('.thing.link .buttons a.option', 'href', '/message/compose?to=/r/reddit.com&subject=spam&message=https://en.reddit.com/user/erikdesjardins') 10 | .end(); 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /lib/environment/foreground/xhrCache.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { sendMessage } from './messaging'; 4 | 5 | export function set(key: string, value: mixed) { 6 | return sendMessage('XHRCache', ['set', key, value]); 7 | } 8 | 9 | export function check(key: string, maxAge?: number /* milliseconds */): Promise { 10 | return sendMessage('XHRCache', ['check', key, maxAge]); 11 | } 12 | 13 | function delete_(key: string) { 14 | return sendMessage('XHRCache', ['delete', key]); 15 | } 16 | export { delete_ as delete }; 17 | 18 | export function clear() { 19 | return sendMessage('XHRCache', ['clear']); 20 | } 21 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/browseCases/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export { BrowsingFrontPage as browsingFrontPage } from './BrowsingFrontPage'; 4 | export { CurrentLocation as currentLocation } from './CurrentLocation'; 5 | export { CurrentMulti as currentMulti } from './CurrentMulti'; 6 | export { CurrentUserProfile as currentUserProfile } from './CurrentUserProfile'; 7 | export { CurrentSub as currentSub } from './CurrentSub'; 8 | export { Date as date } from './Date'; 9 | export { Dow as dow } from './Dow'; 10 | export { LoggedInAs as loggedInAs } from './LoggedInAs'; 11 | export { Toggle as toggle } from './Toggle'; 12 | -------------------------------------------------------------------------------- /changelog/v5.11.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.11.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.11.4) 2 | 3 | ### New Features 4 | 5 | - New hidePinnedRedditVideos option to hide reddit's video overlay that appears when you scroll down (thanks @overdodactyl) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix extra right margin on hidden usernames in some situations (thanks @okdana) 10 | - Fix Night Mode getting disabled everywhere when loading a page in the redesign (thanks @erikdesjardins) 11 | 12 | ### Housekeeping / Other 13 | 14 | - Switch numeric keycodes to named keys (thanks @mc10) 15 | - Lint config tweaks (thanks @mc10) 16 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/Domain.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { PatternCase } from '../Case'; 4 | 5 | export class Domain extends PatternCase { 6 | static text = 'Link domain name'; 7 | 8 | static thingToCriterion(thing: *) { return thing.getPostDomain(); } 9 | 10 | static fields = ['post links to the domain ', { type: 'text', id: 'patt' }]; 11 | 12 | trueText = `domain ${this.conditions.patt}`; 13 | 14 | value = this.build(true); 15 | 16 | evaluate(thing: *) { 17 | const domain = thing.getPostDomain(); 18 | if (!domain) return null; 19 | return this.value.some(v => v.test(domain)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /changelog/v5.18.13.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.13](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.13) 2 | 3 | ### New Features 4 | 5 | None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - showImages: Fix issue where image wouldn't save due to invalid characters. (thanks @BenMcGarry) 10 | - subredditManager: Prevents text wrapping when there's long subreddit names in the list (thanks @larsjohnsen) 11 | - RES Console: Fix CSS issue where button text was hard to see. (thanks @BenMcGarry) 12 | 13 | ### Housekeeping / Other 14 | 15 | - mediaHosts: Remove liquipedia at request of authors of platform (thanks @BenMcGarry) 16 | -------------------------------------------------------------------------------- /changelog/v5.12.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.12.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.12.3) 2 | 3 | ### New Features 4 | 5 | - Subreddit Info popups now work on the reddit redesign (thanks @prasoc) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix Account Switcher on the reddit redesign (thanks @andytuba) 10 | - Fix visible images unloading when scrolling horizontally (thanks @larsjohnsen) 11 | - Fix video expandos not pausing when collapsing the containing comment (thanks @larsjohnsen) 12 | 13 | ### Housekeeping / Other 14 | 15 | - Never Ending Reddit prefetches the next page when approaching the bottom (thanks @larsjohnsen) 16 | -------------------------------------------------------------------------------- /lib/modules/hosts/soundcloud.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | import { string } from '../../utils'; 5 | 6 | export default new Host('soundcloud', { 7 | name: 'soundcloud', 8 | domains: ['soundcloud.com'], 9 | logo: 'https://a-v2.sndcdn.com/assets/images/sc-icons/favicon-2cadd14b.ico', 10 | detect: () => true, 11 | handleLink(href) { 12 | return { 13 | type: 'IFRAME', 14 | embed: string.encode`https://w.soundcloud.com/player/?url=${href}`, 15 | height: '166px', 16 | width: '700px', 17 | pause: '{"method":"pause"}', 18 | play: '{"method":"play"}', 19 | }; 20 | }, 21 | }); 22 | -------------------------------------------------------------------------------- /lib/modules/hosts/tuckbot.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('tuckbot', { 6 | name: 'TuckBot.tv', 7 | 8 | domains: ['tuckbot.tv'], 9 | 10 | attribution: false, 11 | 12 | // sample URL: https://tuckbot.tv/#/watch/gq09xf 13 | detect: ({ hostname, hash }) => { 14 | const [, route, redditPostId] = hash.split('/'); 15 | if (route === 'watch') return [hostname, redditPostId]; 16 | }, 17 | 18 | handleLink(_href, [, id]) { 19 | return { 20 | type: 'IFRAME', 21 | embed: `https://tuckbot.tv/#/embed/${id}`, 22 | fixedRatio: true, 23 | }; 24 | }, 25 | }); 26 | -------------------------------------------------------------------------------- /changelog/v5.8.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.8.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.8.1) 2 | 3 | ### New Features 4 | 5 | - New subredditStyleCheckbox option to disable the sidebar subreddit style toggle (thanks @erikdesjardins) 6 | - New "module [name]" console command to quickly open a module's settings page (thanks @larsjohnsen) 7 | 8 | ### Bug Fixes 9 | 10 | - Fix "has expando" filter (thanks @erikdesjardins) 11 | - Fix submitting wiki page changes from the Big Editor (thanks @erikdesjardins) 12 | 13 | ### Housekeeping / Other 14 | 15 | - Reduce the impact of New Comment Count on startup time (thanks @larsjohnsen) 16 | -------------------------------------------------------------------------------- /lib/images/expandoPadlock-active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/commentCases/CommentContent.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { PatternCase } from '../Case'; 4 | 5 | export class CommentContent extends PatternCase { 6 | static text = 'Comment content'; 7 | 8 | static parseCriterion(input: *) { return { patt: input }; } 9 | 10 | static fields = ['comment contains ', { type: 'text', id: 'patt' }]; 11 | 12 | trueText = `comment contains ${this.conditions.patt}`; 13 | 14 | value = this.build(false); 15 | 16 | evaluate(thing: *) { 17 | const body = thing.getTextBody(); 18 | if (!body) return null; 19 | return this.value.some(v => v.test(body.textContent)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /changelog/v5.13.6.md: -------------------------------------------------------------------------------- 1 | ## [v5.13.6](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.13.6) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix disableChat breaking when encountering script without absolute src (thanks @larsjohnsen) 10 | - disableChat: Add fallback, also remove icon (thanks @larsjohnsen) 11 | - Remove complicated and buggy filter optimization (thanks @larsjohnsen) 12 | 13 | ### Housekeeping / Other 14 | 15 | - commentNavigator: Don't throw error if entry element location is not found (thanks @larsjohnsen) 16 | - Avoid processing promoted links (thanks @larsjohnsen) 17 | -------------------------------------------------------------------------------- /changelog/v5.16.7.md: -------------------------------------------------------------------------------- 1 | ## [v5.16.7](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.16.7) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix multiredditNavbar to work with new multireddit URL (thanks @larsjohnsen) 10 | - Tweak loadPage completion deferral to avoid conflicting with conserveMemory, causing expandos to be removed (thanks @larsjohnsen) 11 | 12 | ### Housekeeping / Other 13 | 14 | - Remove 'show images' expando count in button as it is inaccurate on large pages (thanks @larsjohnsen) 15 | - showImages hosts ireddit: Remove broken option preferRedditMedia (thanks @larsjohnsen) 16 | -------------------------------------------------------------------------------- /changelog/v5.18.7.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.7](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.7) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - core: Ignore stored values with undefined value 10 | - saveComments: Fix delettion of saved comments 11 | - nightmode: Fix issue with removed comments (thanks @BenMcGarry) 12 | - betteReddit fixHideLinks: Fix fadeOut not being invoked in some circumstances 13 | - commentTools autoComplete: Support usersnames containing hyphen 14 | - singleClick: Fix middle click (thanks /u/SpineEyE) 15 | 16 | ### Housekeeping / Other 17 | 18 | - None (thanks nobody) 19 | -------------------------------------------------------------------------------- /changelog/v5.9.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.9.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.9.3) 2 | 3 | ### New Features 4 | 5 | - New crossposts option to display crosspost metadata above expandos (thanks @andytuba) 6 | - New highlightSelf option to highlight the current user (thanks @Double-A-92) 7 | 8 | ### Bug Fixes 9 | 10 | - Fix some issues caused by options being saved in an incorrect format (thanks @erikdesjardins) 11 | - (beta) Fix title character count being null (thanks @erikdesjardins) 12 | 13 | ### Housekeeping / Other 14 | 15 | - Avoid another forced reflow (thanks @erikdesjardins) 16 | - Updated the localization files 17 | -------------------------------------------------------------------------------- /changelog/v5.10.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.10.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.10.3) 2 | 3 | ### New Features 4 | 5 | - Add 'period' parameter to command line sort (e.g. `.` `/top week`) (thanks @larsjohnsen) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix allowNSFW being ignored on comments pages (thanks @larsjohnsen) 10 | - Fix mediaBrowse not working when hiding posts (thanks @larsjohnsen) 11 | - Fix source buttons not appearing in the inbox (thanks @erikdesjardins) 12 | - Fix tags with "none" color having blue text (thanks @erikdesjardins) 13 | 14 | ### Housekeeping / Other 15 | 16 | - Combine Edge beta releases (thanks @BenMcGarry) 17 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/LinkFlair.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { PatternCase } from '../Case'; 4 | 5 | export class LinkFlair extends PatternCase { 6 | static text = 'Link flair'; 7 | 8 | static thingToCriterion(thing: *) { return thing.getPostFlairText(); } 9 | 10 | static fields = ['post has link flair matching ', { type: 'text', id: 'patt' }]; 11 | 12 | static pattern = '[RegEx]'; 13 | 14 | trueText = `link flair ${this.conditions.patt}`.trim(); 15 | 16 | value = this.build(false, '/./'); 17 | 18 | evaluate(thing: *) { 19 | const text = thing.getPostFlairText(); 20 | return this.value.some(v => v.test(text)); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/modules/hosts/znipe.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('znipe', { 6 | name: 'ZnipeTV', 7 | domains: ['beta.znipe.tv', 'www.znipe.tv'], 8 | logo: 'https://assets.znipe.tv/icons/favicon.jpg', 9 | detect: ({ searchParams }) => { 10 | const mParam = searchParams.get('m'); 11 | if (mParam) return ['m', mParam]; 12 | 13 | const vParam = searchParams.get('v'); 14 | if (vParam) return ['v', vParam]; 15 | }, 16 | handleLink(href, [clipType, clipId]) { 17 | return { 18 | type: 'IFRAME', 19 | embed: `https://beta.znipe.tv/watch?${clipType}=${clipId}`, 20 | }; 21 | }, 22 | }); 23 | -------------------------------------------------------------------------------- /changelog/v5.20.8.md: -------------------------------------------------------------------------------- 1 | ## [v5.20.8](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.20.8) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - backupAndRestore: Possible fix for resting backup from files not working in certain environments (thanks @larsjohnsen) 10 | - host vreddit: Add support for videos hosted on vcf.redd.it (thanks @larsjohnsen) 11 | - Re-add cookie permission to Firefox (thanks @BenMcGarry) 12 | - Update dependency snudown-js to v3.2 which reduces its initial memory usage to 64k from 16M (thanks @erikdesjardins) 13 | 14 | ### Housekeeping / Other 15 | 16 | - None (thanks nobody) 17 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/UserFlair.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { PatternCase } from '../Case'; 4 | 5 | export class UserFlair extends PatternCase { 6 | static text = 'User flair'; 7 | 8 | static thingToCriterion(thing: *) { return thing.getUserFlairText(); } 9 | 10 | static fields = ['author of this post has flair matching ', { type: 'text', id: 'patt' }]; 11 | 12 | static pattern = '[RegEx]'; 13 | 14 | trueText = `user flair ${this.conditions.patt}`.trim(); 15 | 16 | value = this.build(false, '/./'); 17 | 18 | evaluate(thing: *) { 19 | const text = thing.getUserFlairText(); 20 | return this.value.some(v => v.test(text)); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/commentQuickCollapse.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'double click tagline': browser => { 3 | if (browser.options.desiredCapabilities.browserName === 'firefox') { 4 | // geckodriver doesn't support moveto https://github.com/mozilla/geckodriver/issues/159 5 | browser.end(); 6 | return; 7 | } 8 | 9 | const comment = '#thing_t1_dc7kvtv'; 10 | 11 | browser 12 | .url('https://en.reddit.com/r/RESIntegrationTests/comments/5mzxff/comment_quick_collapse/') 13 | .waitForElementVisible(comment) 14 | .moveToElement(`${comment} time`, 0, 0) 15 | .doubleClick() 16 | .assert.cssClassPresent(comment, 'collapsed') 17 | .end(); 18 | }, 19 | }; 20 | -------------------------------------------------------------------------------- /changelog/v5.14.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.14.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.14.1) 2 | 3 | ### New Features 4 | 5 | - Restore hardIgnore to block users everywhere (thanks @larsjohnsen) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix subreddit style sometimes not being removed (thanks @larsjohnsen) 10 | - Fix settings console not opening when "block 3rd party cookies" is enabled (thanks @larsjohnsen) 11 | - Fix neverEndingReddit not loading the next page under certain circumstances (thanks @larsjohnsen) 12 | - Increase delay before the userTagger widget disappears (thanks @larsjohnsen) 13 | 14 | ### Housekeeping / Other 15 | 16 | - None (thanks nobody) 17 | -------------------------------------------------------------------------------- /changelog/v5.18.5.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.5](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.5) 2 | 3 | ### New Features 4 | 5 | - hosts: Add support for streamvi.com (thanks @JimboLodisC) 6 | 7 | ### Bug Fixes 8 | 9 | - Minor CSS fix for button alignments on multis (thanks @corylulu) 10 | - Possible workaround for Firefox viewport-size bug::larsjohnsen@gmail.com 11 | 12 | ### Housekeeping / Other 13 | 14 | - utils/dashboard: Split dashboard tab functionality from module (thanks @larsjohnsen) 15 | - Use `Event#currentTarget` instead of `Event#target` where appropriate (thanks @larsjohnsen) 16 | - tableSort: Fix numeric sorting (thanks @larsjohnsen) 17 | -------------------------------------------------------------------------------- /changelog/v5.6.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.6.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.6.1) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix subreddit style toolbar button appearing on load with subredditStyleBrowserToolbarButton disabled (thanks @erikdesjardins) 6 | - Fix subreddit style toolbar button having the tooltip "Subreddit Style On" even when it was off (thanks @erikdesjardins) 7 | - Fix openInNewWindow for expando images (thanks @erikdesjardins) 8 | - Fix expandos resizing incorrectly when fullscreen (thanks @larsjohnsen) 9 | 10 | ### Housekeeping / Other 11 | 12 | - Work around Firefox storage making User Tagger extremely slow (thanks @erikdesjardins) 13 | -------------------------------------------------------------------------------- /DEPLOY.md: -------------------------------------------------------------------------------- 1 | # All browsers 2 | 3 | 1. Run [`yarn build --env browsers=all`](/CONTRIBUTING.md#build-commands). 4 | 5 | ## Chrome 6 | 7 | https://developer.chrome.com/webstore/publish 8 | 9 | 1. Upload `chrome.zip` to https://chrome.google.com/webstore/developer/dashboard 10 | 11 | ## Firefox 12 | 13 | https://developer.mozilla.org/en-US/Add-ons/Distribution 14 | 15 | 1. Upload `firefox.zip` to https://addons.mozilla.org/en-US/developers/addon/submit/1 16 | 17 | ## Edge 18 | 19 | https://docs.microsoft.com/microsoft-edge/extensions-chromium/publish/publish-extension 20 | 21 | 1. Upload `chrome.zip` to https://partner.microsoft.com/en-us/dashboard/microsoftedge/overview 22 | -------------------------------------------------------------------------------- /changelog/v5.16.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.16.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.16.2) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Draw subredditManager shortcuts earlier (thanks @larsjohnsen) 10 | - Fix neverEndingReddit autoLoad (thanks @larsjohnsen) 11 | - Improve initial flow when filteReddit hideUntilProcessed hides every post (thanks @larsjohnsen) 12 | - Make selectedEntry disablable again (thanks @larsjohnsen) 13 | - Replace usage of toggleAttribute to fix posts not being visible in older versions of Firefox (thanks @larsjohnsen) 14 | 15 | ### Housekeeping / Other 16 | 17 | - None (thanks nobody) 18 | -------------------------------------------------------------------------------- /lib/modules/hosts/dropbox.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | import { genericHosts } from '../showImages'; 5 | 6 | export default new Host('dropbox', { 7 | name: 'dropbox', 8 | domains: ['dropbox.com'], 9 | logo: 'https://cfl.dropboxstatic.com/static/images/favicon-vflk5FiAC.ico', 10 | detect(url) { 11 | for (const host of genericHosts) { 12 | const result = host.detect(url); 13 | if (result) return [host.handleLink, result]; 14 | } 15 | }, 16 | handleLink(href, [handler, result]) { 17 | const originalURL = new URL(href); 18 | return handler(`${originalURL.origin}${originalURL.pathname}?raw=1`, result); 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /lib/css/_zindex.scss: -------------------------------------------------------------------------------- 1 | @use 'sass:math'; 2 | 3 | @function _($i) { 4 | $base: 10000000; 5 | $increment: math.div($base, 100); 6 | 7 | @return $base + $i * $increment; 8 | } 9 | 10 | $zindex-go-mode-panel: _(1); 11 | $zindex-key-help: _(2); 12 | $zindex-res-hover: _(3); 13 | $zindex-show-link-title: _(4); 14 | $zindex-big-editor: _(5); 15 | $zindex-autocomplete-dropdown: _(6); 16 | $zindex-quick-message-dialog: _(7); 17 | $zindex-command-line-widget: _(8); 18 | $zindex-notifications: _(9); 19 | $zindex-alert-message: _(10); 20 | $zindex-baconbit: _(11); 21 | $zindex-console-container: _(12); 22 | -------------------------------------------------------------------------------- /lib/modules/hosts/pixiv.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('pixiv', { 6 | name: 'pixiv', 7 | domains: ['pixiv.net'], 8 | logo: 'https://www.pixiv.net/favicon.ico', 9 | detect: ({ pathname, search }) => (pathname === '/member_illust.php' && (/illust_id=(\d+)/).exec(search)) || 10 | (/(?:\/en|^)\/artworks\/(\d+)\/?$/).exec(pathname), 11 | handleLink(href, [, id]) { 12 | return { 13 | type: 'IFRAME', 14 | expandoClass: 'image', 15 | muted: true, 16 | embed: `https://embed.pixiv.net/embed_mk2.php?id=${id}&size=large`, 17 | width: '700px', 18 | height: '700px', 19 | }; 20 | }, 21 | }); 22 | -------------------------------------------------------------------------------- /lib/modules/hosts/streamvi.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('streamvi', { 6 | name: 'streamvi', 7 | domains: ['streamvi.com'], 8 | logo: 'https://streamvi.com/assets/logo.png', 9 | detect: ({ searchParams }) => { 10 | const code = searchParams.get('video'); 11 | if (code) return [code.toString()]; 12 | }, 13 | handleLink(href, [code]) { 14 | return { 15 | type: 'VIDEO', 16 | loop: true, 17 | sources: [{ 18 | source: `https://cdn.streamvi.com/uploads/${code}.mp4`, 19 | type: 'video/mp4', 20 | }], 21 | poster: `https://cdn.streamvi.com/uploads/${code}.jpg`, 22 | }; 23 | }, 24 | }); 25 | -------------------------------------------------------------------------------- /changelog/v5.21.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.21.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.21.2) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix `disableChat` in Firefox 10 | - Fix duplicated expandos in spoiler selftexts 11 | - betteReddit: Reduce performance impact of showVideoData 12 | - filterline: Fix 'propagate' effect toggle not being saved 13 | - settingsConsole: Improve custom filter layout 14 | - keyboardNav: Toggle of spoilers gate with `x` 15 | - userTagger: Fix UX issues in dashboard 16 | 17 | ### Housekeeping / Other 18 | 19 | - settingsConsole: Show a few more options by default (link filteReddit's custom filters) 20 | -------------------------------------------------------------------------------- /lib/modules/hosts/jsfiddle.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('jsfiddle', { 6 | name: 'jsfiddle', 7 | domains: ['jsfiddle.net'], 8 | logo: 'https://jsfiddle.net/favicon.png', 9 | detect: ({ pathname }) => (/^(\/(?:\w+\/(?!embedded\/))?[a-z0-9]{5,}(?:\/\d+)?(?=\/|$))(\/embedded\/[\w,]+\/)?/i).exec(pathname), 10 | handleLink(href, [, path, categories]) { 11 | return { 12 | type: 'IFRAME', 13 | expandoClass: 'selftext', 14 | muted: true, 15 | embed: `https://jsfiddle.net${path}${categories || '/embedded/result,js,resources,html,css/'}`, 16 | width: '800px', 17 | height: '500px', 18 | }; 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /lib/modules/hosts/redditmedia.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('redditmedia', { 6 | name: 'redditmedia', 7 | domains: ['redditmedia.com'], 8 | attribution: false, 9 | detect: ({ hostname, searchParams }) => hostname !== 'pixel.redditmedia.com' && searchParams, 10 | handleLink(href, searchParams) { 11 | if (searchParams.get('fm') === 'mp4') { 12 | return { 13 | type: 'VIDEO', 14 | loop: true, 15 | muted: true, 16 | sources: [{ 17 | source: href, 18 | type: 'video/mp4', 19 | }], 20 | }; 21 | } 22 | 23 | return { 24 | type: 'IMAGE', 25 | src: href, 26 | }; 27 | }, 28 | }); 29 | -------------------------------------------------------------------------------- /lib/environment/foreground/session.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { sendMessage } from './messaging'; 4 | 5 | export function get(key: string): Promise { 6 | return sendMessage('session', ['get', key]); 7 | } 8 | 9 | export function set(key: string, value: mixed) { 10 | return sendMessage('session', ['set', key, value]); 11 | } 12 | 13 | export function delete_(key: string) { 14 | return sendMessage('session', ['delete', key]); 15 | } 16 | export { delete_ as delete }; 17 | 18 | export function has(key: string): Promise { 19 | return sendMessage('session', ['has', key]); 20 | } 21 | 22 | export function clear() { 23 | return sendMessage('session', ['clear']); 24 | } 25 | -------------------------------------------------------------------------------- /lib/modules/contribute.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Module } from '../core/module'; 4 | import { i18n, openNewTab } from '../environment'; 5 | import { string } from '../utils'; 6 | import * as Menu from './menu'; 7 | 8 | export const module: Module<*> = new Module('contribute'); 9 | 10 | module.moduleName = 'contributeName'; 11 | module.category = 'aboutCategory'; 12 | module.sort = -9; 13 | module.alwaysEnabled = true; 14 | module.description = 'contributeDesc'; 15 | 16 | module.contentStart = () => { 17 | Menu.addMenuItem( 18 | () => string.html`${i18n('donateToRES')} ⇧`, 19 | () => { openNewTab('https://redditenhancementsuite.com/contribute/'); }, 20 | ); 21 | }; 22 | -------------------------------------------------------------------------------- /changelog/v5.10.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.10.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.10.1) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix "refresh all" on dashboard (thanks @larsjohnsen) 6 | - Fix RES-keyNav-activeElement class not being applied (thanks @larsjohnsen) 7 | - Fix tags not appearing for the current user (thanks @larsjohnsen) 8 | - Fix Filterline "powered" icon not working on some platforms (thanks @larsjohnsen) 9 | 10 | ### Housekeeping / Other 11 | 12 | - Position cursor at the end of user tagger text input (thanks @larsjohnsen) 13 | - Move gallery filmstrip button further away from navigation buttons (thanks @erikdesjardins) 14 | - Settings Console minor cleanup (thanks @mc10) 15 | -------------------------------------------------------------------------------- /changelog/v5.16.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.16.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.16.4) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - neverEndingReddit: Fix support on moderation log (thanks @larsjohnsen) 10 | - selectedEntry: Don't scroll to last selected post by default, and restore option scrollToSelectedThing (thanks @larsjohnsen) 11 | - r2 watcher: Remove hard to reason about promise handling (thanks @larsjohnsen) 12 | - filterline: Fix stored visiblitity state being ignored (thanks @larsjohnsen) 13 | 14 | ### Housekeeping / Other 15 | 16 | - init: Remove some earlier workarounds which can be points of failure (thanks @larsjohnsen) 17 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/CommentsOpened.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { isURLVisited } from '../../../environment'; 4 | import * as NewCommentCount from '../../newCommentCount'; 5 | import { Case } from '../Case'; 6 | 7 | export class CommentsOpened extends Case { 8 | static text = 'Comments opened'; 9 | 10 | static fields = ['comments page has been visited']; 11 | static slow = 2; 12 | 13 | static unique = true; 14 | 15 | trueText = 'comments opened'; 16 | 17 | async evaluate(thing: *) { 18 | if (await NewCommentCount.hasEntry(thing)) return true; 19 | 20 | const link = thing.getCommentsLink(); 21 | if (!link) return null; 22 | return isURLVisited(link.href); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /changelog/v1.0.md: -------------------------------------------------------------------------------- 1 | ## v1.0 2 | 3 | ### New features 4 | 5 | - Core functionality 6 | - Added "table" data types as a new option type 7 | - If you've used the subreddit tagger, you've seen this. It allows you to create a set of data for which you might have multiple rows... 8 | - Subreddit Tagger 9 | - Settings are now integrated in the [RES] console. The [tag] link is gone! 10 | - Your old settings should be automatically copied into the new format. 11 | - Hide Child Comments 12 | - Added a new module that allows you to hide all comments but responses to the original poster. 13 | 14 | ### Bug fixes 15 | 16 | - General 17 | - Fixed a number of minor bugs, mostly just things that caused warnings, etc. 18 | -------------------------------------------------------------------------------- /changelog/v5.18.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.18.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.18.4) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix doNoCtrlF emtying the hide button (thanks @larsjohnsen) 10 | - host pixiv: Accept new URL format (thanks @Aherm) 11 | - accountSwitcher: Fix hiding of current account (thanks @larsjohnsen) 12 | - dashboard: Fix add/edit subreddit (thanks @larsjohnsen) 13 | - ner: Fix returnToPrev (thanks @larsjohnsen) 14 | - settingsConsole: Limit length on long list (thanks @larsjohnsen) 15 | - subredditManager: Fix shortcut sorting (thanks @larsjohnsen) 16 | 17 | ### Housekeeping / Other 18 | 19 | - None (thanks nobody) 20 | -------------------------------------------------------------------------------- /tests/pageNavigator.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'back to top button': browser => { 3 | if (browser.options.desiredCapabilities.browserName === 'firefox') { 4 | // geckodriver doesn't support moveto https://github.com/mozilla/geckodriver/issues/159 5 | browser.end(); 6 | return; 7 | } 8 | 9 | browser 10 | .url('https://en.reddit.com/r/RESIntegrationTests/comments/6341yq/page_navigator/') 11 | .waitForElementVisible('#RESSettingsButton') 12 | .waitForElementNotVisible('.pageNavigator[href="#header"]') 13 | .execute('document.querySelector(".footer").scrollIntoView()') // scroll to bottom 14 | .waitForElementVisible('.pageNavigator[href="#header"]') 15 | .end(); 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /changelog/v5.5.10.md: -------------------------------------------------------------------------------- 1 | ## [v5.5.10](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.5.10) 2 | 3 | ### New Features 4 | 5 | - Support for comments on post-to-profile comments pages (thanks @andytuba) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix media resizing glitching out when started during a blocking operation (thanks @larsjohnsen) 10 | - Fix expando preloading (thanks @erikdesjardins) 11 | 12 | ### Housekeeping / Other 13 | 14 | - Avoid a potentially expensive reflow when starting to drag media (thanks @larsjohnsen) 15 | - Mention multireddits in Subreddit Tagger description (thanks @honestbleeps) 16 | - Avoid running on redesigned reddit pages until they're properly supported (thanks @andytuba) 17 | -------------------------------------------------------------------------------- /lib/modules/hosts/defaultAudio.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('defaultAudio', { 6 | name: 'defaultAudio', 7 | domains: [], 8 | detect: ({ pathname }) => (/\.(opus|weba|ogg|wav|mp3|flac)$/i).exec(pathname), 9 | handleLink(href, [, extension]) { 10 | // Change weba and opus to their correct containers. 11 | if (extension === 'weba') extension = 'webm'; 12 | if (extension === 'opus') extension = 'ogg'; 13 | 14 | const format = `audio/${extension}`; 15 | 16 | return { 17 | type: 'AUDIO', 18 | autoplay: true, 19 | loop: false, 20 | sources: [{ 21 | file: href, 22 | type: format, 23 | }], 24 | }; 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /lib/modules/hosts/getyarn.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('getyarn', { 6 | name: 'getyarn.io', 7 | logo: 'https://getyarn.io/favicon.ico', 8 | domains: ['getyarn.io'], 9 | detect: ({ pathname }) => (/\/yarn-clip\/(?:embed\/)?([\w\-]+)/i).exec(pathname), 10 | handleLink(href, [, code]) { 11 | const embed = `https://getyarn.io/yarn-clip/embed/${code}`; 12 | 13 | return { 14 | type: 'IFRAME', 15 | embed: `${embed}?autoplay=false`, 16 | embedAutoplay: `${embed}?autoplay=true`, 17 | height: '600px', // size as per docs in https://getyarn.io/yarn-clip/embed-test/ 18 | width: '768px', 19 | fixedRatio: true, 20 | }; 21 | }, 22 | }); 23 | -------------------------------------------------------------------------------- /lib/utils/thingMetadata.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { ajax } from '../environment'; 4 | import type { RedditLink, RedditListing } from '../types/reddit'; // eslint-disable-line no-unused-vars 5 | import { batch } from './async'; 6 | 7 | export const getPostMetadata = batch(async (requests: { id: string }[]): Promise<$PropertyType[]> => { 8 | const byId = requests 9 | .map(r => r.id) 10 | .map(id => `t3_${id}`) 11 | .join(','); 12 | 13 | const { data: { children } } = (await ajax({ 14 | url: `/by_id/${byId}.json`, 15 | query: { limit: 100, raw_json: 1 }, 16 | type: 'json', 17 | }): RedditListing); 18 | 19 | return children.map(c => c.data); 20 | }, { size: 100 }); 21 | -------------------------------------------------------------------------------- /changelog/v5.1.4.md: -------------------------------------------------------------------------------- 1 | ## [v5.1.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.1.4) 2 | 3 | ### New Features 4 | 5 | - Easier drag-and-drop to remove subreddit shortcuts (thanks @githue) 6 | 7 | ### Bug Fixes 8 | 9 | - Minor showImages fixes (thanks @larsjohnsen) 10 | - Fix floating icons never hiding in Firefox (thanks @larsjohnsen) 11 | - Fix Stylesheet Loader not working intermittently (thanks @erikdesjardins) 12 | - Fix user tags overflowing from comment taglines (thanks @erikdesjardins) 13 | 14 | ### Housekeeping / Other 15 | 16 | - Duplicate posts are completely removed instead of hidden from view (thanks @TheRook) 17 | - Cleanup styling and implementation of saved-RES tab (thanks @githue) 18 | -------------------------------------------------------------------------------- /lib/images/expandoImage.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /lib/images/expandoImage-active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/browseCases/Toggle.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Case } from '../Case'; 4 | import * as CustomToggles from '../../customToggles'; 5 | 6 | const getOptions = () => CustomToggles.getToggles().map(({ key, text }) => [text, key]); 7 | 8 | export class Toggle extends Case { 9 | static text = 'Custom toggle'; 10 | 11 | static defaultConditions = { toggleName: getOptions()[0] || '' }; // TODO Migrate `toggleName` to `key` 12 | static fields = [ 13 | 'custom toggle ', 14 | { type: 'select', id: 'toggleName', get options() { return getOptions(); } }, 15 | ' is enabled', 16 | ]; 17 | 18 | evaluate() { 19 | const key = this.value.toggleName; 20 | return CustomToggles.toggleActive(key); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /changelog/v1.5.md: -------------------------------------------------------------------------------- 1 | ## v1.5 2 | 3 | ### New features 4 | 5 | - Never Ending Reddit 6 | - Similar to scripts like River of Reddit and Auto Pager - automatically loads more reddit when you get to the bottom. Mmmm, more reddit. 7 | - Keyboard Nav 8 | - Added the ability to visit links within comments! 9 | - When focused on a comment, you'll see numbers (0-9) for next to links within that comment. Hit that number to follow it! 10 | - Updated to support Never Ending Reddit 11 | - User Tagger 12 | - Now, users are (optionally) automatically colored based on how often you upvote them! 13 | - Updated to support Never Ending Reddit 14 | 15 | ### Bug fixes 16 | 17 | - A number of miscellaneous minor fixes, too minute and numerous to list. 18 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/IsVisited.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Case } from '../Case'; 4 | import { isURLVisited } from '../../../environment'; 5 | 6 | export class IsVisited extends Case { 7 | static text = 'Visited'; 8 | 9 | static fields = ['link has been visited']; 10 | static slow = 2; 11 | 12 | static unique = true; 13 | 14 | trueText = 'visited'; 15 | 16 | evaluate(thing: *) { 17 | if (thing.element.classList.contains('visited')) return true; 18 | 19 | const link = thing.getPostLink(); 20 | const dataUrl = thing.element.getAttribute('data-url'); 21 | if (!link && !dataUrl) return null; 22 | return (link && isURLVisited(link.href)) || (dataUrl !== link.href && isURLVisited(dataUrl)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/modules/tableTools.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import $ from 'jquery'; 4 | import { Module } from '../core/module'; 5 | import { Table } from '../utils'; 6 | 7 | export const module: Module<*> = new Module('tableTools'); 8 | 9 | module.moduleName = 'tableToolsName'; 10 | module.category = 'productivityCategory'; 11 | module.description = 'tableToolsDesc'; 12 | module.options = { 13 | sort: { 14 | title: 'tableToolsSortTitle', 15 | type: 'boolean', 16 | value: true, 17 | description: 'tableToolsSortDesc', 18 | bodyClass: true, 19 | }, 20 | }; 21 | 22 | module.contentStart = () => { 23 | if (module.options.sort.value) { 24 | $(document.body).on('click', '.md th, .Comment th, .Post th', Table.sortByColumn); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | /dist/.* 3 | /utils/.* 4 | /examples/.* 5 | /node_modules/.*/test/.* 6 | /node_modules/.*/__tests__/.* 7 | 8 | [include] 9 | 10 | [libs] 11 | ./flow/lib 12 | 13 | [options] 14 | module.use_strict=true 15 | 16 | module.name_mapper='^sibling-loader\(\?.+\)?!.+$'->'/flow/stub/sibling-loader.js' 17 | module.name_mapper='^exec-loader\(\?cache\)?!\(.+\)$'->'\2' 18 | 19 | esproposal.export_star_as=enable 20 | esproposal.optional_chaining=enable 21 | 22 | suppress_type=$FlowIssue 23 | suppress_type=$FlowIgnore 24 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue 25 | suppress_comment=\\(.\\|\n\\)*\\$FlowIgnore 26 | 27 | [version] 28 | 0.84.0 29 | -------------------------------------------------------------------------------- /changelog/v5.11.9.md: -------------------------------------------------------------------------------- 1 | ## [v5.11.9](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.11.9) 2 | 3 | ### New Features 4 | 5 | - Options which refer to Custom Toggles are now selectable from a dropdown (thanks @larsjohnsen) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix continuous redirect when navigating back from redirected profile page (thanks @mudkip908) 10 | - Fix multiple User Tagger icons appearing on users in the redesign (thanks @andytuba) 11 | - (beta) Fix automatic Night Mode handling from outdated tabs (thanks @larsjohnsen) 12 | - (beta) Fix Comment Navigator not initializing using keyboard shortcuts without opening the widget (thanks @larsjohnsen) 13 | 14 | ### Housekeeping / Other 15 | 16 | - Fix tests (thanks @andytuba) 17 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/browseCases/Date.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { dayjs } from '../../../utils/localization'; 4 | import { Case } from '../Case'; 5 | 6 | const options = [ 7 | ['before', '<'], 8 | ['on or after', '>='], 9 | ]; 10 | 11 | export class Date extends Case { 12 | static text = 'Date'; 13 | 14 | static defaultConditions = { op: '<', date: '2020-12-30' }; 15 | static fields = ['today is ', { type: 'select', options, id: 'op' }, ' ', { type: 'text', id: 'date' }]; 16 | 17 | value = { op: this.conditions.op, date: dayjs(this.conditions.date) }; 18 | 19 | isValid() { return this.value.date.isValid(); } 20 | 21 | evaluate() { 22 | return (this.value.op === '<') === dayjs().isBefore(this.value.date); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/modules/hosts/dailymotion.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('dailymotion', { 6 | name: 'dailymotion', 7 | domains: ['dailymotion.com'], 8 | logo: 'https://static1.dmcdn.net/images/favicons/favicon-32x32.png.vb5b47df6329123929', 9 | detect: ({ href }) => (/^https?:\/\/(?:(?:www|touch)\.)?dailymotion.com[\w\-\/:#]+video[\/=]([a-z0-9]+)/i).exec(href), 10 | handleLink(href, [, hash]) { 11 | const embed = `https://www.dailymotion.com/embed/video/${hash}?api=postMessage`; 12 | 13 | return { 14 | type: 'IFRAME', 15 | embed, 16 | embedAutoplay: `${embed}&autoplay=1`, 17 | pause: 'pause', 18 | play: 'play', 19 | fixedRatio: true, 20 | }; 21 | }, 22 | }); 23 | -------------------------------------------------------------------------------- /changelog/v5.17.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.17.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.17.3) 2 | 3 | ### New Features 4 | 5 | - hosts: Add PeerTube host peervideo.net (thanks @bjuergens) 6 | - showImages: In optional permission propmt, let user disable host (thanks @larsjohnsen) 7 | 8 | ### Bug Fixes 9 | 10 | - host flickr: Fix embed, use link src when possible (thanks @larsjohnsen) 11 | - redesign: Add focus function to submitHelper.js (thanks @yanmahan97) 12 | - showImages video: Restore playback when reopening expando (thanks @larsjohnsen) 13 | 14 | ### Housekeeping / Other 15 | 16 | - host codepen: Retrieve iframe src instead of inserting remote HTML (thanks @larsjohnsen) 17 | - Clean-up media hosts (thanks @larsjohnsen) 18 | -------------------------------------------------------------------------------- /lib/modules/disableChat.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Module } from '../core/module'; 4 | import { stopPageContextScript } from '../utils'; 5 | 6 | export const module: Module<*> = new Module('disableChat'); 7 | 8 | module.moduleName = 'disableChatName'; 9 | module.category = 'productivityCategory'; 10 | module.description = 'disableChatDesc'; 11 | module.disabledByDefault = true; 12 | 13 | module.contentStart = () => { 14 | stopPageContextScript(script => (/^\/_chat/).test(new URL(script.src, location.origin).pathname), document.body, true); 15 | const icon = document.body.querySelector('#chat'); 16 | if (icon) { 17 | if (icon.nextElementSibling) icon.nextElementSibling.remove(); // Remove seperator 18 | icon.remove(); 19 | } 20 | }; 21 | -------------------------------------------------------------------------------- /lib/utils/__tests__/generator.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import test from 'ava'; 4 | 5 | import { 6 | range, 7 | zip, 8 | } from '../generator'; 9 | 10 | function c(arr) { 11 | return Array.from(arr); 12 | } 13 | 14 | test('range', t => { 15 | t.deepEqual(c(range(0, 3)), [0, 1, 2]); 16 | t.deepEqual(c(range(0, 0)), []); 17 | t.deepEqual(c(range(-1, 2)), [-1, 0, 1]); 18 | t.deepEqual(c(range(1, -2)), []); 19 | }); 20 | 21 | test('zip', t => { 22 | t.deepEqual(c(zip([1, 2, 3], ['a', 'b', 'c'])), [[1, 'a'], [2, 'b'], [3, 'c']]); 23 | t.deepEqual(c(zip([1, 2, 3], ['a'])), [[1, 'a'], [2, undefined], [3, undefined]], 'consumes all generators to completion'); 24 | t.deepEqual(c(zip([1, 2, 3], range(4, 7))), [[1, 4], [2, 5], [3, 6]]); 25 | }); 26 | -------------------------------------------------------------------------------- /changelog/v1.6.md: -------------------------------------------------------------------------------- 1 | ## v1.6 2 | 3 | ### New features 4 | 5 | - User Tagger 6 | - Not a new feature, exactly, but I've increased the efficiency of this module significantly, even on first scan. 7 | - Save Comments 8 | - Surprise! I've added a module that allows you to save comments. 9 | - Note: Comments are saved just like preferences, on your local machine, not somehow magically to your reddit account. 10 | - Hide Child Comments 11 | - Updated the interface to toggle states, rather than just saying "toggle", says "hide" or "show", whichever is appropriate. 12 | 13 | ### Bug fixes 14 | 15 | - Keyboard Navigation 16 | - Finally figured out what was going on with Mac's command key, added support for that - no more Apple-F taking you to the homepage, I hope. 17 | -------------------------------------------------------------------------------- /changelog/v5.20.7.md: -------------------------------------------------------------------------------- 1 | ## [v5.20.7](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.20.7) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - filteReddit expando: Fix filter not refreshing as expandos are loaded (thanks @larsjohnsen) 10 | - utils/stopPageContextScript: Use simpler technique to prevent execution (thanks @larsjohnsen) 11 | - subredditManager: Fix MOD/MODQUEUE buttons sometimes not appearing (thanks @larsjohnsen) 12 | - settingsConsole: Fix advanced dependsOn-options not updating after toggling advanced options (thanks @larsjohnsen) 13 | - accountSwitcher dropdown: Added support for screen readers (thanks @FrankSalmick) 14 | 15 | ### Housekeeping / Other 16 | 17 | - None (thanks nobody) 18 | -------------------------------------------------------------------------------- /lib/css/modules/_modhelper.scss: -------------------------------------------------------------------------------- 1 | #RESStyleSheetTipPane { 2 | display: none; 3 | position: relative; 4 | border: 1px solid #ddd; 5 | margin-bottom: 10px; 6 | width: calc(100% - 320px); 7 | } 8 | 9 | #RESStyleSheetTipPane-header { 10 | cursor: pointer; 11 | font-size: 20px; 12 | padding: 10px; 13 | border-bottom: 1px solid #ddd; 14 | 15 | span.details { 16 | margin-left: 20px; 17 | font-size: 12px; 18 | visibility: hidden; 19 | } 20 | 21 | &.minimized span.details { 22 | visibility: visible; 23 | } 24 | } 25 | 26 | #RESStyleSheetTipPane-contents { 27 | display: none; // hide by default 28 | padding: 10px; 29 | 30 | ul { 31 | list-style: initial; 32 | margin: 0 0 0 1em; 33 | } 34 | 35 | li p { 36 | margin: .75em 0; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/images/expandoImageGallery.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /lib/utils/__tests__/color.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import test from 'ava'; 4 | 5 | import { colorToArray, colorFromArray } from '../color'; 6 | 7 | test('colorToArray', t => { 8 | const to = colorToArray; 9 | 10 | t.deepEqual(to('#aabbcc'), [170, 187, 204]); 11 | t.deepEqual(to('#abc'), [170, 187, 204]); 12 | t.deepEqual(to('rgb(1,2,3)'), [1, 2, 3]); 13 | t.deepEqual(to('white'), [255, 255, 255]); 14 | t.deepEqual(to('not a color'), [0, 0, 0]); 15 | }); 16 | 17 | test('colorFromArray', t => { 18 | const from = colorFromArray; 19 | 20 | t.is(from([170, 187, 204]), '#aabbcc'); 21 | t.is(from([170, 187, 204]), '#aabbcc'); 22 | t.is(from([1, 2, 3]), '#010203'); 23 | t.is(from([255, 255, 255]), '#ffffff'); 24 | t.is(from([0, 0, 0]), '#000000'); 25 | }); 26 | -------------------------------------------------------------------------------- /changelog/v5.1.8.md: -------------------------------------------------------------------------------- 1 | ## [v5.1.8](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.1.8) 2 | 3 | ### New Features 4 | 5 | - New filteReddit option useRedditFilters to sync subreddit filters to reddit's native /r/all filters (thanks @erikdesjardins) 6 | - Derpibooru expando improvements: add captions to direct links, display source links (thanks @erikdesjardins) 7 | 8 | ### Bug Fixes 9 | 10 | - Fix the current filterline filter occasionally not being retested (thanks @larsjohnsen) 11 | - Prevent RES from running on modmail beta and breaking styles (thanks @andytuba) 12 | - Fix commentNavigator selecting the wrong post when at a non-default zoom level (thanks @larsjohnsen) 13 | - Fix timezone of Submit Helper already submitted warning (thanks @corylulu) 14 | -------------------------------------------------------------------------------- /lib/images/expandoImageGallery-active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/browseCases/LoggedInAs.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { PagePhases, loggedInUser } from '../../../utils'; 4 | import { Case } from '../Case'; 5 | 6 | export class LoggedInAs extends Case { 7 | static text = 'Logged in user'; 8 | 9 | static defaultConditions = { loggedInAs: '' }; // Don't try to fetch current username as the default value, as that may trigger `loggedInUser` prematurely 10 | static fields = ['logged in as /u/', { type: 'text', id: 'loggedInAs' }]; 11 | 12 | value = Case.buildRegex(this.conditions.loggedInAs); 13 | 14 | async evaluate() { 15 | await PagePhases.contentStart; // loggedInUser requires the header to be loaded 16 | const myName = loggedInUser(); 17 | return !!myName && this.value.test(myName); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/subredditInfo.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'basic functionality': browser => { 3 | if (browser.options.desiredCapabilities.browserName === 'firefox') { 4 | // geckodriver doesn't support moveto https://github.com/mozilla/geckodriver/issues/159 5 | browser.end(); 6 | return; 7 | } 8 | 9 | browser 10 | .url('https://en.reddit.com/by_id/t3_633w4z') 11 | .waitForElementVisible('.thing.link .subreddit') 12 | .moveToElement('.thing.link .subreddit', 0, 0) 13 | .pause(1000) 14 | .waitForElementVisible('.RESHover') 15 | .assert.containsText('.RESHover', '/r/RESIntegrationTests') 16 | .assert.visible('.RESHover a[href$="/r/RESIntegrationTests"]') 17 | .assert.containsText('.RESHover', 'Subreddit created:') 18 | .end(); 19 | }, 20 | }; 21 | -------------------------------------------------------------------------------- /changelog/v5.16.3.md: -------------------------------------------------------------------------------- 1 | ## [v5.16.3](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.16.3) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Adjust filteReddit hideUntilProcessed to decrease chance of it breaking Reddit (thanks @larsjohnsen) 10 | - Fix betteReddit videoInfo being displayed for wrong videos (thanks @larsjohnsen) 11 | - Fix neverEndingReddit on the saved posts list (thanks @larsjohnsen) 12 | - commentTools autocomplete: Fix clicking on suggestion (thanks @larsjohnsen) 13 | - watcher: Reregister posts after they have been edited (thanks @larsjohnsen) 14 | - Fix commentPreview not showing a scrollbar on long comments (thanks @larsjohnsen) 15 | 16 | ### Housekeeping / Other 17 | 18 | - None (thanks nobody) 19 | -------------------------------------------------------------------------------- /lib/modules/localDate.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import $ from 'jquery'; 4 | import { Module } from '../core/module'; 5 | 6 | export const module: Module<*> = new Module('localDate'); 7 | 8 | module.moduleName = 'localDateName'; 9 | module.category = 'myAccountCategory'; 10 | module.description = 'localDateDesc'; 11 | 12 | module.contentStart = () => { 13 | $(document.body) 14 | .on('mouseenter', 'time', function() { 15 | const $this = $(this); 16 | if (!$this.data('originalTitle')) { 17 | $this.data('originalTitle', $this.attr('title')); 18 | } 19 | $this.attr('title', new Date($this.attr('datetime'))); 20 | }) 21 | .on('mouseleave', 'time', function() { 22 | const $this = $(this); 23 | $this.attr('title', $this.data('originalTitle')); 24 | }); 25 | }; 26 | -------------------------------------------------------------------------------- /changelog/v5.7.6.md: -------------------------------------------------------------------------------- 1 | ## [v5.7.6](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.7.6) 2 | 3 | ### New Features 4 | 5 | - Basic Night Mode support for new profile pages (thanks @andytuba) 6 | - New focusOnSearchBox keyboard shortcut (alt-/ by default) (thanks @Propheis) 7 | - New s[earch] and sr command line commands for searching reddit or the current subreddit (thanks @Propheis) 8 | - Pornhub embeds (thanks @christophe-ph) 9 | 10 | ### Bug Fixes 11 | 12 | - Fix flair searching when post has a x-post link (thanks @erikdesjardins) 13 | - Fix commentDepth (thanks @erikdesjardins) 14 | 15 | ### Housekeeping / Other 16 | 17 | - Clean up some settings console builder CSS (thanks @larsjohnsen) 18 | - Remove some unused res.com host permissions (thanks @erikdesjardins) 19 | -------------------------------------------------------------------------------- /lib/environment/foreground/pageAction.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { frameThrottle } from '../../utils/async'; 4 | import { addListener, sendMessage } from './messaging'; 5 | 6 | const clickListeners = []; 7 | 8 | export function onClick(callback: () => void) { 9 | clickListeners.push(callback); 10 | } 11 | 12 | addListener('pageActionClick', () => { for (const fn of clickListeners) fn(); }); 13 | 14 | // Don't update before page is visible, as Firefox (buggily?) ignores pageAction updates to hidden pages 15 | const update = frameThrottle(value => sendMessage('pageAction', value)); 16 | 17 | export function show(state?: boolean = false) { 18 | return update({ operation: 'show', state }); 19 | } 20 | 21 | export function hide() { 22 | return update({ operation: 'hide' }); 23 | } 24 | -------------------------------------------------------------------------------- /lib/modules/hosts/simplecove.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | import { ajax } from '../../environment'; 5 | 6 | export default new Host('simplecove', { 7 | name: 'SimpleCove', 8 | domains: ['simplecove.com'], 9 | logo: 'https://simplecove.com/static/images/reslogo.jpg', 10 | detect: ({ pathname }) => (/^\/(\d+)/i).exec(pathname), 11 | async handleLink(elem, [, id]) { 12 | const data = await ajax({ 13 | url: `https://www.simplecove.com/resapi/${id}`, 14 | type: 'json', 15 | }); 16 | 17 | const images = data.map(x => ({ 18 | src: x.photo_src.replace('http:', 'https:'), 19 | caption: x.photo_caption, 20 | type: 'IMAGE', 21 | })); 22 | 23 | return { 24 | type: 'GALLERY', 25 | src: images, 26 | }; 27 | }, 28 | }); 29 | -------------------------------------------------------------------------------- /changelog/v5.22.11.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.11](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.11) 2 | 3 | ### New Features 4 | 5 | - Added Reddit Tor support (thanks @Ben) 6 | 7 | ### Bug Fixes 8 | 9 | - Send Spam button to reddit.com/reports (thanks @ElijahPepe) 10 | - Update pixiv.js to new embed URL (thanks @aldearg) 11 | - FUpdate showImages.js to fix google reverse image search URL (thanks @tompreuss) 12 | - Nightmode fixes on profile page (thanks @ethanjlopez) 13 | - Fix YouTube's video pausing (thanks @ElijahPepe) 14 | - Reliably detect reddit gallery posts with a caption link (thanks @themacguffinman) 15 | - Display user tags that have a colour without any text (thanks @@cnopt) 16 | 17 | ### Housekeeping / Other 18 | 19 | - Build/Quality of live tweaks/fixes (thanks @larsjohnsen ) -------------------------------------------------------------------------------- /changelog/v5.9.5.md: -------------------------------------------------------------------------------- 1 | ## [v5.9.5](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.9.5) 2 | 3 | ### New Features 4 | 5 | - Overhaul Filterline (thanks @larsjohnsen) 6 | - Add comment filtering (thanks @larsjohnsen) 7 | - Show start time of YouTube videos in post titles (thanks @metcorne) 8 | - New Go Mode (press G first) shortcuts shift-O and shift-P to navigate to overview legacy or new profiles (thanks @overdodactyl) 9 | - Never Ending Reddit will provide a warning if a loaded page is for an incorrect user (thanks @andytuba) 10 | - Empty comment navigator categories are hidden (thanks @rageandqq) 11 | 12 | ### Bug Fixes 13 | 14 | - (beta) Fix downvote->upvote being counted incorrectly (thanks @pll33) 15 | 16 | ### Housekeeping / Other 17 | 18 | - Clean up scripts (thanks @mc10) 19 | -------------------------------------------------------------------------------- /lib/utils/object.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | /* 4 | * Roughly equivalent to `$.extend(true, target, source)` 5 | * Unfortunately lodash does not seem to offer any function that does this: 6 | * _.assign/_.extend/Object.assign are not recursive 7 | * _.merge and _.defaultsDeep ignore undefined values 8 | */ 9 | export function extendDeep(target: { [string]: mixed }, source: { [string]: mixed }): { [string]: mixed } { 10 | for (const key of Object.keys(source)) { 11 | if ( 12 | target[key] && source[key] && 13 | typeof target[key] === 'object' && typeof source[key] === 'object' && 14 | !Array.isArray(source[key]) && !Array.isArray(target[key]) 15 | ) { 16 | extendDeep(target[key], source[key]); 17 | } else { 18 | target[key] = source[key]; 19 | } 20 | } 21 | return target; 22 | } 23 | -------------------------------------------------------------------------------- /changelog/v5.20.6.md: -------------------------------------------------------------------------------- 1 | ## [v5.20.6](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.20.6) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - accountSwitcher: Display specific error message when a wrong one time password is entered (thanks @larsjohnsen) 10 | - showImages: Hide host-specific options on disabled hosts (thanks @larsjohnsen) 11 | - showImages video: Fix native controls attribute restoration when leaving fullscreen on Firefox (thanks @larsjohnsen) 12 | - settingsConsole: Fix advanced options toggle, so changes are visible without reloading page (thanks @larsjohnsen) 13 | - utils/stopPageContextScript: Fix undo process not being executed sequentially (thanks @larsjohnsen) 14 | 15 | ### Housekeeping / Other 16 | 17 | - None (thanks nobody) 18 | -------------------------------------------------------------------------------- /lib/css/modules/_newCommentCount.scss: -------------------------------------------------------------------------------- 1 | .newComments { 2 | display: inline; 3 | .res-hasNewComments & { color: orangered; } 4 | } 5 | 6 | .RESSubscriptionButton { 7 | float: right; 8 | contain: paint; 9 | cursor: pointer; 10 | color: #369; 11 | font-size: 12px; 12 | line-height: 1; 13 | padding: 2px 7px; 14 | border: 1px solid; 15 | border-radius: 2px; 16 | background-color: rgb(255, 255, 255); 17 | 18 | .res-icon { 19 | font-size: 12px; 20 | } 21 | } 22 | 23 | #newCommentsTable { 24 | .RESSubscriptionButton { 25 | padding: 0; 26 | border: none; 27 | background: transparent; 28 | 29 | .res-icon { 30 | font-size: 16px; 31 | vertical-align: middle; 32 | } 33 | } 34 | 35 | abbr { 36 | cursor: help; 37 | border-bottom: 1px dotted; 38 | text-decoration: none; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tests/notifications.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'basic functionality': browser => { 3 | // note: this has failed in the past because the "test notifications" button 4 | // was just at the edge of the settings console scroll container 5 | // (so, inside the window boundaries, but not visible in the settings console) 6 | // so Firefox didn't scroll it into view and just silently failed to click it 7 | // (it probably clicked on the overlay below the settings console instead) 8 | browser 9 | .url('https://en.reddit.com/wiki/pages/#res:settings-redirect-standalone-options-page/troubleshooter') 10 | .waitForElementVisible('#RESConsoleContainer') 11 | .click('#testNotifications') 12 | .assert.containsText('.RESNotification .RESNotificationHeader', 'Template test') 13 | .end(); 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /lib/modules/hosts/xkcd.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | import { ajax } from '../../environment'; 5 | 6 | export default new Host('xkcd', { 7 | name: 'xkcd', 8 | domains: ['xkcd.com'], 9 | permissions: ['https://xkcd.com/*/info.0.json'], 10 | logo: 'https://xkcd.com/favicon.ico', 11 | detect: ({ hostname, pathname }) => ( 12 | // primarily to exclude what-if.xkcd.com 13 | ['xkcd.com', 'www.xkcd.com'].includes(hostname) && 14 | (/^\/([0-9]+)(?:\/|$)/i).exec(pathname) 15 | ), 16 | async handleLink(href, [, id]) { 17 | const { title, alt, img } = await ajax({ 18 | url: `https://xkcd.com/${id}/info.0.json`, 19 | type: 'json', 20 | }); 21 | 22 | return { 23 | type: 'IMAGE', 24 | title, 25 | caption: alt, 26 | src: img, 27 | }; 28 | }, 29 | }); 30 | -------------------------------------------------------------------------------- /lib/css/modules/_voteEnhancements.scss: -------------------------------------------------------------------------------- 1 | .res-voteEnhancements-colorLinkScore-automatic, 2 | .res-voteEnhancements-colorLinkScore-user { 3 | .link .rank { 4 | color: #fff; 5 | text-align: center; 6 | border-radius: 1em; 7 | font-size: 12px; 8 | padding: 4px; 9 | line-height: 1; 10 | height: 1em; 11 | min-width: 1em; 12 | } 13 | } 14 | 15 | .res-voteEnhancements-estimatePostScore { 16 | .linkinfo .upvotes { 17 | font-size: 80%; 18 | color: orangered; 19 | } 20 | 21 | .linkinfo .downvotes { 22 | font-size: 80%; 23 | color: #5f99cf; 24 | } 25 | } 26 | 27 | .res-voteEnhancements-estimatePostVotes { 28 | .linkinfo .totalvotes { 29 | font-size: 80%; 30 | } 31 | } 32 | 33 | .res-voteEnhancements-highlightScores { 34 | span.score { 35 | font-weight: bold; 36 | color: #333; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /changelog/v1.8.md: -------------------------------------------------------------------------------- 1 | ## v1.8 2 | 3 | ### New features 4 | 5 | - Safari - now a native extension! No more need for Ninjakit or Greasekit 6 | - Inline Image Viewer 7 | - Updated to have a nice little +/- icon, and moved the link to show/hide images. 8 | 9 | ### Bug fixes 10 | 11 | - Inline Image Viewer 12 | - Fixed [duplicate image ignored] bug where it was showing up all sorts of unsavory places 13 | - Fixed inline image viewing in comments 14 | - Account Switcher 15 | - Added an alert message if you have set your username/password incorrectly. 16 | - Save Comments 17 | - Fixed an issue with international reddit users not seeing the 'saved comments' tab. 18 | - User Tagger 19 | - Fixed an issue where up/downvote tracking was still happening even if colorUser was turned off. 20 | - Fixed a date bug in the user info rollover 21 | -------------------------------------------------------------------------------- /lib/environment/background/storage.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { keyedMutex } from '../../utils/async'; 4 | import { apiToPromise } from '../utils/api'; 5 | import { addListener } from './messaging'; 6 | 7 | const __set = apiToPromise((items, callback) => chrome.storage.local.set(items, callback)); 8 | const _set = (key, value) => __set({ [key]: value }); 9 | const __get = apiToPromise((keys, callback) => chrome.storage.local.get(keys, callback)); 10 | const _get = async (key, defaultValue = null) => (await __get({ [key]: defaultValue }))[key]; 11 | 12 | addListener('storage-cas', keyedMutex(async ([key, defaultValue, oldValue, newValue]) => { 13 | const storedValue = await _get(key, defaultValue); 14 | if (storedValue !== oldValue) return false; 15 | await _set(key, newValue); 16 | return true; 17 | }, ([key]) => key)); 18 | -------------------------------------------------------------------------------- /flow/lib/snudown.js.flow: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | declare module 'snudown-js' { 4 | declare var version: string; 5 | 6 | declare var RENDERER_USERTEXT: number; 7 | declare var RENDERER_WIKI: number; 8 | 9 | declare type MarkdownOptions = { 10 | text: string, 11 | nofollow?: boolean, 12 | target?: string, 13 | enableToc?: boolean, 14 | tocIdPrefix?: string, 15 | }; 16 | 17 | declare function markdown(options: MarkdownOptions & { renderer?: number }): string; 18 | declare function markdown(text: string, nofollow?: boolean, target?: string, renderer?: number, enableToc?: boolean, tocIdPrefix?: string): string; 19 | 20 | declare function markdownWiki(options: MarkdownOptions): string; 21 | declare function markdownWiki(text: string, nofollow?: boolean, target?: string, enableToc?: boolean, tocIdPrefix?: string): string; 22 | } 23 | -------------------------------------------------------------------------------- /changelog/v4.7.4.md: -------------------------------------------------------------------------------- 1 | ## [v4.7.4](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v4.7.4) 2 | 3 | ### Bug Fixes 4 | 5 | - Fix drag-to-resize in Safari (thanks @larsjohnsen) 6 | - Fix albums not correctly switching to slideshow mode from filmstrip mode in some situations (thanks @larsjohnsen) 7 | - Fix NSFWQuickToggle still appearing when disabled (thanks @erikdesjardins) 8 | - Fix styleTweaks reapplying subreddit style when it was disabled natively (thanks @erikdesjardins) 9 | 10 | ### Housekeeping / Other 11 | 12 | - Support new streamable.com URL format (thanks @erikdesjardins) 13 | - Firefox release is now correctly limited to Firefox 48 and up (thanks @erikdesjardins) 14 | - Update cookie deletion (i.e. account switcher) to work with Firefox 48 (thanks @erikdesjardins) 15 | - Clean up some options code (thanks @erikdesjardins) 16 | -------------------------------------------------------------------------------- /changelog/v5.3.5.md: -------------------------------------------------------------------------------- 1 | ## [v5.3.5](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.3.5) 2 | 3 | ### New Features 4 | 5 | - New RES Feature Throttle module to delay or disable some features when they're repeatedly ignored (thanks @andytuba) 6 | - Hide Child Comments allows hiding children of any comment, instead of only top level comments (thanks @pltarun) 7 | - Gfycat videos with #?direction=reverse in the URL start reversed (thanks @WilliamChiu) 8 | 9 | ### Bug Fixes 10 | 11 | - Fix erroneously running on about.reddit.com (thanks @erikdesjardins) 12 | - Work around some Edge parsing issues (thanks @erikdesjardins) 13 | 14 | ### Housekeeping / Other 15 | 16 | - Remove external CSS stylesheet (thanks @roshkins) 17 | - Improve efficiency and ergonomics of utilities used (internally) for watching for elements (big thanks @larsjohnsen) 18 | -------------------------------------------------------------------------------- /lib/utils/flow.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | /* eslint-disable no-redeclare, no-unused-vars */ 4 | declare function downcast(val: From, ty: Class): To; 5 | declare function downcast(val: mixed, ty: 'boolean'): boolean; 6 | declare function downcast(val: mixed, ty: 'number'): number; 7 | declare function downcast(val: mixed, ty: 'string'): string; 8 | /* eslint-enable no-unused-vars */ 9 | 10 | export function downcast(val, ty) { 11 | if ( 12 | // only perform the check in dev mode, but hide this from Flow 13 | /*:: ` */ process.env.NODE_ENV !== 'development' || /*:: ` && */ 14 | (typeof ty === 'string' ? typeof val === ty : val instanceof ty) // eslint-disable-line valid-typeof 15 | ) { 16 | return val; 17 | } 18 | 19 | throw new TypeError(`Expected ${val} to be instance of ${ty}.`); 20 | } 21 | /* eslint-enable no-redeclare */ 22 | -------------------------------------------------------------------------------- /changelog/v5.22.1.md: -------------------------------------------------------------------------------- 1 | ## [v5.22.1](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.22.1) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - Fix some hover / alert styles 10 | - commentNavigator: Fix navigator menu not being added on some pages 11 | - commentPreview: Fix UI issues (the preview and big editor button being duplicated in some instances) 12 | - context: Fix addViewFullContext 13 | - newCommentCount: Fix subscribe button not being added on some pages 14 | - nightmode: Fix geolocation permission issue in settings console 15 | 16 | ### Housekeeping / Other 17 | 18 | - watchers: Continue streaming posts during `contentStart` phase until posts cover the entire viewport 19 | - ner: Remove jquery dependency, minor refactor 20 | - subredditManager / dashboard: Refactor sidebar shortcut buttons 21 | -------------------------------------------------------------------------------- /lib/modules/hosts/giphy.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | import { ajax } from '../../environment'; 5 | import logo from '../../images/hosts/giphy-logo.png'; 6 | 7 | export default new Host('giphy', { 8 | name: 'giphy', 9 | domains: ['giphy.com'], 10 | logo, 11 | detect: ({ pathname }) => (/^(?:\/gifs|\/media|)\/(?:\w+-)*([^/.]+)(?:\/|\.gif|$)/i).exec(pathname), 12 | async handleLink(href, [, id]) { 13 | const { data } = await ajax({ 14 | url: `https://api.giphy.com/v1/gifs/${id}`, 15 | query: { api_key: 'dc6zaTOxFJmzC' }, 16 | type: 'json', 17 | }); 18 | 19 | return { 20 | type: 'VIDEO', 21 | fallback: data.images.original.url, 22 | loop: true, 23 | muted: true, 24 | sources: [{ 25 | source: data.images.original.mp4, 26 | type: 'video/mp4', 27 | }], 28 | }; 29 | }, 30 | }); 31 | -------------------------------------------------------------------------------- /lib/environment/background/permissions/prompt.entry.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { handleMessage } from '../permissions'; 4 | 5 | const url = new URL(location.href); 6 | 7 | const button = document.body.querySelector('#request'); 8 | button.addEventListener('click', async () => { 9 | try { 10 | const result = await handleMessage({ 11 | operation: 'request', 12 | permissions: JSON.parse(url.searchParams.get('permissions') || '[]'), 13 | origins: JSON.parse(url.searchParams.get('origins') || '[]'), 14 | }); 15 | url.searchParams.set('result', JSON.stringify(result)); 16 | location.href = url.href; 17 | } catch (e) { 18 | alert(`An error occured: ${e.message}`); // eslint-disable-line no-restricted-globals 19 | } 20 | }); 21 | 22 | // Focus, so pressing space / enter can be used as an alternative to clicking the button 23 | button.focus(); 24 | -------------------------------------------------------------------------------- /lib/modules/hosts/spotify.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | 5 | export default new Host('spotify', { 6 | name: 'spotify', 7 | domains: ['spotify.com'], 8 | logo: 'https://spotify.com/favicon.ico', 9 | /* 10 | * Match the following: 11 | * https://open.spotify.com/track/id 12 | * https://play.spotify.com/artist/id 13 | * https://play.spotify.com/album/id 14 | * https://open.spotify.com/user/someUser/playlist/id 15 | * TODO: Check username restrictions, match with something better than \w+ 16 | */ 17 | detect: ({ href }) => (/^https:\/\/(?:open|play)\.spotify\.com\/((?:track|artist|album|user\/\w+\/playlist)\/[a-zA-z0-9]+)$/i).exec(href), 18 | handleLink(href, [, uri]) { 19 | return { 20 | type: 'IFRAME', 21 | embed: `https://embed.spotify.com/?uri=spotify:${uri.replace(/\//g, ':')}`, 22 | }; 23 | }, 24 | }); 25 | -------------------------------------------------------------------------------- /changelog/v1.6.5.md: -------------------------------------------------------------------------------- 1 | ## v1.65 2 | 3 | ### New features 4 | 5 | - Core Code 6 | - Made some more improvements to efficiency in a few modules to release control of the browser 7 | - Specifically, delegated chunking of applying DOM changes to really large pages. 8 | - Inline Image Viewer 9 | - The image viewer now skips over images it has already revealed (so you won't see the same image twice) 10 | - Save Comments 11 | - Moved "save" button before "reply" button to avoid accidental link saving. 12 | - Keyboard Navigation 13 | - Added the option for comment links (numbered links) to open in a new tab/window - this is the default 14 | 15 | ### Bug fixes 16 | 17 | - Subreddit Tagger 18 | - Fixed a bug where subreddits with mixed case weren't being tagged properly 19 | - Hide Comments 20 | - Fixed a problem where the "automatic" setting wasn't functioning properly 21 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/UserTag.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { PatternCase } from '../Case'; 4 | import { Tag } from '../../userTagger'; 5 | 6 | export class UserTag extends PatternCase { 7 | static text = 'User tag'; 8 | 9 | static async thingToCriterion(thing: *) { 10 | const author = thing.getAuthor(); 11 | return author && (await Tag.get(author)).text || ''; 12 | } 13 | 14 | static fields = ['author of this post has tag matching ', { type: 'text', id: 'patt' }]; 15 | 16 | static pattern = '[RegEx]'; 17 | 18 | trueText = `user tag ${this.conditions.patt}`.trim(); 19 | 20 | value = this.build(true, '/./'); 21 | 22 | async evaluate(thing: *) { 23 | const author = thing.getAuthor(); 24 | if (!author) return null; 25 | const tag = (await Tag.get(author)).text; 26 | return tag ? this.value.some(v => v.test(tag)) : false; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /changelog/v5.20.10.md: -------------------------------------------------------------------------------- 1 | ## [v5.20.10](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.20.10) 2 | 3 | ### New Features 4 | 5 | - None (thanks nobody) 6 | 7 | ### Bug Fixes 8 | 9 | - backupAndRestore: Also show .json files in the file picker 10 | - subredditManager: Sort multireddit subs with case insensitivity 11 | - subredditManager: Fix issue causing the "mod" shortcut to not be generated 12 | - showImages: Also auto-play videos containing sound when the option `startVideosMuted` is enabled 13 | - showImages show images button: Don't open uninitialized expondos 14 | 15 | ### Housekeeping / Other 16 | 17 | - Added roles to image step buttons, table steps (thanks @FrankSalmick) 18 | - Build commands for browsers other than Chrome must include `--env browsers=[browser]` 19 | - Update node version requirement in CONTRIBUTING.md (thanks @KennethTsang9286) 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 17 | 18 | - My browser (copy from https://www.whatismybrowser.com): 19 | - My RES version: 20 | - Am I in reddit beta (yes/no): 21 | 22 | *What's the problem?* 23 | 24 | 25 | 26 | *Are there any related posts in https://github.com/honestbleeps/Reddit-Enhancement-Suite/issues or /r/RESissues?* 27 | 28 | 29 | 30 | *What other browser extensions are installed?* 31 | -------------------------------------------------------------------------------- /lib/modules/hosts/photobucket.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Host } from '../../core/host'; 4 | import { ajax } from '../../environment'; 5 | 6 | export default new Host('photobucket', { 7 | name: 'photobucket', 8 | domains: ['photobucket.com'], 9 | logo: 'https://pic2.pbsrc.com/common/favicon.ico', 10 | detect: ({ href }) => (/([is]?)[0-9]+|media|smg|img(?=.photobucket.com)/i).exec(href), 11 | async handleLink(href, [, prefix]) { 12 | let src = href.replace('.html', ''); 13 | 14 | // user linked direct image so no need to hit API 15 | if (prefix !== 'i') { 16 | const { imageUrl } = await ajax({ 17 | url: 'https://api.photobucket.com/v2/media/fromurl', 18 | query: { url: src }, 19 | type: 'json', 20 | }); 21 | src = imageUrl.replace('http:', 'https:'); 22 | } 23 | 24 | return { 25 | type: 'IMAGE', 26 | src, 27 | }; 28 | }, 29 | }); 30 | -------------------------------------------------------------------------------- /lib/utils/generator.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function* range(start: number, end: number): Iterable { 4 | for (let i = start; i < end; ++i) { // eslint-disable-line no-restricted-syntax 5 | yield i; 6 | } 7 | } 8 | 9 | /* eslint-disable no-redeclare, no-unused-vars */ 10 | declare function zip(a: Iterable): Iterable<[A]>; 11 | declare function zip(a: Iterable, b: Iterable): Iterable<[A, B]>; 12 | declare function zip(a: Iterable, b: Iterable, c: Iterable): Iterable<[A, B, C]>; 13 | /* eslint-enable no-unused-vars */ 14 | 15 | export function* zip(...iterables) { 16 | const generators = iterables.map(it => it[Symbol.iterator]()); 17 | let results; 18 | 19 | while ((results = generators.map(gen => gen.next())).some(r => !r.done)) { 20 | yield results.map(r => r.value); 21 | } 22 | } 23 | /* eslint-enable no-redeclare */ 24 | -------------------------------------------------------------------------------- /locales/locales/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | /* eslint-disable camelcase */ 3 | 4 | import de from './de.json'; 5 | import el from './el.json'; 6 | import en from './en.json'; 7 | import en_lolcat from './en@lolcat.json'; 8 | import en_pirate from './en@pirate.json'; 9 | import en_CA from './en_CA.json'; 10 | import en_GB from './en_GB.json'; 11 | import es from './es.json'; 12 | import es_419 from './es_419.json'; 13 | import he from './he.json'; 14 | import it from './it.json'; 15 | import nl_NL from './nl_NL.json'; 16 | import pl from './pl.json'; 17 | import pt from './pt.json'; 18 | import pt_BR from './pt_BR.json'; 19 | import pt_PT from './pt_PT.json'; 20 | 21 | export default { 22 | de, 23 | el, 24 | en, 25 | en_lolcat, 26 | en_pirate, 27 | en_CA, 28 | en_GB, 29 | es, 30 | es_419, 31 | he, 32 | it, 33 | nl_NL, 34 | pl, 35 | pt, 36 | pt_BR, 37 | pt_PT, 38 | }; 39 | -------------------------------------------------------------------------------- /changelog/v5.5.2.md: -------------------------------------------------------------------------------- 1 | ## [v5.5.2](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.5.2) 2 | 3 | ### New Features 4 | 5 | - New Hastebin media host (thanks @lhofmann) 6 | - New Pixiv media host (thanks @arandomguydontmindme, @BenMcGarry, @erikdesjardins) 7 | - Reimplement Search Helper searchBySubreddit option (thanks @lhofmann) 8 | 9 | ### Bug Fixes 10 | 11 | - Fix collapsed posts showing highlight color instead of gray (thanks @lhofmann) 12 | - Fix images in Tumblr albums linking to the current page instead of the post (thanks @erikdesjardins, @WilliamChiu) 13 | 14 | ### Housekeeping / Other 15 | 16 | - Switch to (embedded) WebExtension in Firefox (thanks @erikdesjardins) 17 | - Add a border to selected module in Settings Console (thanks @cmckenzie6) 18 | - Build/manifest cleanup (thanks @erikdesjardins) 19 | - Update contributing docs (thanks @erikdesjardins) 20 | -------------------------------------------------------------------------------- /lib/css/modules/_commandLine.scss: -------------------------------------------------------------------------------- 1 | @import '../zindex'; 2 | 3 | #keyCommandLineWidget { 4 | font-size: 14px; 5 | position: fixed; 6 | top: 30px; 7 | left: 50%; 8 | margin-left: -275px; 9 | z-index: $zindex-command-line-widget; 10 | width: 550px; 11 | border: 3px solid #555; 12 | border-radius: 10px; 13 | padding: 10px; 14 | background-color: #333; 15 | color: #CCC; 16 | opacity: .95; 17 | } 18 | 19 | #keyCommandInput { 20 | width: 240px; 21 | background-color: #999; 22 | margin-right: 10px; 23 | } 24 | 25 | #keyCommandInputTip { 26 | margin-top: 5px; 27 | color: #9F9; 28 | 29 | ul { 30 | font-size: 11px; 31 | list-style-type: disc; 32 | } 33 | 34 | li { 35 | margin-left: 15px; 36 | } 37 | 38 | pre { 39 | white-space: pre-wrap; 40 | } 41 | } 42 | 43 | #keyCommandInputError { 44 | margin-top: 5px; 45 | color: red; 46 | font-weight: bold; 47 | } 48 | -------------------------------------------------------------------------------- /lib/modules/filteReddit/postCases/PostAfter.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { Case } from '../Case'; 4 | 5 | export class PostAfter extends Case { 6 | static text = 'Post after'; 7 | 8 | static parseCriterion(input: *) { return { patt: input }; } 9 | static thingToCriterion(thing: *) { return thing.getTimestamp().toISOString(); } 10 | 11 | static defaultConditions = { patt: (new Date()).toISOString() }; 12 | static fields = ['posted after date ', { type: 'text', id: 'patt' }]; 13 | 14 | static pattern = 'Date — string representing a RFC2822 or ISO 8601 date'; 15 | 16 | trueText = `after ${this.conditions.patt}`; 17 | 18 | value = new Date(this.conditions.patt); 19 | 20 | isValid() { return !isNaN(this.value); } 21 | 22 | evaluate(thing: *) { 23 | const postTime = thing.getTimestamp(); 24 | if (!postTime) return null; 25 | return postTime >= this.value; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /changelog/v5.5.12.md: -------------------------------------------------------------------------------- 1 | ## [v5.5.12](https://github.com/honestbleeps/Reddit-Enhancement-Suite/releases/v5.5.12) 2 | 3 | ### New Features 4 | 5 | - New XboxDVR media host (thanks @BenMcGarry) 6 | - Add "usage information" button to Filterline dropdown (thanks @larsjohnsen) 7 | 8 | ### Bug Fixes 9 | 10 | - Fix Gfycat favicon URL (thanks @larsjohnsen) 11 | - Fix notifications sometimes not closing when clicking the close button (thanks @larsjohnsen) 12 | - Fix some iframe expandos being the wrong width (thanks @larsjohnsen) 13 | - Fix OneDrive expandos (thanks @BenMcGarry) 14 | - Fix three-digit post rank getting cut off (thanks @erikdesjardins) 15 | 16 | ### Housekeeping / Other 17 | 18 | - Avoid opening daily tips and feature tips concurrently (thanks @larsjohnsen) 19 | - Minor code cleanup in Table Tools (thanks @mc10) 20 | - Make followLinkTabFocus a non-advanced option (thanks @larsjohnsen) 21 | -------------------------------------------------------------------------------- /changelog/v1.1.md: -------------------------------------------------------------------------------- 1 | ## v1.1 2 | 3 | ### New features 4 | 5 | - Image Viewer 6 | - Added ability to toggle images back off 7 | - Added an option to not show images tagged as NSFW 8 | - Keyboard Nav 9 | - Added the following new keys: 10 | - l - clicks the l+c link (opens link and comments in new tabs) 11 | - h - hides the link 12 | - r - goes to subreddit of selected link (link pages only) 13 | - User Tagger 14 | - Added the ability to ignore a user's posts and comments. 15 | 16 | ### Bug fixes 17 | 18 | - Username Hider / Show Comment Karma 19 | - Fixed a bug where these items conflicted. 20 | - Keyboard Nav 21 | - Swapped J and K keys to match VI defaults at community's request. 22 | - Fixed a bug where downvoting didn't work for users with thumbnails visible. 23 | - Live Comment Preview 24 | - Fixed a bug where live comments weren't visible on edits of a reply that was just posted 25 | --------------------------------------------------------------------------------