Skip to content

Instantly share code, notes, and snippets.

@esquifit
esquifit / Userscript_commands.ubiq.js
Created April 20, 2009 12:37
Issue Greasemonkey userscript commands from the Ubiquity [0.1.9] command line
var noun_type_gmCommand = {
_name: "GM command name",
// Returns all GM commands available for the current page.
getCommands: function(){
var commands= {};
var menuitems = jQuery(window.document)
.find('#userscript-commands-sb > menupopup > menuitem')
.get();
for (var i=0; i<menuitems.length; i++){
@esquifit
esquifit / Userscript_commands.ubiq.js
Created April 25, 2009 19:21 — forked from esquifit/Userscript_commands.ubiq.js
Issue Greasemonkey userscript commands from the Ubiquity command line
var noun_type_gmCommand = {
_name: "GM command name",
// Returns all GM commands available for the current page.
getCommands: function(){
var commands= {};
var menuitems = jQuery(context.chromeWindow.document)
.find('\x23userscript-commands-sb > menupopup > menuitem')
.get();
@esquifit
esquifit / foo.ubiq.js
Created July 21, 2009 12:23
Hybrid Ubiquity command for parser 1 and 2
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') );
@esquifit
esquifit / listStyle.css
Created October 12, 2009 09:30
Companion stylesheet for userscript "Autoupdate Injecter"
#foo{
position:fixed;
z-index: 9000;
top:0%; bottom: 0%; left:0%; right:0%;
border-style: solid;
border-color: rgb(200,200,200);
border-width: 5px;
background-color: rgba(100,100,100,.9);
}
#foo * {
<?xml version="1.0" encoding="ISO-8859-1"?>
<bindings xmlns="http://www.mozilla.org/xbl">
<!-- 1 - Allow for larger result sets -->
<binding id="listsize">
<implementation>
<constructor>
<![CDATA[
var newOption = function(selElm, val){
var sel = document.createElement('OPTION');
@-moz-document url("https://ssl.muenchen.de/EF/opac.html"),
url("https://ssl.muenchen.de/AK/opac.html") {
select.input[name="NNORRQ"] {
-moz-binding:url(http://gist.github.com/raw/211172/bd87a5d51be36f454a96f6cad07f81c8522573ee/OPAC_Muenchen.xbl#listsize) !important;
}
form[name="EF"],
form[name="AK"] {
-moz-binding:url(http://gist.github.com/raw/211172/bd87a5d51be36f454a96f6cad07f81c8522573ee/OPAC_Muenchen.xbl#defaults) !important;
@-moz-document url("https://ssl.muenchen.de/EF/opac.html") {
form[name="EF"] * {
color: blue !important;
}
}
@esquifit
esquifit / bugmenot.js
Created December 21, 2009 11:10 — forked from vshih/bugmenot.js
ueries bugmenot.com for the current page
/*
bugmenot.js
Queries bugmenot.com for the current page, populates login information and submits.
Written by Victor Shih (vshih at yahoo.com, http://blog.vicshih.com/2009/04/bugmenot-command-for-ubiquity.html)
Initial idea and some code from Onur Yalazı (onur@yalazi.org, http://www.yalazi.org/ubiquity) and Brandon Goldsworthy.
*/
const MIN_RATE_PERCENT = 50; // only show entries that rate 50% or more
@esquifit
esquifit / open_folder.ubiq.js
Created December 22, 2009 21:19
Opens Firefox special folder (profile, chrome or installaton folder) For Ubiquity 0.1.9
function openSpecialFolder(aFolderType) {
var dirService = Components.classes['@mozilla.org/file/directory_service;1']
.getService(Components.interfaces.nsIProperties);
var dir = dirService.get(aFolderType, Components.interfaces.nsIFile);
var iDirectory = getLocalFileInterface(dir.path);
try {
iDirectory.reveal();
} catch (ex) {
// if reveal failed for some reason (eg on unix it's not currently
@esquifit
esquifit / artechock_extended_info.user.js
Created December 27, 2009 16:22
Artechock: Displays Country, Year and Duration of each movie
// ==UserScript==
// @name Artechock: Extended Info
// @namespace http://esquifit.myopenid.com/
// @description Displays Country, Year and Duration of each movie
// @include http://www.artechock.de/film/muenchen/index*
// @include http://www.artechock.de/film/muenchen/film*
// @include http://www.artechock.de/film/muenchen/oton*
// @include http://www.artechock.de/film/bg/film.htm
// ==/UserScript==