Go Back  FlyerTalk Forums > Travel&Dining > Travel Tools
Reload this Page >

ITA-Matrix-PowerTools - Userscript for Orbitz/DL/UA/AA/BA/CZ/IB/LA/LH/LX/TK

Old Nov 11, 2014, 10:54 am
FlyerTalk Forums Expert How-Tos and Guides
Last edit by: IAkH
Welcome to the ITA-Matrix-PowerTools
*** About ***
The ITA-Matrix-PowerTools are a user script maintained by fellow flyertalk members to enhance the already powerful Matrix of ITA Software by providing new features and booking links.

Features added to the itinerary details page:
  • convert times into 24h format
  • translation support
  • open fare rules in new window by default
  • price breakdown (base fare, taxes & carrier imposed surcharges)
  • editor mode (adjust cabin prior extraction)
  • multiple handy links (Seatguru, Planefinder, WhereToCredit)
  • new on page features like detailed mileage breakdown*, GCM-Map* and earned frequent flyer miles*
  • create links to various providers (OTAs / airlines / other tools) to try direct booking of your itinerary

Originally Posted by Error: Unable to find class IR6M2QD-k-i for itinRow.
If you see this error, currently you'll need to manually edit your installed script.

See posts from October 1st, 2018 for more information.
*requires background requests

The script may have lots of bugs and comes without warranty of any kind! Not all fares will be bookable or will price correctly in the booking engines. You are responsible for the money you spend - so double check your flights before purchasing AND use your sanity! Read this and the next two posts as an example: click

*** How it works ***
Using pure JavaScript we are "creating" some sort of hook that is periodically checking for page changes while working with the Matrix. As soon as you reload or leave the page the script stops (leaving the page or using the console-version) or starts from the beginning (using the userscript and perfoming a reload). Also this script is only running in these tabs/windows in which you are looking at the Matrix.
As soon as the script detects the itinerary page it reads its content - unless you activated the editor mode. It's parsing all the information found and creates - based on this information - several links to OTAs, airlines and other tools. Since we are able to remove, replace and add content to the page - we make them visible and clickable in a way you choose. By default there are no background requests.

*** How to get it running ***
There are three methods to install the script. All three below run exactly the same underlying script but are listed in order of installation complexity:

Method 1: Browser Extensions
Method 2: As a UserScript
It takes a moment to get it running but after that it will start automatically everytime you visit the Matrix and we will be able to store your settings. You will need to install a script manager.

Warning: Using a script manager and installing user scripts is a potential security risk - We need to mention it here.
Step 1: Install a script manager Step 2: Install the script
See the FAQ of your script manager how to install the script.
  • Through GreasyFork
  • Through OpenUserJS
  • Through GitHub: you should be asked whether you want to install it - make sure your script manager is running.
Method 3: iOS Safari Shortcut

Get the "Add ITA Matrix Powertools" Shortcut

Instructions much be run each time
  • Open ITA Matrix in Safari on your iPhone or iPad
  • Tap on the Share button in the bottom navigation
  • Scroll down through all the actions
  • Select Add ITA Matrix Powertools

Method 4: Console/Debug mode
You need to access the command line of your browser to execute the script. You can use either the regular version or the minified version. Just copy the entire text.

Chrome:
  1. Open Chrome DevTools: developer.chrome.com
  2. Switch to the console tab
  3. Paste the script into the command line: developer.chrome.com
  4. Run it
Firefox:
  1. Open the web console: developer.mozilla.org
  2. Switch to the console tab
  3. Paste the script into the command line: developer.mozilla.org
  4. Run it
Internet Explorer:
  1. Open the web console by pressing F12
  2. Switch to the console tab
  3. Paste the script into the command line - at the very bottom
  4. Run it by pressing the green triangle

*** How to use it ***
Once the script is running you should see a new line above the ITA logo:
Code:
Passengers (1a) Settings (v0.18) (Cabin: Auto)
As long as you see this line, there is no need to reexecute the script. Make sure to get used to the "Settings"-feature -> just click on Settings. Within the settings menu you can configure the script towards your needs/preferences. Enabling/disabling features and/or setting standard editions of providers on the fly. When using a script manager these settings should be stored and automatically load as soon as you visit matrix.itasoftware.com - but the passengers as well as the cabin detection will not be stored!
Your settings are "reloaded" everytime the itinerary details show up! If you want to use other settings, just get back to the flight selection and reselect your flights - the new settings will be used. This belongs to the passengers and cabin detection as well

Passengers:
The passenger count will not be taken from your search results! Use the passenger config on the upper left and make sure they are set before you get to the itinerary details. We had to do it this way because some providers require the age of children. But always make sure to search for the equivalent passenger count. There might be seat availability for one passenger but not for two!

Cabin detection:
You should set the cabin on the upper right to the appropriate main cabin you are looking for. Sometimes you will have economy/business class segments in mainly business/first class itineraries. These mixed itineraries make it hard to autodetect the main cabin - so you can set it manually.

*** Background requests - Privacy issues ***
Some features require to contact other servers. As long as you do not activate any of the autoload features within the settings there won't be any automatic background requests. You will have to initiate them manually. The following list will tell which features are contacting what server and what information will be transferred. All websites will know you are using this script und you are currently using the Matrix - what by the way applies to the link targets you click as well.
  • GCM-Map in inline mode - contacting gcmap.com (non SSL) providing full route data
  • WhereToCredit.com mileage accrual breakdown - contacting wheretocredit.com (non SSL or SSL - depending on whether you use the Matrix with or without SSL) providing full itinerary
  • Skimlinks affiliate links - loads a js script to adds affiliate ids to some links if and only if the "Support this tool" setting is enabled. If it is disabled, no external scripts are loaded
*** FT-Posts you should read ***
General statement regarding this script: click
How to fix class names yourself: click
Problems and limitations regarding pricing itins: click

*** Contributors ***
paul21, Steppo, IAkH, 18sas, Benchmarc and others!

I'd like to give special thanks to paul21 for starting this idea.

*** Latest Version ***
GitHub Repo

OR install directly: Executable Version minified

FYI
Steppo & IAkH (Adam Hwang) have full access to this repository.

Discussion - written by paul21:
The original posting can be found here, related to building links on delta's booking engine. The script scrapes the flight info from the itinerary (flight numbers, dates, class of service, price) and builds a link string to two booking engines (Orbitz/Delta). These links are the same links used by Google Flights (owns ITA) , Kayak, et. al. to drive purchases. I used the Google referrer codes in the scripts, so they should get the commission. It's beyond me why ITA doesn't have some form of purchase link. This a userscript, and like an ad-blocker, it modifies the way a page is viewed by editing DOM objects in the browser. Keep in mind that this tool is meant to do something you already do yourself, but to save time in the process. Any tickets issued by Orbitz/DL via these links could be issued via phone or web search. If the links work, you are avoiding a phone booking fee potentially.







Print Wikipost

ITA-Matrix-PowerTools - Userscript for Orbitz/DL/UA/AA/BA/CZ/IB/LA/LH/LX/TK

Old Nov 11, 2014, 6:24 am
  #16  
 
Join Date: Jun 2013
Location: Somewhere between if and else
Posts: 142
You should see something like this:
Steppo is offline  
Old Nov 11, 2014, 9:21 am
  #17  
 
Join Date: Jun 2013
Location: Somewhere between if and else
Posts: 142
Originally Posted by kulin
some advise:
don't specify default value for the parameters of functions liked function x(y=0), maybe it needs very high version of js-engine to run, it did not work here to me.
the other problem here to me is "itaLocale undefined", I can see it is a global variable in the itinerary page, but I don't know why it can't be located in the script here to me, maybe lack of privilege?
Exactly... Thank you for this advise.

I created a fork which will fix all these problems:
..... we merged it, please use the link from wiki.

There is one major "problem" with the cabin.
The script has to choose and is of course sometimes not correct. At the moment we are using the lowest available cabin in the itin. Which is of course not the best Idea. Taking the highest one would lead to exact the same problem. Choosing the most frequent one is also a bad idea.
We should pull it from the fare what is impossible.
The only way to solve this would be a dropdown forcing the user to choose.

