This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.makeSearchCommand({ | |
name: "Google", | |
url: "http://www.google.com/search?q={QUERY}", | |
parser: {type: "JSON", | |
url: "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q={QUERY}", | |
container: "responseData.results", | |
title: "titleNoFormatting", | |
preview: "content", | |
href: "url"} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "inspect", | |
description: "highlight the current element", | |
execute: function() { | |
CmdUtils.loadJQuery(function(){ | |
CmdUtils.injectJavascript("http://www.keyframesandcode.com/resources/javascript/jQuery/highlight/jquery.highlight.js", | |
function() { | |
var d = CmdUtils.getDocumentInsecure(); | |
var w = CmdUtils.getWindowInsecure(); | |
if (!d.getElementById("ubiquityCss")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "selector", | |
description: "Finds a selector that will match element currently hovered, and highlights all matches", | |
execute: function() { | |
CmdUtils.loadJQuery(function(){ | |
var d = CmdUtils.getDocumentInsecure(); | |
var w = CmdUtils.getWindowInsecure(); | |
myId = function(me){ return me.id ? '#' + me.id : '' } | |
myTag = function(me){ return me.tagName ? me.tagName.toLowerCase() : '' } | |
myClass = function(me){ return me.className ? '.' + me.className.split(' ').join('.') : '' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "selector", | |
description: "Finds a selector that will match element currently hovered, and highlights all matches", | |
execute: function() { | |
CmdUtils.loadJQuery(function(){ | |
var d = CmdUtils.getDocumentInsecure(); | |
var w = CmdUtils.getWindowInsecure(); | |
myId = function(me){ return me.id ? '#' + me.id : '' } | |
myTag = function(me){ return me.tagName ? me.tagName.toLowerCase() : '' } | |
myClass = function(me){ return me.className ? '.' + me.className.split(' ').join('.') : '' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "selector", | |
description: "Finds a selector that will match element currently hovered, and highlights all matches", | |
execute: function() { | |
var d = CmdUtils.getDocumentInsecure(); | |
myId = function(me){ return me.id ? '#' + me.id : '' } | |
myTag = function(me){ return me.tagName ? me.tagName.toLowerCase() : '' } | |
myClass = function(me){ return me.className ? '.' + me.className.split(' ').join('.') : '' } | |
breadcrumbs = function(me){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "flasher", | |
description: "Finds a selector that will match element currently hovered, and highlights all matches", | |
execute: function ubiquityHighlightExecute() { | |
var d = CmdUtils.getDocumentInsecure(); | |
myId = function(me){ return me.id ? '#' + me.id : '' } | |
myTag = function(me){ return me.tagName ? me.tagName.toLowerCase() : '' } | |
myClass = function(me){ return me.className ? '.' + me.className.split(' ').join('.') : '' } | |
breadcrumbs = function breadcrumbs(me){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "flasher", | |
description: "Finds a selector that will match element currently hovered, and highlights all matches", | |
execute: function ubiquityHighlightExecute() { | |
var d = CmdUtils.getDocumentInsecure(); | |
myId = function(me){ return me.id ? '#' + me.id : '' } | |
myTag = function(me){ return me.tagName ? me.tagName.toLowerCase() : '' } | |
myClass = function(me){ return me.className ? '.' + me.className.split(' ').join('.') : '' } | |
breadcrumbs = function breadcrumbs(me){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "selector", | |
description: "Finds a selector that will match element currently hovered, and highlights all matches", | |
execute: function() { | |
var d = CmdUtils.getDocumentInsecure(); | |
myId = function(me){ return me.id ? '#' + me.id : '' } | |
myTag = function(me){ return me.tagName ? me.tagName.toLowerCase() : '' } | |
myClass = function(me){ return me.className ? '.' + me.className.split(' ').join('.') : '' } | |
breadcrumbs = function breadcrumbs(me){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "example", | |
takes: {"search term": /.*/}, | |
preview: function(pblock, input) { | |
CmdUtils.previewGet(pblock, "http://google.com", {q: input.text}, function(data){ | |
pblock.innerHTML = data; | |
}); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r f084d1578ba1 parser-demo/da.js | |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
+++ b/parser-demo/da.js Wed Mar 25 00:21:33 2009 +0100 | |
@@ -0,0 +1,16 @@ | |
+// set up our parsers | |
+ | |
+var da = new Parser('da'); | |
+da.roles = [ | |
+ {role: 'goal', delimiter: 'til'}, | |
+ {role: 'source', delimiter: 'fra'}, |
OlderNewer