Skip to content

Instantly share code, notes, and snippets.

View private-face's full-sized avatar

Vladimir Zhuravlev private-face

View GitHub Profile
@private-face
private-face / userChrome.css
Last active May 2, 2021 10:55
unfuck firefox proton (dark mode only)
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Turn "pills" back into tabs: */
.tab-background {
margin-bottom: 0 !important;
border-radius: var(--tab-border-radius) var(--tab-border-radius) 0 0 !important;
}
.tab-content {
padding-top: 2px !important;

How to enable page translator in Firefox

Firefox has a page translator (similar to one in Chrome) turned off by default. Even though it is a bit buggy, it works well enough for a normal user.

Here is how to enable it:

  1. Сreate Yandex.Translate API key*:
  • Make yourself familiar with Yandex Translator API Terms of Use.
  • Create a Yandex Translator API key (you gonna need a Yandex account).
  1. Go to about:config and:
blink {
visibility: visible;
opacity: 1;
-webkit-animation: blink 1s infinite step-start,step-stop;
-moz-animation: blink 1s infinite step-start,step-stop;
animation: blink 1s infinite step-start,step-stop;
}
@-webkit-keyframes blink {
0% {
@private-face
private-face / index.js
Created October 28, 2012 05:49
Postnauka video downloader
const INCOMPLETE_DOWNLOADS_FOLDER_PATH = '/Users/vz/Downloads/';
const COMPLETE_DOWNLOADS_FOLDER_PATH = '/Users/vz/Music/iTunes/iTunes Media/Automatically Add to iTunes/';
const USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.52 Safari/537.11';
const VIDEO_INFO_URL = 'http://player.vimeo.com/config/';
const VIDEO_DOWNLOAD_URL = 'http://player.vimeo.com/play_redirect?clip_id={{id}}&sig={{signature}}&time={{timestamp}}&quality={{quality}}&codecs=H264&type=moogaloop&embed_location={{location}}';
const RECHECK_PERIOD = 2 * 60 * 60 * 1000;
var fs = require("fs"),
@private-face
private-face / px.js
Created March 26, 2012 19:25
Screen defect
(function() {
div = document.createElement('div');
TOP = 250;
LEFT = 500;
div.style.backgroundColor = "#ff0000";
div.style.position = "fixed";
div.style.top = TOP + "px";
function extend(child, parent, /*optional*/ prototype) {
var F = function() {};
F.prototype = parent.prototype;
child.prototype = new F();
child.prototype.constructor = child;
child._super = parent.prototype;
if (prototype) {
$.extend(child.prototype, prototype);