Reddit-Enhancement-Suite icon indicating copy to clipboard operation
Reddit-Enhancement-Suite copied to clipboard

Add visitOnLoad to neverEndingReddit

Open a8f opened this issue 4 years ago • 1 comments

Add options in neverEndingReddit to "visit" all links on the previous page when a new page is loaded

a8f avatar Jul 01 '20 15:07 a8f

I think this would be better suited for the betteReddit module.

Also take a look at the watchForThings interface, and the Thing methods. By using those, you could do something like this (not tested):

watchForThings(['post'], thing => {
  if (
    (module.options.visitOnLoad.value === 'links' && !thing.isLinkPost()) ||
    (module.options.visitOnLoad.value === 'self' && !thing.isSelfPost())
  ) return;
  addURLToHistory(thing.getPostUrl())
});

larsjohnsen avatar Jul 02 '20 19:07 larsjohnsen