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
var klass = "_jetpackNotification"; | |
jetpack.tabs.onReady(function(doc){ | |
$("body",doc).append('<div id="'+klass+'" style="position: fixed; bottom: 0; right: 0; height: 0; width: 151px;"><div style="height: 40px; width: 150px; background: #ddd; border: #999 solid; border-width: 1px 0 0 1px"></div></div>'); | |
}); | |
function notify(options) { | |
var doc = jetpack.tabs.focused.contentDocument; | |
$("#"+klass+" div", doc).text(options.body).parent().animate({"height":41},"slow", function(){ | |
setTimeout(function(el){$(el).animate({"height":0},"slow")},3000,this); | |
}); |
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
jetpack.tabs.onReady(function(doc){ | |
if (this.url.match(/^https:\/\/jetpack.mozillalabs.com\//)) | |
$("*",doc).css({"font-family":"Times"}); | |
}); |
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
function absolutifyUrls(data, sourceUrl) { | |
var relRe = /:\/\//; | |
var domainRe = /.*?\/\/[^?/]*/; | |
var pathRe = /.*\//; | |
if (sourceUrl.length-sourceUrl.replace(/\//g,"").length==2) { | |
sourceUrl += "/"; | |
} | |
if (typeof(data)=="string") { | |
data = jQuery("<div>"+data+"</div>"); | |
} else if (typeof(data)=="object") { |
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
function absolutifyUrls(data, sourceUrl) { | |
var relRe = /:\/\//; | |
var domainRe = /.*?\/\/[^?/]*/; | |
var pathRe = /.*\//; | |
if (sourceUrl.length-sourceUrl.replace(/\//g,"").length==2) { | |
sourceUrl += "/"; | |
} | |
if (typeof(data)=="string") { | |
data = jQuery("<div>"+data+"</div>"); | |
} else if (typeof(data)=="object") { |
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 afca0bffe6e1 parser-demo/da.js | |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
+++ b/parser-demo/da.js Fri Mar 27 14:39:56 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'}, |
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'}, |
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
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: "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){ |