Skip to content

Instantly share code, notes, and snippets.

function startup_fix4ime(){
function fix4ime(U){ with(U){
const DealtWith = [__KEYCODE_UP, __KEYCODE_DOWN, __KEYCODE_TAB]
.reduce(function(d, c) d[c] = d, {});
U.__onInputOrig = __onInput;
__onInput = function __onInput4IME(e){
if(__showCount) DealtWith[e.keyCode] || __updatePreview();
}
U.__onKeyPress4IME = function __onKeyPress4IME(e){
if(e.keyCode !== __KEYCODE_ENTER) return;
@satyr
satyr / say.ubiq.js
Created January 7, 2009 11:01
Tweets via the web interface instead of the API
const Name = 'say',
Twitter = 'https://twitter.com/',
Icon = Twitter +'favicon.ico',
MaxLen = 140,
Base = <div class={Name}><style><![CDATA[
#timeline {list-style-type:none; font-size:92%; padding:0}
#timeline .actions {display:none}
#timeline img.fn {width:16px; height:16px; vertical-align:middle}
#status {font-size:112%; font-weight:700}
.screen-name {margin:0 0.2em}
@satyr
satyr / image2dataurl.ubiq.js
Created January 8, 2009 21:17
Converts image into dataURL.
CmdUtils.CreateCommand({
name: "image2dataurl",
synonyms: ['i2d'],
icon: 'chrome://ubiquity/skin/icons/convert.png',
description: 'Converts image into dataURL.',
takes: {'image URL': {_name: '_', suggest: function(txt, htm, cb, sx){
return sx ? [] : [CmdUtils.makeSugg(txt)];
}}},
execute: function(inp){
this._withDataURL(inp, function(du){
+function(pgg, logot){
const Google = 'http://www.google.com/',
PKSafe = 'extensions.ubiquity.google.safe',
PKLang = 'extensions.ubiquity.google.lang';
CmdUtils.CreateCommand({
name: "google",
icon: Google +'favicon.ico',
takes: {'?': noun_arb_text},
modifiers: {'in': {_name: 'lang', suggest: function(txt, htm, cb, sx){
if(!sx && txt){
http://d.hatena.ne.jp/Hamachiya2/20090109/fallingirl
javascript:H='http://hamachiya.com/g';g='.gif';D=document;B=D.body;I=setInterval;Q=new Image;Q.src=H+1+g;scroll(I(function(Y,V,s,t){s=B.appendChild(V=Q.cloneNode(Y=99)).style,t=I(function(){Y-=t&7|1;s.bottom=(Y<1?setTimeout(function(){V.src=H+3+g;V.onclick=function(){D.title-=~B.removeChild(V)}},m,V.src=H+2+g)&clearInterval(t):Y)+'%'},Y);s.cssText='position:absolute;bottom:99%;left:'+(new Date&63)+'%'},m=800),D.title=0)
@satyr
satyr / yats.ubiq.js
Created January 11, 2009 01:04 — forked from satyr/yats.ubiq.js
yet another twitter search <http://pcod.no-ip.org/yats/>
const Name = 'yats',
Yats = 'http://pcod.no-ip.org/yats/',
Base = ''+ <div class={Name}><base href={Yats}/><style><![CDATA[
h2 {margin:0; padding:0}
img {width:16px; height:16px; border:none}
ol {margin:2px 0; padding:0}
li {float:left; clear:left; width:100%; padding:0 0 4px 0}
li div {float:left; padding-right:2px}
h2, p {clear:left; font-size:84%}
kbd {text-decoration:underline; vertical-align:top}
var noun_arb_text = {
_name: "text",
rankLast: true,
_magicWords: {
url: {
re: /\burl\b/ig,
fn: function() Application.activeWindow.activeTab.document.URL,
},
},
suggest: function( text, html, callback, selectionIndices ) {
http://d.hatena.ne.jp/os0x/20090111/1231703347
//430B
javascript:H='http://hamachiya.com/g';E='.gif';B=document.body;T=setTimeout;R=Math.random;Q=new Image;Q.src=H+1+E;scroll(T(function L(Y,r,V,S){S=B.appendChild(V=Q.cloneNode(r=R(Y=90)+1)).style;S.right=R(S.position='absolute')*Y+'%';function f(){(Y-=r)>0?T(f,Y,S.bottom=Y+'%'):T(function(){V.src=H+3+E;T(V.onclick=function(){V&=top.status=I+=(V&&B.removeChild(V))==this||-!!V},8e3)},N,S.bottom=0,V.src=H+2+E)}f(T(L,N))},N=800),I=0)
const Name = 'gimage',
Google = 'http://www.google.com/',
GImage = 'http://image.google.com/',
PPath = 'extensions.ubiquity.google.',
PLang = PPath +'lang',
PSafe = PPath +'safe',
PSize = PPath +'size',
{prefs} = Application,
ID = '#_'+ (Math.random() * 1e9 | 0),
Base = <div class={Name}><style><![CDATA[
/*
=skin=
@name Simpli9uity
@author satyr
@license MPL/LGPL/GPL
@homepage http://gist.github.com/46130
@h0mepage http://d.hatena.ne.jp/murky-satyr
@basedOn (obviously) Simpliquity by Yatrik Solanki
=/skin=
*/