Google Chrome Extension that searches flights for multiples filters given by the user, such as multiple origin and destination cities, multiple dates, number of adults, children and infants. It also can send an email in case of finding fares under a given price and can save a CSV file with found prices.
To test the extension locally, you need to follow these steps:
- Clone this repository into your computer
git clone https://github.com/brenovieira/extension.git
(it downloads the repo and createsextension
folder)
- Enter the folder you just created
cd extension
- Install dependencies
- install Node.js and NPM
- install global dev dependencies:
npm install -g bower gulp
- install local dev dependencies:
npm install && bower install
in repository directory - npm dependencies will appear under
node_modules
folder and bower dependencies underbower_components
folder
- Build the project
gulp build
(createdist
folder)
- Enter google chrome extensions page and load the extension locally
- on chrome, go to
chrome://extensions
- enable
Developer mode
(it's a check box on the upper right corner. After selecting this, 3 buttons will appear) - click on the first button (
load unpacked extension
) - select the extension folder created on step 1 (it'll load the configuration file
manifest.json
and the extension should appear)
git must be on your path. If you can't do the command 'git' from your terminal, then install git first and make sure you have access from the path. Then make sure you have installed both npm, bower and gulp since we're using these.
The languages are just a messages.json
file under "the language" folder under _locales
folder.
_locales
├─── pt_BR
│ │ messages.json
├─── en
│ │ messages.json
For example, to add a spanish language, just add a new folder called es
under _locales
with a file messages.json
.
The file messages.json
is just a key value list. Where the values are the messages we show to the user in that language.
So, just copy and paste another messages.json
and translate it.
The method chrome.i18n.getMessage()
gets the message from messages.json
from the current language folder. See it here.
The method chrome.i18n.getUILanguage()
gets the current language. See it here.
The sites are under src/background/sites
folder.
src
├─── background
│ │ ├─── sites
│ │ │ decolar.js
│ │ │ miles.smiles.js
│ │ │ ...
Just copy and paste an existing one, it'll appear on the select on popup page. Then change the necessary code (like site specific url and mappings to get the right values, ...).
gulp
to build and watchgulp build
to build background and popup filesgulp watch
to watch src files to build when changedgulp zip
to create the zip file to publishgulp background
to build background page scriptsgulp popup:libs
to build 3rd-party libsgulp popup:js
to build our scripts used on popopgulp popup:css
to compile and minify less files (create css used on popup)
- About step 1, please visit Cloning a repository and Fork A Repo.
- About node and npm, please visit Installing Node.js.
- About gulp, visit Gulp Getting Started.
- About bower, visit Bower Getting Started.
- About step 5, visit Building a Chrome Extension - Load the extension.
- About less, visit Less Getting Started.
- About Google Chrome Extension, visit Google Chrome Extension Developer's Guide.
- About extension internationalization, visit chrome.i18n.
If you find an issue, feel free to report it on issues or just email me at genghislabs@gmail.com.
We're gonna be happy with any contribution, either giving a feedback, reporting an issue or developing more features. To add more features or fix an issue, you must fork this project, then open a pull request.
To evolve this app, there are several features that I already thought, such as:
- Save prices found on database to show all prices found by everyone
- Add other known flight engines, for example, skyscanner or kayak
- Add locales for other countries
- Add other loyalt programs as Advantage (American Airlines), Executive Club (British Airways), Victoria (TAP), ...
- Add feature to search different flight legs in same ticket, known as multi cities (A -> B and C -> A or A -> B, B -> C, C -> A)
- Add hotels booking
These are just the ones I thought, but you can help gather other useful features. Feel free to open an issue to suggest another feature.