FlyerTalk Forums - View Single Post - Lifemiles serious booking problems - Beware (from January 2022 onwards)
Old Jul 25, 2022 | 11:17 pm
  #270  
dlflyer00
10 Countries Visited
20 Countries Visited
30 Countries Visited
5 Years on Site
 
Join Date: Nov 2018
Location: San Francisco
Programs: DL
Posts: 476
I'm just going to post this solution here. Again, at your own risk, untested, etc. LH F is worth the risk to me, but maybe not to you.

1. Make sure you are using Google Chrome.
2. Visit https://www.lifemiles.com/fly/find; make sure you log out and log back in to ensure your session didn't expire.
3. Right click anywhere on the page and click "Inspect". Go into the "Console" tab and paste the following, then make sure you hit enter.

var open_prototype = XMLHttpRequest.prototype.open,
intercept_response = function(urlpattern, callback) {
XMLHttpRequest.prototype.open = function() {
arguments['1'].match(urlpattern) && this.addEventListener('readystatechange', function(event) {
if ( this.readyState === 4 ) {
var response = callback(event.target.responseText);
Object.defineProperty(this, 'response', {writable: true});
Object.defineProperty(this, 'responseText', {writable: true});
this.response = this.responseText = response;
}
});
return open_prototype.apply(this, arguments);
};
};

intercept_response(/air-redemption-find-flight/i, function(response) {
var new_response = response.replace('"firstClass":false', '"firstClass":true');
return new_response;
});
Any new searches should now forcibly show the first class availability, if it exists. It won't create availability out of thin air. If you refresh the page, it will stop working. This works because there is a global "firstClass" flag returned by the LifeMiles server, and the UI does not render the F availability even if it exists, if this global flag is disabled. This forces every LM response to enable this flag.
dlflyer00 is offline