37

I have gone through:

But what I desired was a Setting such as I could be able to configure 50 items per page as a default number of questions to be displayed on Stack Overflow even when I refresh or visit the site after a while.

Is this currently feasible by any other means?

I am Using Chrome version 60.0.3112.113 (official build) (64-bit).

14
  • 2
    When you aren't using the "new-nav", the setting is persistent. I turned it on once, and it's always on for me.
    – Cody Gray Mod
    Commented Sep 9, 2017 at 7:26
  • 4
    @CodyGray If I refresh the site, this goes off for me. Updating the question with Chrome version.
    – Naman
    Commented Sep 9, 2017 at 7:28
  • 17
    Depending on what I do, the number of items switches from 50 back to 15 very much too often. I reset it to 50; it sticks at 50 for a bit, then goes back to 15 on a whim. It's infuriating! Commented Sep 9, 2017 at 19:08
  • Same thing happens to me...
    – T-Heron
    Commented Sep 9, 2017 at 21:44
  • 4
    @JonathanLeffler: Yes, it's annoying. I skim the titles of the first 50 questions, then click on Next and get shown questions 16-30 again. Commented Sep 10, 2017 at 10:24
  • 2
    This is not a FR, it is a bug. It is supposed to remember your setting, and will even lose the pagination from page to page. While navigating, this means that going from page 1 with 50 selected, and then getting page 2 with 15 selected causes duplication. It is horribly frustrating, and I would honestly not expect to see any headway made here. It has been like this for years.
    – Travis J
    Commented Sep 11, 2017 at 9:07
  • @TravisJ It has been like this for years but probably I wasn't aware of it. Pagination is the key to selecting those numbers or else why to even select 50 for once.plus it reads per page..Any bug tracker, just in case we can get a reply from the developer mailing list for this?
    – Naman
    Commented Sep 11, 2017 at 11:20
  • "When you aren't using the "new-nav", the setting is persistent," @CodyGray I was under the impression that not using the "new-nav" is not an option for us (in other words we cannot switch back to the old-nav that didn't break pagination.) Is this option available to us or just you? Or am I mistaken?
    – zer00ne
    Commented Sep 11, 2017 at 19:08
  • 1
    It is an opt-in feature, @zer00ne. See "New Question Filter" in your profile preferences. (Did you also know that you can make the top-bar not sticky?)
    – Cody Gray Mod
    Commented Sep 11, 2017 at 19:10
  • Awesome thank you for the prompt reply.:)
    – zer00ne
    Commented Sep 11, 2017 at 19:11
  • @CodyGray That link is not accessible to me. Does that need some minimum reputation or subscription?
    – Naman
    Commented Sep 11, 2017 at 19:12
  • @nullpointer Of course not. It's a link to zer00ne's private profile page. Yours would be accessible with a bit of URL manipulation, though, to change the user ID to yours: stackoverflow.com/users/preferences/1746118
    – Cody Gray Mod
    Commented Sep 11, 2017 at 19:13
  • @CodyGray I've already opted in. But it's not persistent for me. Maybe we shall wait for the public release in that case?
    – Naman
    Commented Sep 11, 2017 at 19:17
  • 2
    I think you might have misunderstood. My original comment was saying that I have the new-nav turned off and the items-per-page is persistent for me. zer00ne was asking how to turn the new-nav off, because he was already opted in and didn't know how to opt out. Anyway, don't wait for a public release. One will not be forthcoming. The team has stopped working on this. I can't find the official source that says that at the moment, and too lazy to look for it thoroughly.
    – Cody Gray Mod
    Commented Sep 11, 2017 at 19:19

1 Answer 1

9

If you're okay with a workaround, I get around this by using the Requestly Extension. I set up a script that runs before page load and adds the pagesize GET parameter to the URL if it doesn't already exist. Note that I used the code from this SO answer to get all of the query parameters.

var options = window.location.search.slice(1).split('&')
    .reduce(function _reduce (a, b) {
       b = b.split('=');
       a[b[0]] = decodeURIComponent(b[1]);
       return a;
}, {});

if(options[""]){
   window.location += "?pagesize=50";   
}else if(!options["pagesize"]){
   window.location += "&pagesize=50";
}

I set it up to run on any host that contains "stackoverflow".

It does add pagesize=50 to SO URLs that don't have pagination (since it adds it to every page), but I haven't found any pages that break because of this extra parameter yet.

Edit

In the process of making this answer and linking to a specific SO answer I realized that my method does not work for linking directly to answers using a hash in the URL. I fixed this by simply ignoring any URLs that have a hash in them.

var options = window.location.search.slice(1).split('&')
.reduce(function _reduce (a, b) {
   b = b.split('=');
   a[b[0]] = decodeURIComponent(b[1]);
   return a;
}, {});

if(options[""] && !window.location.href.contains('#')){
   window.location += "?pagesize=50";   
}else if(!options["pagesize"]){
   window.location += "&pagesize=50";
}

The assumption here is that there are no SO URLs that contain hashes where we would also want to paginate. If that assumption fails, you could use regex to insert the extra query parameter before the hash.

2
  • How does this work with Requestly? What rule do I have to make? @user3312395
    – ifconfig
    Commented Sep 10, 2017 at 19:09
  • 2
    You make a new rule with the "Insert Script - add custom script to any webpage" option. Once you click on that, name the rule, and for source, select "Host", then "contains", then type "stackoverflow" into the text field. Then press "Add Custom Script" followed by the code radio button and insert the code I have listed above and make sure the "Before Page Load" option is selected from the drop down list. Commented Sep 10, 2017 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .