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
/** | |
*@see http://realtech.burningbird.net/graphics/svg/experiments-svg-clock | |
*/ | |
let SVG_NS = "http://www.w3.org/2000/svg"; | |
let XHTML_NS = "http://www.w3.org/1999/xhtml"; | |
let CLOCK_SVG = | |
<svg version="1.1" width="250" height="250" xmlns={SVG_NS} viewBox="0 0 3 3" id="svg_clock"> | |
<defs> | |
<style type="text/css"><![CDATA[ |
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 XHTML = new Namespace("xhtml", "http://www.w3.org/1999/xhtml"); | |
function xmlToDom (xml, xmlns) { | |
XML.prettyPringing = false; | |
XML.ignoreWhitespace = true; | |
var doc = (new DOMParser).parseFromString( | |
<root xmlns={xmlns || XHTML}>{xml}</root>.toXMLString(), | |
"application/xml" | |
); | |
var imported = document.importNode(doc.documentElement, true); | |
var range = document.createRange(); |
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 145d4c50d6b4 common/content/commandline.js | |
--- a/common/content/commandline.js Fri Dec 24 10:23:40 2010 +0900 | |
+++ b/common/content/commandline.js Fri Dec 24 11:04:18 2010 +0900 | |
@@ -1118,7 +1118,7 @@ | |
*/ | |
Completions: Class("Completions", { | |
init: function (input) { | |
- this.context = CompletionContext(input.editor); | |
+ this.context = CompletionContext(input); | |
this.context.onUpdate = this.closure._reset; |
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
" http://code.google.com/intl/ja/apis/urlshortener/v1/getting_started.html | |
cabbrev -javascript ggl ggl(buffer.URI) | |
js <<EOM | |
userContext.ggl = function getGoogleShortenURL(url, callback) { | |
let uri = "https://www.googleapis.com/urlshortener/v1/url"; | |
let xhr = new XMLHttpRequest(); | |
xhr.open("POST", uri, !!callback); | |
if (callback) { | |
xhr.onreadystatechange = function () { | |
if (xhr.readyState == 4 && xhr.status == 200) { |
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
// userChorme.js | |
// @see https://bugzilla.mozilla.org/show_bug.cgi?id=593388 | |
window.addEventListener("tabviewframeinitialized", function (event) { | |
this.removeEventListener(event.type, arguments.callee, false); | |
var win = TabView._window; | |
var tabViewRootElement = win.document.documentElement; | |
function updateBackground (isLwthemeActive) { | |
var imageStyle = ""; |
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
// ==UserScript== | |
// @name GM_test_01 | |
// @description GM test 01 | |
// @include * | |
// ==/UserScript== | |
window.FOO = "BAR"; | |
if (this.sharedObject) | |
sharedObject.FOO = "SHARED BAR"; |
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
/* | |
簡易テストのため、Vimperatorの:sourceで実行 | |
wrapされたSandbox上で一方(sd1)に値を代入、もう一方(sd2)で参照をするテスト | |
Firefox3.6 の場合: | |
sd1でevalInSandboxした値はsd2からも参照可能。 | |
また、Chrome特権上からも参照可能 | |
Firefox4.0bの場合: |
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 d1cf77d3a834 common/content/commandline.js | |
--- a/common/content/commandline.js Sat Feb 12 15:58:01 2011 +0100 | |
+++ b/common/content/commandline.js Mon Feb 14 20:04:45 2011 +0900 | |
@@ -132,6 +132,7 @@ | |
this._commandWidget = document.getElementById("liberator-commandline-command"); | |
this._messageBox = document.getElementById("liberator-message"); | |
+ this._messageBox.addEventListener("transitionend", this.close.bind(this), false); | |
this._commandWidget.inputField.QueryInterface(Ci.nsIDOMNSEditableElement); |
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
/* | |
// Example:: | |
(function(ns){ | |
ns.foo = "abc"; | |
// => window["teramako.github.com::foo"] == "abc" | |
})(NS("github", "teramako.github.com")); | |
*/ |
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
/** | |
* @example | |
* validateHost("http://hogehoge"); // false | |
*/ | |
var io = window.Services.io, | |
eTLD = window.Services.eTLD, | |
fixup = Cc["@mozilla.org/docshell/urifixup;1"].getService(Ci.nsIURIFixup); | |
function makeURI (aURL, aCharset, aBaseURI) { |