FlyerTalk Forums - View Single Post - Flyertalk can't seem to remember last viewed post
Old Jul 22, 2011 | 12:22 am
  #176  
ftnoob
Moderator, Southwest Airlines and Choice Privileges
All eyes on you!
15 Years on Site
 
Join Date: Mar 2008
Location: Central Texas
Posts: 3,112
Originally Posted by Microwave
I've not changed my system setup at all in the intervening time, same version of Firefox and everything. Any suggestions are welcome.
Seeing as you are already using Firefox, and assuming you can install GreaseMonkey if you don't have it already, you can use this updated user script. It replaces all new-post.hml (or new-post1.html links if the former & future name is not found) with the actual URL that the server is going to send back anyway as the 302 redirect URL. It saves one round trip communication with the server every time you click a first unread link.
Code:
// ==UserScript==
// @name           Workaround for FlyerTalk First Unread Post problem
// @author         wnProTips
// @namespace      http://www.flyertalk.com/forum/members/ftnoob.html
// @description    Changes all URLs of the form -new-post.html to the old style: showthread.php?goto=newpost&t=1234567
// @license        Creative Commons Attribution License
// @version	   1.1-b
// @released       2011-07-05
// @updated        2011-07-15
// @include        http://www.flyertalk.com/forum/*
// ==/UserScript==


window.addEventListener('load',
  function (e) {
    var $=unsafeWindow.jQuery, a='http://www.flyertalk.com/forum/showthread.php?goto=newpost&t=',b=$('a[href$="new-post.html"]'),i,u,t;
    if (b.length===0) {b=$('a[href$="new-post1.html"]')};
    b.each(function(h){
      u=b[h].href;i=u.lastIndexOf('/')+1;
      t=u.slice(i,i+7).replace(/[^0-9]/g,'');
      u=a+t;
      b[h].href=u;
     });
  }
,false);
BTW, I'm curious why IB didn't adopt the approach of abandoning the .html URL "lie" as proposed back on 05-July. Unlike the regular thread URLs, the "lie" doesn't seem to serve any significant purpose not served by the real URL.
ftnoob is offline