Skip to content

Instantly share code, notes, and snippets.

Moved

Now located at https://github.com/JeffPaine/beautiful_idiomatic_python.

Why it was moved

Github gists don't support Pull Requests or any notifications, which made it impossible for me to maintain this (surprisingly popular) gist with fixes, respond to comments and so on. In the interest of maintaining the quality of this resource for others, I've moved it to a proper repo. Cheers!

@evenfrost
evenfrost / swapper.js
Last active January 11, 2017 16:51
Adds Alt+Shift shortcut for swapping languages in Google Translate.
/**
* Adds Alt+Shift shortcut for swapping languages in Google Translate.
* Best used with browser JS injectors such as
* https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija
*/
(function () {
var shiftKeyPressed = false,
altKeyPressed = false,
swap = document.querySelector('#gt-swap');