This file contains 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 Do Sleep | |
// @namespace http://gist.github.com/saneyuki | |
// @include about:blank | |
// @developper saneyuki | |
// ==/UserScript== | |
(function(){ | |
var sleep = 0; | |
var wakeup = 5; |
This file contains 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
/* Apply the style of Navigation toolbar when "TabOnTop", for using TST */ | |
#navigator-toolbox[tabsontop="false"] { | |
background-image: -moz-linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0)), | |
-moz-linear-gradient(left, rgb(207, 219, 236), rgb(207, 219, 236)); | |
} |
This file contains 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
/** | |
* Preferences | |
* This is enable to write the style like "resource://services-sync/ext/Preferences.js". | |
* | |
* @License MPL 1.1/GPL 2.0/LGPL 2.1 | |
* @developer saneyuki_s | |
* @version 20111127.1 | |
*/ | |
const Cc = Components.classes; |
This file contains 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 lazyGetter(aObject, aName, aLambda) { | |
Object.defineProperty(aObject, aName, { | |
get: function () { | |
delete aObject[aName]; | |
return aObject[aName] = aLambda.apply(aObject); | |
}, | |
configurable: true, | |
enumerable : true, | |
}); | |
} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Archive Reader</title> | |
<script type="application/javascript" src="archive-reader.js"></script> | |
<style> | |
#drop-area { | |
float: left; | |
width: 200px; |
This file contains 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
# HG changeset patch | |
# Parent 635fcc11d2b16265114d6bbc02768d007f73d66b | |
# User smellman? <???@???.???> | |
diff --git a/config/Preprocessor.py b/config/Preprocessor.py | |
--- a/config/Preprocessor.py | |
+++ b/config/Preprocessor.py | |
@@ -377,16 +377,18 @@ class Preprocessor: | |
# Strips blank lines from the output. | |
def filter_emptyLines(self, aLine): |
This file contains 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
/** | |
* @return {Array} (destructuring assignment) | |
* @0 {number} | |
* @1 {string} | |
*/ | |
function test() { | |
return [1, "hoge"]; | |
} |
This file contains 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
「コンテンツの読み出し時 (DOMContentLoaded相当のタイミング)に | |
DOM経由でコンテンツの中身を確認する」処理とかはUI操作を妨げる重い処理になったりするんで、 | |
UIとコンテンツのスレッドが別じゃないとUIのフリーズに繋がったりする。 | |
なのでUIのフリーズを回避しつつそういう処理をしたい場合は、 | |
コンテンツの操作スレッド上で実行すれとかで非同期にすればいいんだけど、根本的にそういう処理って | |
コンテンツの中身に真っ当なDOM経由で触ろうとすると、どちらにせよコンテンツと同じスレッドで動かす必要がある。 | |
よって結局コンテンツの読み出し自体のUXに影響がある。 | |
だったらWorkerスレッド上で文字列から擬似的にDOMツリーを作成して、そのDOMを舐めれば問題解決する。 |
OlderNewer