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, 14, 11: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 Jan 21, 15, 4:17 am
  #46  
havnfn
 
Join Date: Sep 2011
Location: FL-MCO
Programs: Delta-DM; Hilton-Diamond; Hyatt-Diamond
Posts: 456
Originally Posted by Steppo View Post
Are you just copying and modifying the link to delta? Or are you trying to modify the DOM and then want to execute the script again?
If its the first one, i don't have a clue why its not working anymore.
Modifying the DOM won't work since you can only run the script once. I had to change it because ita switched to ajax-calls. The script is now running in background checking for URL-changes. So just modifying the DOM isn't enough... even though i could add a button to do this.

@Paul thanks for updating the Wiki.. i am not yet allowed to
It's the former, actually

I copy the URL from the link to DL and paste to Notepad and modify the fare codes. At least it used to work until a week or so ago.

*shrug*
ScrodmanFL is offline  
Old Jan 21, 15, 8:36 pm
  #47  
 
Join Date: Aug 2013
Posts: 494
Originally Posted by ScrodmanFL View Post
Hmm...I used to be able to adjust the fare codes manually (say, in Notepad) then paste an updated URL and Delta's pricing page would be updated to the new fare code and price. That doesn't seem to be working anymore.

Tried Firefox and Greasemonkey as well as Chrome and Tampermonkey.

Probably something I'm doing wrong...
You used to be able to specify the booking code in matrix search criteria (of course the bucket needs to be for sale at the moment) using "/f bc=A|bc=B" etc. (if you're unfamiliar with /f switches just note that they are not per-segment and must be listed after all per-segment switches). However, lately the /f switches have only been applying to the first segment for me (rather than all segments as the did in the old versions of matrix).
wto605 is offline  
Old Jan 22, 15, 9:41 am
  #48  
havnfn
 
Join Date: Sep 2011
Location: FL-MCO
Programs: Delta-DM; Hilton-Diamond; Hyatt-Diamond
Posts: 456
ah...didn't notice the fare bucket option for Matrix itself. I've relegated myself to using the method here:
http://www.flyertalk.com/forum/delta...s-006-dl.htmll

But, I like the script here better as it was easier to adjust fare codes. Also, the upgrade to First Class option typically showed up so I could tell quickly if it was going to be worth to upgrade or not before booking.
ScrodmanFL is offline  
Old Jan 22, 15, 4:37 pm
  #49  
 
Join Date: Nov 2006
Location: cbr
Programs: QF WP (OWE) | Hyatt Globalist | HHonors Diamond
Posts: 4,972
Tried installing it on firefox (windows) using GreaseMonkey and haven't had any luck getting it to run. Will try on Chrome (windows/osx) later today and see how I go.

Thanks to all those writing/updating the script.
SQ421 is offline  
Old Jan 22, 15, 10:59 pm
  #50  
 
Join Date: Nov 2006
Location: cbr
Programs: QF WP (OWE) | Hyatt Globalist | HHonors Diamond
Posts: 4,972
Tinkered around a bit more and now have got this working in Firefox (on Windows). The cabin/routing doesn't necessarily populate through to Hipmunk and some of the other sites for multi city routings.

OTOH, who knew DL can ticket itineraries not touching DL metal/code at all.
SQ421 is offline  
Old Jan 23, 15, 11:28 am
  #51  
 
Join Date: Aug 2013
Posts: 494
Originally Posted by SQ421 View Post
Tinkered around a bit more and now have got this working in Firefox (on Windows). The cabin/routing doesn't necessarily populate through to Hipmunk and some of the other sites for multi city routings.

OTOH, who knew DL can ticket itineraries not touching DL metal/code at all.
All airlines can (although some won't) ticket on any airline as if they were a travel agent (notable exception being Southwest who doesn't allow any 3rd party ticketing). That said what they cannot do without specific agreement is sell discount fares.
wto605 is offline  
Old Feb 7, 15, 1:54 am
  #52  
 
Join Date: Feb 2001
Location: SEA once more (previously CDG and NRT)
Programs: Former DL DM and UA 1k, now a J class free agent (UA Plat, AA Plat, DL Silver)
Posts: 2,421
This script is quite useful. Does anyone know how to modify it to account for Child fare. In ITA it is possible to price an itinerary out as two adults, two child / four passengers total. But when clicking through to one of the booking engines, they will price it out as four adult passengers.
SEA-Flyer is offline  
Old Feb 11, 15, 2:02 am
  #53  
 
Join Date: Jun 2013
Location: Somewhere between if and else
Posts: 142
First of all: I did an update. There has been a bug forming the Hipmunk Link. And added Priceline as well.

Originally Posted by SEA-Flyer View Post
Does anyone know how to modify it to account for Child fare. In ITA it is possible to price an itinerary out as two adults, two child / four passengers total. But when clicking through to one of the booking engines, they will price it out as four adult passengers.
The script won't be able to autodetect children. Some OTAs require the child's age. You may modify the Url on your own but be aware this won't work for UA for example. As long as it is not an infant, the price should be the same. So you should doing fine by going ahead and book for adults only.

A little hint for those with POS outside the US trying to book using United:
You might fail during checkout because Hipmunk sets the POS to US.
Here is what to do:
Originally Posted by Steppo
1. Open link on Hipmunk...
2. Copy and paste the link to United
3. Wait until United is showing your routing (You can see the POS in the upper right)
4. Simply add &POS=GB to the current URL (Replace GB with your local ISO2-Country code.. but be aware that not every country is available) and submit
5. You will be redirected to leg-selection (Desired routing likely won't show up)
6. Just close the current United tab/window
7. Copy and open link from hipmunk again
8. You should be fine and POS should be set
Thanks to sevk123 for testing this solution:
http://www.flyertalk.com/forum/trave...l#post24248637
Steppo is offline  
Old Feb 11, 15, 3:05 am
  #54  
 
Join Date: Feb 2001
Location: SEA once more (previously CDG and NRT)
Programs: Former DL DM and UA 1k, now a J class free agent (UA Plat, AA Plat, DL Silver)
Posts: 2,421
Originally Posted by Steppo View Post

The script won't be able to autodetect children. Some OTAs require the child's age. You may modify the Url on your own but be aware this won't work for UA for example. As long as it is not an infant, the price should be the same. So you should doing fine by going ahead and book for adults only.

Would it be possible in the script to prompt for the childs age? And then build that into the url? If not, it should be safe to assume age 11, which is what most fares use as a breakoff point, and that is what ITA itself uses for child fares.

For domestic fares, I agree that adults will almost always price the same as children. But on international fares, it is quite common for the child fares to be 67% / 75% / 90% of the adult fare, which can make a difference of several hundred dollars.

Last edited by SEA-Flyer; Feb 11, 15 at 5:44 am
SEA-Flyer is offline  
Old Feb 17, 15, 1:36 am
  #55  
 
Join Date: May 2009
Location: Seattle, WA
Programs: UA MM *G, AA EXP, OW Emerald, Hyatt Globalist, Gold everywhere else
Posts: 826
Originally Posted by Steppo View Post
First of all: I did an update. There has been a bug forming the Hipmunk Link. And added Priceline as well.
Tiny little request...can you please increment the version number when you make an update? Much easier to keep track of when I need to grab an update or not.

I'll also say many, many thanks for this. Absolutely invaluable tool. :-:
paranoiatx is offline  
Old Feb 19, 15, 12:43 pm
  #56  
 
Join Date: Jun 2013
Location: Somewhere between if and else
Posts: 142
Yehaa it's done:
Version 0.8 is released with some cool new stuff and OTAs.
Special thanks to IAkH to add AC,KL,AF and also introducing the inline mode. It will merge all our stuff into the look and feel of ita.
Personally i don't like it and i love large links so i coded some sort of menu where can easily customize our script towards your needs. Another advantage is: We finally got rid of all these different versions. And finally it's the first step for adding support for children, etc..

To our users of the installable version:
If you want to change the default values, just edit the following lines after installing the script:
Code:
mptUsersettings["timeformat"] = "12h";       // replaces times on resultpage - valid: 12h / 24h
mptUsersettings["language"] = "en";          // replaces several items on resultpage - valid: en / de
mptUsersettings["enableInlinemode"] = 0;     // enables inline mode - valid: 0 / 1
mptUsersettings["enableIMGautoload"] = 0;    // enables images to auto load - valid: 0 / 1
mptUsersettings["enableFarerules"] = 1;      // enables fare rule opening in new window - valid: 0 / 1
mptUsersettings["enablePricebreakdown"] = 1; // enables price breakdown - valid: 0 / 1
Update please using https://github.com/SteppoFF/ita-matrix-powertools/ or install/open directly
Originally Posted by Steppo
Happy searching

Last edited by Steppo; Feb 19, 15 at 1:29 pm
Steppo is offline  
Old Feb 21, 15, 11:04 pm
  #57  
 
Join Date: Jun 2009
Location: C1 & C2
Programs: Tim Horton's Gold
Posts: 373
Just installed, very helpful.
-for me, it works.

Thank you. ^

Last edited by Calgary88; Feb 22, 15 at 7:12 pm
Calgary88 is offline  
Old Feb 22, 15, 5:34 am
  #58  
 
Join Date: Mar 2014
Location: IAD
Posts: 72
Hey guys, the stuff you are doing is pretty mind boggling to me. My question is this: should a reasonably intelligent person who knows doodly squat about code/html/programming use this? Or does trying to make this work with Firefox or one of the other browsers require coding knowledge and a lot of time (I already spend way too much time on this hobby)? The other day I managed to download Greasemonkey and a snippet of code that gave me shortcut access to a certain search engine but couldn't actually tell you what the code does -- it was quite literally plug and play. This code at least contains english but it is still out of my wheelhouse...what do you think?
jpauls123 is offline  
Old Feb 22, 15, 7:31 am
  #59  
 
Join Date: Jun 2013
Location: Somewhere between if and else
Posts: 142
Originally Posted by jpauls123 View Post
Hey guys, the stuff you are doing is pretty mind boggling to me. My question is this: should a reasonably intelligent person who knows doodly squat about code/html/programming use this? Or does trying to make this work with Firefox or one of the other browsers require coding knowledge and a lot of time (I already spend way too much time on this hobby)? The other day I managed to download Greasemonkey and a snippet of code that gave me shortcut access to a certain search engine but couldn't actually tell you what the code does -- it was quite literally plug and play. This code at least contains english but it is still out of my wheelhouse...what do you think?
I can't get your question.. but i will do my best:
This script is ready to use. You don't need any kind of skills to get it running.

There are two ways to get this running:
Either, you need to know how to get access to the debug-console of your browser. Paul described how to access it in the Wiki. You use the console-version of our script or the minified version. They are doing exactly the same. Copy - Paste - Execute. But you have to execute it every time you visit the matrix or when it's not telling you "Powertools running" right at the top of the page. You will have to reexecute it after reload for example.

The other way is to use some sort of Script-Manager (GreaseMonkey or TamperMonkey for example):
It will handle the script for you and makes sure it gets executed as soon as you visit the matrix page. But again: you can see whether it's running or not because of "Powertools running".

Why do we have three version?
Since the way to start start the script using the console is different to start it using script managers, we need these two. The minified one is just a bit smaller and easier to copy. All the script are doing exactly the same.

What is this script actually doing?
Using pure JavaScript we are "creating" some sort of hook that is periodically checking for page changes. But again.. 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).. since we are not storing any kind of information. That is the reason it told you where you may modify the default values. Also this script is only running in these Tabs/Windows where you are looking at the matrix.
As soon as the script detects the resultpage it reads its content. It's parsing all the information found and creates, based on these information, several links to OTAs and airlines. Sicne 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. This is the reason i developed the "Click to reveal" while using the inline mode. As long as i am part of the team, there will be no version released doing background requests by default. If you enable them.. do it.

Since this is a hobby and we do not earn any money from it, we are doing it "the easy way" - It works for us.. it should work for you!
You will find so many combinations of OS and Browsers out there, so we cannot guarantee it will work on yours. But we are doing our best and have to rely on your feedback. The worst that may happen: we are crashing your browser. Restart it.. and you are fine. If you encounter any kind of problems.. do not hesitate to PM us or just post here.

Even though this might not have been the answer to your questions, i think i got some things straight.
Steppo is offline  
Old Feb 22, 15, 9:36 pm
  #60  
 
Join Date: Mar 2014
Location: IAD
Posts: 72
Steppo, Thank you! You answered my question which I could have phrased more simply. What I should have said is "Can someone without any special programming skills use this?" The answer appears to be "Yes -- but expect to do a little work" Thank you! -- I'll give it a try...
jpauls123 is offline  

Thread Tools
Search this Thread