Google search link fix is a Firefox extension that prevents Google and Yandex search pages from modifying search result links when you click them. This is useful when copying links but it also helps privacy by preventing the search engines from recording your clicks. Detailed description
You need jpm to build Google search link fix. Run the following command:
jpm xpi
This will create a package with the file name like jid0-XWJxt5VvCXkKzQK99PhZqAn7Xbg@jetpack-n.n.n.xpi that you can install in Firefox.
Testing your changes is easiest if you install the Extension Auto-Installer extension. Then you can push the current repository state to your browser using the following command:
jpm post --post-url http://localhost:8888/
This will install Google search link fix in your browser automatically, without any prompts or browser restarts. You can also ask jpm to reinstall the extension whenever changes in the current directory are detected:
jpm watchpost --post-url http://localhost:8888/
Running the integration tests requires Selenium Python bindings to be installed. You can run the integration tests with the following command:
python run_tests.py
This will instrument Firefox to test Google search link fix on various websites, all Python files from the tests directory will be executed. For these files a global driver variable points to a WebDriver instance. In addition to the official API, the following methods and properties are available:
driver.wait_until(method)will wait until the method returnsTrueor time out after 10 seconds.driver.accept_alert()accepts an alert box displayed by the webpage.driver.chain(method, ...)will call all methods passed in with anActionChainsinstance as parameter.driver.get_urls()will return the list of URLs the browser navigated to (including redirects) since the previous call.driver.close_background_tabs()closes all but the currently selected tab in the current browser window.driver.keyscontains the key constants from selenium.webdriver.common.keys module.
The WebElement API has been extended as well:
element.middle_click()sends the necessary mouse events to an element to simulate a click with the middle mouse button.
Note that Selenium WebDriver lacks some functionality which is why the testhelper extension is added to the Firefox profile in addition to Google search link fix. This extension is required for driver.get_urls(), driver.close_background_tabs() and element.middle_click() functions to work.