Last edited by Steppo; Nov 11, 2014 at 11:20 am Reason: merged....
Steppo is offline  
Old Nov 11, 2014, 11:37 am
  #18  
 
Join Date: Oct 2013
Posts: 646
What exactly do you mean with the cabin? Cause all the info is there within the response under slices
fuyao is offline  
Old Nov 11, 2014, 6:53 pm
  #19  
Original Poster
 
Join Date: Nov 2012
Location: Minutes from ATL
Programs: DL
Posts: 441
Originally Posted by fuyao
What exactly do you mean with the cabin? Cause all the info is there within the response under slices
Some of the OTA interfaces ignore the fare basis (which dictates class anyway) (e.g. delta), accept class per leg only (e.g. united), or class per flight (e.g. orbitz). In the case of Delta et. al. who do not allow multi-cabin definitions, a single cabin must be chosen which is the core issue.
paul21 is offline  
Old Nov 12, 2014, 2:36 am
  #20  
 
Join Date: Oct 2013
Posts: 646
Originally Posted by paul21
Some of the OTA interfaces ignore the fare basis (which dictates class anyway) (e.g. delta), accept class per leg only (e.g. united), or class per flight (e.g. orbitz). In the case of Delta et. al. who do not allow multi-cabin definitions, a single cabin must be chosen which is the core issue.
Isn't it possible to just read out the value of "cabin": "COACH" from the get request?
fuyao is offline  
Old Nov 12, 2014, 5:43 am
  #21  
 
Join Date: Jun 2013
Location: Somewhere between if and else
Posts: 142
Originally Posted by fuyao
Isn't it possible to just read out the value of "cabin": "COACH" from the get request?
If i got you right, it's not. I usually don't change the cabin since i specify at least one fare / bookingclass.

Added some more features (Quicklinks on the initial search interface) and would be happy to find someone for testing it.
You will find it using the fork on github. (I really appreciate any PMs with feedback but keep this thread clean please.)


Is anybody out there still having problems with our main release?
Steppo is offline  
Old Nov 12, 2014, 9:18 am
  #22  
 
Join Date: Jan 2013
Location: NYC
Posts: 545
Originally Posted by Steppo
Is anybody out there still having problems with our main release?
Yes. Like zgringo14, I am not seeing the navigation arrows in calendar search using the latest installed userscript from the master branches of either paul21's or your GitHub repo. This is with Tampermonkey on a just-updated Chrome 38. PMs welcome if that helps.

Update: The arrows are visible in both versions when in Incognito mode.

Last edited by st1575; Nov 12, 2014 at 9:24 am Reason: incognito status
st1575 is offline  
Old Nov 13, 2014, 12:09 am
  #23  
 
Join Date: Jul 2011
Location: SFO
Programs: UA Silver
Posts: 20
This tool worked like a charm for me for booking a specific open jaw I found on ITA to Turkey. Thanks!

Hipmunk's search entirely died when tried to specify the specific route, United wouldn't let me search it either (something about not providing service PDX-SEA), Orbitz found it, but wanted $100 more per passenger... yet someone the booking link for United via Hipmunk worked! I was about ready to give up and find a travel agent .
Anti-hermitian is offline  
Old Nov 13, 2014, 2:47 pm
  #24  
 
Join Date: Nov 2009
Location: CVG
Programs: DL Diamond, UA Platinum
Posts: 361
I have been using this since paul21 came out with the first version and it has always worked great. The new scripts are even faster for me Thanks to all !

I have been using the manual debug mode so far and it all works.

Just one check: the UA link that comes up Hipmunk.. the string to copy includes the "\" but I have found that copying it without the "\" actually works ... if I include the "\", UA website gives me an error
topcat_dcx is offline  
Old Nov 23, 2014, 9:21 pm
  #25  
 
Join Date: Mar 2012
Posts: 162
i'm trying to use this for a UA itin involving UA/LX. when using ITA i specify P fares, but when i copy and paste the hipmunk link, the UA site returns the fare in S. what am i doing wrong?
(note, one of the LX flights is not available in P so the only opttion is Y - itin is UA P, LX Y, LX P, UA P).
IAD1k is offline  
Old Nov 23, 2014, 9:33 pm
  #26  
 
