Skip to content

Instantly share code, notes, and snippets.

var noun_type_fooCommand = {
suggest: function( text, html ) {
var suggestions = [];
suggestions.push( CmdUtils.makeSugg('foo', 'foo', 'foo') );
suggestions.push( CmdUtils.makeSugg('bar', 'bar', 'bar') );
suggestions.push( CmdUtils.makeSugg('baz', 'baz', 'baz') );
Get exchange rate as JSONP via YQL.
YQL Console: http://developer.yahoo.com/yql/console
Query (USD to SEK): select rate,name from csv where url='http://download.finance.yahoo.com/d/quotes?s=USDSEK%3DX&f=l1n' and columns='rate,name'
Example code:
<script type="text/javascript">
@erikvold
erikvold / longurl.js
Created January 3, 2010 07:54 — forked from ba3r/longurl.js
/* longurl v0.81 */
CmdUtils.CreateCommand({
names: ["expand-short-url", "longurl.org"],
icon: "data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAFvSURBVDhPjZPLSsNAFIb/OZNUrLSKl4VbcaEgqOB14wP4DD6C6CuIax/AV/AxdCFeEBeCbyBeUAppoWlME8+ZZtLUJmnJYpJh/nP+/zsT9dMM4qPLJ3x6AeIICKMYYTdKVn4337Lynllj+L9d1Ct1vF5sQr/MHp69NTpQ/AyKpQgXHBBLEaDTmsLi8jXe3SuQdNaqRCxu0iJAu1nF6sYtDvaf8eX5oGHbmc42irHfF+9uP6LTrsGlCqjQ9ggxKQ1NmgukwMbvbMWOIi4QW+oZYEK+wLYVc28odkFhKIfzaQuwlfU72MxZMbF9bRwMzXkQ2N7OvQGWJ9bKEQZJhJxRSWe/UMz2SWUg5mQWsZPQlszWtpbsRBxBGJQA6x3krAXifoF/l6Tcdq+zEQtE+THs9bSZR9m2YsW/AM1NzmBp7caMSjqPZZs7R3x/FqrzUB+eF58/nOK7FaBCbgrKjI0PmlEx7axtxfvTEzWcbB3jD1bNgOd9VMEgAAAAAElFTkSuQmCC",
homepage: "http://longurl.org/tools",
author: {name: "Sean Murphy", homepage: "http://IamSeanMurphy.com"},
contributors: {name: "Michael Baer", homepage: "http://twitter.com/synapsos"},
license: "GPL",
help: "Select a shortened URL and type longurl to display
@erikvold
erikvold / jetpackHPTweaks.user.js
Created January 14, 2010 06:25
Small tweaks for the Mozilla Labs Jetpack home page.
// ==UserScript==
// @name Jetpack Home Page Tweaks
// @author Erik Vold
// @namespace jetpackHPTweaks
// @include https://jetpack.mozillalabs.com/
// @include https://jetpack.mozillalabs.com/index.html
// @include https://jetpack.mozillalabs.com/index.html?*
// @include https://jetpack.mozillalabs.com/index.html#*
// @version 0.1
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// ==UserScript==
// @name Gist UserScript Install Link
// @author Erik Vold
// @namespace gistUserScriptInstallLink
// @include http://gist.github.com/*
// @version 0.1
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @datecreated 2010-01-28
// @lastupdated 2010-01-28
// @description This userscript will add an 'Install' link to all userscript files (which end with .user.js by necessity).
// ==UserScript==
// @name GWO Help Section Logo Link Fix
// @author Erik Vold
// @namespace gwoHelpSectionLogoLinkFix
// @include http://www.google.com/support/websiteoptimizer/*
// @version 1.0
// @datecreated 2010-01-27
// @lastupdated 2010-01-27
// @description This userscript will change the link around the Google Website Optimizer logo in the header from pointing at google.com to point at www.google.com/websiteoptimizer
// ==/UserScript==
@erikvold
erikvold / gistUserScriptInstallLink.user.js
Created January 29, 2010 06:04
This userscript will add an 'Install' link to all userscript files (which end with .user.js by necessity).
@erikvold
erikvold / googleSERPClickTrackingDisabler.user.js
Created January 29, 2010 10:35
This userscript disables Google's click tracking for search results.
// ==UserScript==
// @name Google SERP Click Tracking Disabler
// @namespace googleSERPClickTrackingDisabler
// @include http*://*.google.tld/search?*
// @datecreated 2010-01-29
// @lastupdated 2010-01-29
// @version 0.1
// @author Erik Vergobbi Vold
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @description This userscript disables Google's click tracking for search results.
// ==UserScript==
// @name Reg Exp include Test I
// @author Erik Vold
// @namespace regExpIncludeTestI
// @include /https?:\/\/Delicious\.com\/save([\?#].*){0,1}/i
// @description Test
// ==/UserScript==
// @include http*://delicious.com/save
// @include http*://delicious.com/save#*
@erikvold
erikvold / jepTitleFix.user.js
Created February 17, 2010 20:47
Userscript to fix JEP page titles on the Mozilla wiki.
// ==UserScript==
// @name Fix JEP Titles
// @namespace jepTitleFix
// @include https://wiki.mozilla.org/Labs/Jetpack/JEP/*
// @include https://wiki.mozilla.org/Labs/Jetpack/Reboot/JEP/*
// @datecreated 2010-02-17
// @lastupdated 2010-02-17
// @version 0.1
// @author Erik Vergobbi Vold
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html