Skip to content

Instantly share code, notes, and snippets.

@arthuredelstein
arthuredelstein / tb-manual-screenshot-scripts.js
Created January 7, 2018 21:46
Handy scripts for making screenshots in tor browser. To use, paste in browser console. Then entergrabImage("image-dir", "imagestem", false);
let locales = ["ar", "de", /*"en-US",*/ "es-ES", "fa", "fr", "ja", "it",
"ko", "nl", "pl", "pt-BR", /*"ru",*/ "tr", "vi", "zh-CN"];
let listenOnce = (element, event, useCapture) => {
return new Promise(function (resolve, reject) {
let onEvent = function (ev) {
element.removeEventListener(event, onEvent, useCapture);
resolve(ev);
};
element.addEventListener(event, onEvent, useCapture);