Skip to content

Instantly share code, notes, and snippets.

View emvaized's full-sized avatar
✌️
Believing in the future

Max Tsyba emvaized

✌️
Believing in the future
View GitHub Profile
@emvaized
emvaized / iconic_firefox.css
Last active March 22, 2025 08:04
Iconic Firefox — userChrome CSS snippet which adds back icons for most context and popup menu entries in Firefox. It uses mostly built-in icons.
/* Iconic Firefox (https://gist.github.com/emvaized/a379d61ed8970e5711ca7278a39c1895/) */
/* based on https://gist.github.com/qaz69wsx/83a90423163b65a8344b2e60fc356a58 (now removed) */
/* for better compatibility with dark mode, enable `svg.context-properties.content.enabled` in `about:config` */
:root{
--uc-popup-menu-icon-color:color-mix(in srgb, currentColor 75%, transparent);
}
.subviewbutton:not(.subviewbutton-iconic, [checked="true"], [targetURI])>.toolbarbutton-icon,
.subviewbutton:not(.subviewbutton-iconic, [checked="true"], [targetURI])>.protections-popup-footer-icon {
width:16px;
height:16px;
@emvaized
emvaized / scroll_page_on_double_tap.user.js
Last active November 4, 2024 04:58
Userscript to scroll page on double tap (for phones). Top half of the screen scrolls up, and bottom half scrolls down. Double tap and move finger enables fast scrolling mode. When page is already scrolling, single tap will scroll it further.
// ==UserScript==
// @name Scroll page on double tap (mobile)
// @description This userscript is designed for mobile browsers, and scrolls page on double tap. Top half of the screen scrolls up, and bottom half scrolls down. Double tap and move finger enables fast scrolling mode. When page is already scrolling, single tap will scroll it further.
// @description:ru Этот скрипт разработан для мобильных браузеров, и прокручивает страницу при двойном нажатии. Верхняя половина экрана прокручивает вверх, а нижняя половина — вниз. Двойное нажатие и движение пальцем включает режим быстрой прокрутки. Когда страница уже прокручивается, одиночный тап прокрутит её дальше.
// @version 1.0.2
// @author emvaized
// @license MIT
// @namespace scroll_page_on_double_tap
// @match *://*/*
// @grant none
@emvaized
emvaized / note_tab_url.html
Last active August 17, 2024 03:46
Basic note tab URL, which saves it's content between browser restarts and shows the first line as a tab title (paste whole snippet to addressbar and open like a regular link)
data:text/html,
<html>
<head>
<title>Empty note</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' height='20' width='20' fill-opacity='70%'><path fill='none' d='M0 0h20v20H0z'/><path d='M3 5h9v1.5H3V5zm0 6.25h6v1.5H3v-1.5zm0-3.13h9v1.5H3v-1.5zm13.78 3.87.65-.65c.29-.29.29-.77 0-1.06l-.71-.71a.754.754 0 0 0-1.06 0l-.65.65 1.77 1.77zm-.59.59L11.77 17H10v-1.77l4.42-4.42 1.77 1.77z'/></svg>" />
<style>
.editor {
display: inline-flex;
gap: 10px;
@emvaized
emvaized / parallel_scrolling.ahk
Last active November 1, 2024 16:41
Parallel Scrolling script for Autohotkey
; Parallel scrolling
; Autohotkey script by @emvaized
; Licence: MIT
;
; Description: This Autohotkey script allows you to scroll 2 windows or any views in the same window simultaneously.
; When you hold down the win key, the script sends a scroll event to both the current point under the course, and a second point mirrored horizontally.
; Thus, by choosing the cursor position, you can achieve simultaneous scrolling of any 2 windows or 2 lists within a single window.
; You can adjust scrolling speed by modifying WheelTurns variable.
;
; If you hold Win+Alt, you can set any custom point for scroll by clicking on the screen,
@emvaized
emvaized / fade_out_window_on_drag_resize.ahk
Last active September 3, 2023 06:46
Autohotkey script to fade out window of drag/resize
; This AHK script makes dragged or resized windows semi-transparent, with nice fade in and fade out animation
; It is intended to recreate similar Compiz effect on KDE Plasma
; Source of window hook: http://forum.script-coding.com/viewtopic.php?pid=95736#p95736
#NoEnv
#SingleInstance Force
#Persistent
SetBatchLines,-1
HookProcAdr := RegisterCallback( "HookProc", "F" ), hWinEventHook := SetWinEventHook( 0x1, 0x17, 0, HookProcAdr, 0, 0, 0 )
@emvaized
emvaized / windows_context_menu_like_linux_macos.ahk
Last active June 19, 2023 05:36
Autohotkey script to emulate Linux/MacOS context menu behavior in Windows 11
; Make Windows context menu behave like in MacOS/Linux
; In Linux and MacOS, context menu is revealed on right mouse down event, allowing user to continue moving the cursor,
; higlight any menu entry, and then select it by releasing the right mouse key.
; This script emulates similar behavior in Windows. Tested only in Windows 10/11.
; Note: It may interfere with some games which rely on right mouse button.
; Therefore added simple fullscreen-app check to not run the mouse listener
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
@emvaized
emvaized / animated_offset.dart
Last active July 8, 2021 07:47
AnimatedOffset widget for Flutter — animated version of Transform.translate
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
class AnimatedOffset extends ImplicitlyAnimatedWidget {
/// Animated version of [Transform.translate] which automatically transitions the child's
/// offset over a given duration whenever the given offset changes.
///
/// The [curve] and [duration] arguments must not be null.
const AnimatedOffset({
@emvaized
emvaized / flutter_webview_with_appbar.dart
Created June 30, 2021 00:38
Test example of using webview with floating app bar on Flutter
...
AnimationController? _hidePanelController;
double _hidePanelsValue = 0.0;
String _url = 'https://flutter.dev/';
@override
void initState() {
super.initState();
_hidePanelController = new AnimationController(vsync: this);