Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name emblur
// @desc Unfocuses <embed>/<object> on focus.
// @help Hold shift/ctrl to turn off temporarily.
// @include main
// @author satyr
// @license X
// ==/UserScript==
function emblur(e){
switch(e.type){
@satyr
satyr / google++.ubiq.js
Last active March 12, 2022 18:06 — forked from satyr/google-keynav.ubiq.js
google++
Utils.extend(feed, {
title: 'google++',
author: {
name: 'satyr', email: 'murky.satyr\x40gmail.com',
homepage: 'http://satyr.github.com',
},
license: 'X',
})
const
Google = 'https://www.google.com/',
XML.prettyPrinting = XML.ignoreWhitespace = false;
const
Name = 'bijin-tokei',
BT = 'http://www.bijint.com',
Base = [<div class={Name +' root'}
><div class="acts"
><input type="button" id="copy" accesskey="c" disabled="disabled" value="Copy"
/><input type="button" id="open" accesskey="o" disabled="disabled" value="Open"
/></div
><div id={Name} class="content"> </div
@satyr
satyr / copy.ubiq.js
Last active October 6, 2016 04:09
Builds a text (from the page title etc.) and sends it to your clipboard.
const
H = Utils.escapeHtml,
Aliases = {
t: {
help: 'title',
get text(){ return info().title },
},
u: {
help: 'URL',
get text(){ return info().url },
CmdUtils.CreateCommand({
name: 'google bookmark example?',
description: '?',
preview: function gbe_preview(pb){
pb.innerHTML = '...';
CmdUtils.previewAjax(pb, {
url: 'http://www.google.com/bookmarks/?output=xml',
dataType: 'text',
success: function gbe_success(xml){
var {bookmarks} = XML(xml.replace(/<\?[^>]*>/, ''));
const Name = 'gatherer', Gatherer = 'http://gatherer.wizards.com/',
Base = '<style>\
a img {border:none}\
tr {background-color:inherit !important}\
td {padding:0 .2em 1ex !important; width:auto !important}\
.error {font-style:oblique; line-height:1.8}\
.logo {display:inline-block}\
.logo > img {max-width:100%; vertical-align:middle}\
.loading {opacity:0.9}\
.loading + .logo {opacity:0.4}\
@satyr
satyr / jamazon.ubiq.js
Last active May 12, 2016 00:00
amazon.co.jp (Ubiquity 0.5.4+)
var Name = 'jamazon',
Jamazon = 'http://www.amazon.co.jp/',
ItemMax = 35,
Logo = '<a class="logo" href="'+ Jamazon +'" accesskey="0">'
+ '<img border="0" width="126" height="28" align="middle" src="'
+ 'http://g-ecx.images-amazon.com/images/G/09/gno/images/general/'
+ 'navAmazonLogoFooter._V28243234_.gif'
+ '"/></a>',
Base = '<style>\
.head {padding:0 0.4em}\
@satyr
satyr / replace.ubiquity.js
Last active May 11, 2016 23:58
[forked] replace.ubiquity.js
var noun_typed_text = {
name: 'typed text',
suggest: function suggestTyped(txt, htm, cb, si){
return !si && {text: txt, summary: htm, score: .4}
},
}
var replace = CmdUtils.CreateCommand({
name: 'replace',
icon: 'chrome://ubiquity/skin/icons/page_refresh.png',
function cmd_toggle_autohide(){
displayMessage(toggleAutoHide(context.chromeWindow.gUbiquity), this);
}
function toggleAutoHide(U){
var p = U.msgPanel, nah = noAutoHide(p), b = nah !== 'on';
p.setAttribute('noautohide', b);
p[(b ? 'add' : 'remove') +'EventListener']('keydown', manualHide, false);
return nah;
}
function noAutoHide(p){
@satyr
satyr / navkeys.uc.js
Last active May 11, 2016 16:16
navkeys
/*==uc==
@name navkeys
@desc personal key binds for caret-movement, scrolling and selection
@include main
@include ~^chrome://global/content/view(?:Partial)?Source\.xul
@author satyr
==/uc==*/
https://developer.mozilla.org/ja/XUL/List_of_commands
NavKey = {s: {
H : 'scrollLeft',