Join Date: Aug 2013
Posts: 498
Originally Posted by IAD1k
i'm trying to use this for a UA itin involving UA/LX. when using ITA i specify P fares, but when i copy and paste the hipmunk link, the UA site returns the fare in S. what am i doing wrong?
(note, one of the LX flights is not available in P so the only opttion is Y - itin is UA P, LX Y, LX P, UA P).
There are plenty of things that could go wrong, I know there are some issues with United.com receiving multi-class bookings (e.g. even when you find it via hipmunk).

Also possible is that United is unable to sell (or doesn't have the inventory in) the specific LX P fare you're finding on Matirx and rather than go up to full J it's going down to Y. Your itinerary sounds pretty straight forward, is it pricing differently when you use .bomb multicity search (or call) to specify direct flights only (make sure to click all the way though, autoprice won't account for everything until the end)? That means UA isn't selling one or more of the LX fares. This would mean you need to ticket through the different carriers (I would recommend a 3rd party like Orbitz so that you end up on the same PNR even if there are different ticket numbers, a major help during irrops).
wto605 is offline  
Old Nov 24, 2014, 6:52 am
  #27  
 
Join Date: Mar 2012
Posts: 162
Originally Posted by wto605
There are plenty of things that could go wrong, I know there are some issues with United.com receiving multi-class bookings (e.g. even when you find it via hipmunk).

Also possible is that United is unable to sell (or doesn't have the inventory in) the specific LX P fare you're finding on Matirx and rather than go up to full J it's going down to Y. Your itinerary sounds pretty straight forward, is it pricing differently when you use .bomb multicity search (or call) to specify direct flights only (make sure to click all the way though, autoprice won't account for everything until the end)? That means UA isn't selling one or more of the LX fares. This would mean you need to ticket through the different carriers (I would recommend a 3rd party like Orbitz so that you end up on the same PNR even if there are different ticket numbers, a major help during irrops).
it does price on ual.com after using mutli-city build (it's not that difficult of an itin). and it does return the exact same price as ita matrix, i wish the script would have worked though as it it much easier to specify booking codes on ita. i just wanted to know what went wrong so i could correct it. i tried (for fun) to click on the DL and ORB links generated by this tool on ita but those didnt work either.
IAD1k is offline  
Old Nov 24, 2014, 7:38 am
  #28  
 
Join Date: Jun 2013
Location: Somewhere between if and else
Posts: 142
Originally Posted by IAD1k
it does price on ual.com after using mutli-city build (it's not that difficult of an itin). and it does return the exact same price as ita matrix, i wish the script would have worked though as it it much easier to specify booking codes on ita. i just wanted to know what went wrong so i could correct it. i tried (for fun) to click on the DL and ORB links generated by this tool on ita but those didnt work either.
Would you mind to post (or PM) your search (dates, route.. etc.)
I think it's the issue i talked about.
Steppo is offline  
Old Dec 14, 2014, 8:39 am
  #29  
 
Join Date: Oct 2013
Posts: 646
Hi guys,
first of all, thanks again for this awesome tool. I use it everyday and it saves me so much time!
Now I got a question regarding the hipmunk UA tool.
Would it be possible to add another feature that instead of generating a UA deeplink, creates the itinerary on hipmunk?

And another idea:
Since ebookers.com uses almost the same exact url structure as orbitz.com, would it be possible to add ebookers as well? Just the date has to change since the ebookers websites use different symboles "/" vs. "." and "DDMM" vs "MMDD". but besides that, it has the same exact deeplink url structure as orbitz/cheaptix
I tried it myself directly in the code but failed

Thanks!
fuyao is offline  
Old Dec 15, 2014, 10:19 am
  #30  
 
Join Date: Oct 2013
Posts: 646
Ita 3.0 just got released and the script isn't working anymore
fuyao is offline  

Thread Tools
Search this Thread

Contact Us - Manage Preferences Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

This site is owned, operated, and maintained by MH Sub I, LLC dba Internet Brands. Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Designated trademarks are the property of their respective owners.