Skip to content

Instantly share code, notes, and snippets.

View myfonj's full-sized avatar

Michal Čaplygin myfonj

View GitHub Profile
@-moz-document url-prefix("file:///"), url-prefix("http://"), url-prefix("https://"), url-prefix("data:text/html,"), url-prefix("data:text/html;charset=utf-8,<!DOCTYPE%20html><title>HTML%20sandbox%20") {
/* AGENT_SHEET */
/*
"myfavolours" - global custom colour scheme
http://userstyles.org/styles/2187
BEGIN
*/
/* i really want this to be global */
/*
summary:
@myfonj
myfonj / twitter-com-un-trim-images-on-hover.user.css
Last active May 15, 2020 19:40
Twitter.com: un-trim images on hover
@-moz-document domain("twitter.com") {
/*
Twitter.com: un-trim images on hover
div[aria-label^="Timeline: "] > div > div > div
= "post item"
*/
/*
let the spice flow. over.
*/
@myfonj
myfonj / poc.js
Created September 23, 2019 22:18
youtube set scrobbling POC
(function(){
// document.getElementById('more').dispatchEvent(new Event('click'));
// seems it is not necessary after all; description is already present
let c = document.getElementById('description');
var ts = Array.from(c.querySelectorAll('a[href^="/"][href*="&t="]'))
.map(
a=>[
a.getAttribute('href').match(/&t=([^&]*)/)[1], // seconds
a.nextSibling.textContent.trim().split('\n')[0] // title
]
@myfonj
myfonj / _userChrome.css
Last active July 24, 2023 23:38
My userChrome for Firefox Developer edition
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
@namespace svg url("http://www.w3.org/2000/svg");
/*
userChrome.css
version: 2023-07-25
https://gist.github.com/myfonj/f5415dd0580663a82ea18407ef2ee5de/edit
§ HOWTO (Firefox ~88):
@myfonj
myfonj / user.js
Last active January 9, 2020 13:52
Firefox most importart user prefs
user_pref("accessibility.typeaheadfind.flashBar", 0);
user_pref("browser.ctrlTab.recentlyUsedOrder", false);
user_pref("browser.fixup.alternate.enabled", false);
user_pref("browser.startup.page", 3);
user_pref("browser.altClickSave", false);
user_pref("browser.tabs.closeWindowWithLastTab", false);
user_pref("browser.tabs.insertAfterCurrent", true);
user_pref("browser.tabs.selectOwnerOnClose", false);
user_pref("browser.urlbar.clickSelectsAll", false);
user_pref("browser.urlbar.filter.javascript", false);
@myfonj
myfonj / assorted-code-snippets.md
Last active April 29, 2021 13:37
Assorted code snippets

.

@myfonj
myfonj / index.css
Created December 19, 2019 09:12
Test Gistpad web playground
‎‎​
@myfonj
myfonj / index.html
Last active January 7, 2020 09:36
GistPad playground test
Copypaste of <a href="https://codepen.io/thebabydino/pen/BaywOLP">https://codepen.io/thebabydino/pen/BaywOLP</a>
<canvas id="canvas" width="800" height="800"></canvas>
GNU Wget 1.20.3, a non-interactive network retriever.
Usage: wget [OPTION]... [URL]...
Mandatory arguments to long options are mandatory for short options too.
Startup:
--version
(-V) display the version of Wget and exit
--help
(-h) print this help
@myfonj
myfonj / colorful-squares-codepenchallenge.markdown
Created February 26, 2020 13:20
Colorful Squares | CodePenChallenge