Skip to content

Instantly share code, notes, and snippets.

@hensm
hensm / bindings.xml
Created October 10, 2017 23:26
Fixed urlbar
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bindings>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="urlbar-popup" extends="chrome://browser/content/urlbarBindings.xml#urlbar-rich-result-popup">
<implementation>
<constructor><![CDATA[
this.removeAttribute("flip");
]]></constructor>
</implementation>
</binding>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bindings>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="urlbar" extends="chrome://browser/content/urlbarBindings.xml#urlbar">
<implementation>
<method name="formatValue">
<body><![CDATA[
const textNode = this.editor.rootElement.firstChild;
if (this.focused) return;
CoordMode, Mouse, Client
GroupAdd, Browsers, ahk_class MozillaWindowClass
GroupAdd, Browsers, ahk_class Chrome_WidgetWin_1
return
IsWithinTabBar() {
yOffset := 0
height := 30
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bindings>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="tabs-scroll" extends="chrome://global/content/bindings/scrollbox.xml#scrollbox">
<handlers>
<handler event="wheel"><![CDATA[
// Preserve original behaviour if Ctrl is held
if (event.ctrlKey) return;
gBrowser.tabContainer.advanceSelectedTab(
@hensm
hensm / comment_collapser.user.js
Last active April 13, 2022 10:15
Comment Collapser
// jshint esnext: true
// ==UserScript==
// @name Reddit Comment Collapser
// @namespace https://matt.tf
// @author Matt Hensman <m@matt.tf>
// @include /^https?:\/\/(?:www|old|ssl|pay|[a-z]{2})\.reddit\.com\/(?:r\/(?:\w{2,21}|reddit\.com)\/)?comments\/.*$/
// @version 1.6.1
// @updateURL https://gist.github.com/hensm/1b973803f1f4efc238a82d3b26c4ea69/raw/comment_collapser.user.js
// @downloadURL https://gist.github.com/hensm/1b973803f1f4efc238a82d3b26c4ea69/raw/comment_collapser.user.js
@hensm
hensm / input_capitalisation.user.js
Last active June 9, 2016 23:59
Input Capitalisation
// ==UserScript==
// @name Input Capitalisation
// @namespace https://cssu.in
// @author Marcii <marcii@cssu.in>
// @include *
// @version 1
// @grant none
// @run-at document-end
// ==/UserScript==
#fullscreen-warning {
background: rgb(255, 255, 255) !important;
border: none !important;
border-radius: 2px !important;
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.5), 0 5px 0 rgba(0, 0, 0, 0.1), 0 5px 25px rgba(0, 0, 0, 0.4) !important;
box-sizing: content-box !important;
opacity: 0 !important;
padding: 15px 15px !important;
transform: translate(-50%, 50px) scale(0.9) !important;
}
@hensm
hensm / old.css
Last active August 25, 2015 23:40
Old-style Add-ons page
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@-moz-document url-prefix("about:addons") {
:root {
font-size: 100% !important;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0FDQzM0RTJDMzU5MTFERjg1MTlGNThDQkY1RD
@hensm
hensm / etc.css
Created August 25, 2015 21:35
Thunderbird CSS styling
#threadTree {
background: #fff !important;
color: #3c3c3e !important;
}
#folderTree {
background: #fafafb !important;
color: #636365 !important;
}
#folderTree > treechildren::-moz-tree-cell(primary) {
@hensm
hensm / retain_scroll_position.user.js
Created June 28, 2015 03:07
Userscript to fix scroll position to viewport center element when resizing
// ==UserScript==
// @name Retain Scroll Position
// @namespace http://cssu.in
// @description Fixes scroll position to viewport center element when resizing
// @include *
// @version 0.1
// @grant none
// @noframes
// ==/UserScript==