diff -r -U 8 -b ./xul_migemo-0.13.6-fx+tb/chrome/content/xulmigemo/highlight/highlight.js ./xul_migemo-0.13.6mod4-fx+tb/chrome/content/xulmigemo/highlight/highlight.js
--- ./xul_migemo-0.13.6-fx+tb/chrome/content/xulmigemo/highlight/highlight.js	2010-07-13 22:55:20 +0900
+++ ./xul_migemo-0.13.6mod4-fx+tb/chrome/content/xulmigemo/highlight/highlight.js	2010-07-13 22:55:20 +0900
@@ -670,17 +670,19 @@
 				null,
 				XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
 				null
 			);
 		for (var i = nodes.snapshotLength-1; i > -1; i--)
 		{
 			nodes.snapshotItem(i).parentNode.removeChild(nodes.snapshotItem(i));
 		}
+		try {
 		doc.documentElement.removeAttribute(this.kANIMATION);
+    } catch(ex) {}
 
 		if (aRecursively)
 			Array.slice(aFrame.frames)
 				.forEach(function(aFrame) {
 					this.clearAnimationStyleIn(aFrame, aRecursively);
 				}, this);
 	},
  
diff -r -U 8 -b ./xul_migemo-0.13.6-fx+tb/chrome/content/xulmigemo/places/locationBarOverlay.js ./xul_migemo-0.13.6mod4-fx+tb/chrome/content/xulmigemo/places/locationBarOverlay.js
--- ./xul_migemo-0.13.6-fx+tb/chrome/content/xulmigemo/places/locationBarOverlay.js	2010-07-13 22:55:24 +0900
+++ ./xul_migemo-0.13.6mod4-fx+tb/chrome/content/xulmigemo/places/locationBarOverlay.js	2010-07-13 22:55:24 +0900
@@ -1,8 +1,9 @@
+Components.utils.import('resource://xulmigemo-modules/migemo.jsm');
 Components.utils.import('resource://xulmigemo-modules/places.jsm'); 
  
 var XMigemoLocationBarSearchSource = { 
 	create : function(aDefinition)
 	{
 		aDefinition.__proto__ = this;
 		return aDefinition;
 	},
@@ -122,17 +123,17 @@
 			getSourceSQL : function(aFindFlag) {
 				return XMigemoPlaces.getPlacesSourceInRangeSQL(aFindFlag);
 			},
 			getItemsSQL : function(aFindFlag) {
 				return XMigemoPlaces.getPlacesItemsSQL(aFindFlag);
 			},
 			itemFilter : function(aItem, aTerms, aFindFlag) {
 				var target = XMigemoPlaces.getFindTargetsFromFlag(aItem, aFindFlag);
-				this.regexp.compile(
+				this.regexp = new RegExp(
 					'^(?:'+aTerms.map(function(aTerm) {
 						return XMigemoPlaces.textUtils.sanitize(aTerm);
 					}).join('|')+')',
 					'gim'
 				);
 				var matched = XMigemoPlaces.textUtils.brushUpTerms(
 							XMigemoPlaces.textUtils
 								.splitByBoundaries(target.join('\n'))
@@ -166,17 +167,17 @@
 			getSourceSQL : function(aFindFlag) {
 				return XMigemoPlaces.getPlacesSourceInRangeSQL(aFindFlag);
 			},
 			getItemsSQL : function(aFindFlag) {
 				return XMigemoPlaces.getPlacesItemsSQL(aFindFlag);
 			},
 			itemFilter : function(aItem, aTerms, aFindFlag) {
 				var target = XMigemoPlaces.getFindTargetsFromFlag(aItem, aFindFlag);
-				this.regexp.compile(
+				this.regexp = new RegExp(
 					'^(?:'+aTerms.map(function(aTerm) {
 						return XMigemoPlaces.textUtils.sanitize(aTerm);
 					}).join('|')+')',
 					'gim'
 				);
 				var matched = target.join('\n').match(this.regexp);
 				return (matched && matched.length >= aTerms.length) ?
 					XMigemoLocationBarOverlay.kITEM_ACCEPT :
@@ -313,16 +314,17 @@
 		switch (aEvent.type)
 		{
 			case 'load':
 				this.init();
 				break;
 
 			case 'unload':
 				this.destroy();
+				this.bar.setAttribute('timeout', 1000);
 				break;
 		}
 	},
  
 	onSearchBegin : function() 
 	{
 		if (this.lastInput == this.input)
 			return;
@@ -904,16 +906,43 @@
 		}
 	},
  
 	initLocationBar : function() 
 	{
 		var bar = this.bar;
 		if (!bar || bar.__xmigemo__mController) return;
 
+    var panel = this.panel;
+    if (!bar.focused)
+      panel.style.setProperty("display", "none", "important");
+
+    bar.addEventListener("focus", function(event) {
+      bar.setAttribute('timeout', bar._prefs.getIntPref("delay"));
+      panel.style.removeProperty("display");
+      content.addEventListener("focus", function(event) {
+        panel.style.setProperty("display", "none", "important");
+        bar.setAttribute('timeout', 3000);
+        content.removeEventListener("focus", arguments.callee, true);
+      }, true);
+    }, true);
+
+    bar.addEventListener("blur", function(event) {
+        panel.style.setProperty("display", "none", "important");
+        bar.setAttribute('timeout', 30000);
+    }, true);
+
+    setTimeout(function() {
+      if (!bar.focused)
+        bar.setAttribute('timeout', 30000);
+      else
+        bar._prefs.getIntPref("delay")
+    }, 2000);
+
+
 		bar.__xmigemo__mController = bar.mController;
 		bar.mController = new XMigemoAutoCompletePopupController(bar.__xmigemo__mController);
 	},
   
 	destroy : function() 
 	{
 		window.removeEventListener('unload', this, false);
 		this.destroyLocationBar();
@@ -924,16 +953,19 @@
 		}
 	},
 	
 	destroyLocationBar : function() 
 	{
 		var bar = this.bar;
 		if (!bar || !bar.__xmigemo__mController) return;
 
+		this.panel.style.removeProperty("display");
+		bar.setAttribute('timeout', bar._prefs.getIntPref("delay"));
+
 		bar.mController.destroy();
 		bar.mController = bar.__xmigemo__mController;
 		delete bar.__xmigemo__mController;
 	}
   
 }; 
  
 window.addEventListener('load', XMigemoLocationBarOverlay, false); 
@@ -1054,17 +1086,17 @@
 			}
 			catch(e) {
 			}
 		}
 		aValue.popup.addEventListener('popupshowing', this, false);
 		return this.controller.input = aValue;
 	},
  
-	get searchStatus(aValue) 
+	get searchStatus() 
 	{
 		return this.controller.searchStatus;
 	},
  
 	get matchCount() 
 	{
 		if (this.isMigemoResult)
 			return this.matchCountOverride || this.controller.matchCount;
diff -r -U 8 -b ./xul_migemo-0.13.6-fx+tb/chrome/content/xulmigemo/ui.js ./xul_migemo-0.13.6mod4-fx+tb/chrome/content/xulmigemo/ui.js
--- ./xul_migemo-0.13.6-fx+tb/chrome/content/xulmigemo/ui.js	2010-07-13 22:55:24 +0900
+++ ./xul_migemo-0.13.6mod4-fx+tb/chrome/content/xulmigemo/ui.js	2010-07-13 22:55:24 +0900
@@ -1381,17 +1381,17 @@
 			if (box.x + box.width > this.findModeSelector.boxObject.x - 25) {
 				this.showHideLabels(false);
 				shouldUpdatePosition = true;
 			}
 			else {
 				this.showHideLabels(true);
 			}
 		}
-		this.updateModeSelectorPosition(shouldUpdatePosition);
+		this.updateModeSelectorPosition(true||shouldUpdatePosition);
 	},
  
 	onChangeMode : function() 
 	{
 		this.clearTimer();
 		var highlighted = this.highlightCheck.checked;
 		if (highlighted) {
 			gFindBar.toggleHighlight(false);
@@ -2056,17 +2056,17 @@
 			.replace(
 				/((?:var|let) win = [^;]+;)/,
 				<![CDATA[$1
 					if (!aWord || aWord != this._lastHighlightString)
 						XMigemoUI.clearHighlight(win.document);
 				]]>.toString()
 			).replace(
 				'return textFound;',
-				'XMigemoUI.clearHighlight(doc); $&'
+				'XMigemoUI.clearHighlight(win.document); $&'
 			).replace(
 				'this._highlight(aHighlight, retRange, controller);',
 				'this._highlight(aHighlight, retRange, controller, aWord);'
 			).replace(
 				/if \((!doc \|\| )(!\("body" in doc\)|!\(doc instanceof HTMLDocument\))\)/,
 				'if ($1($2 && (!XMigemoUI.workForAnyXMLDocuments || !(doc instanceof XMLDocument))))'
 			).replace(
 				'doc.body',
@@ -2336,19 +2336,29 @@
 		event = document.createEvent('Events');
 		event.initEvent('XMigemoFindBarToggleHighlight', true, false);
 		event.targetHighlight = aHighlight;
 		XMigemoUI.findBar.dispatchEvent(event);
 
 		if (!aHighlight)
 			XMigemoUI.activeBrowser.contentDocument.documentElement.removeAttribute(XMigemoUI.kLAST_HIGHLIGHT);
 
+    if (this.ttmmm)
+      clearTimeout(this.ttmmm);
 		var scope = window.gFindBar ? window.gFindBar : this ;
 		scope.xmigemoOriginalToggleHighlight.apply(scope, arguments);
+		/* xxx mmm */
+		if (!aHighlight) {
+      self.ttmmm = setTimeout(function(self, s) {
+        if (!s.getElement("highlight").checked)
+          s._highlightDoc(false);
+      }, 500, this, scope);
+    }
 	},
+  ttmmm: null,
  
 	stopDelayedToggleHighlightTimer : function() 
 	{
 		if (!this.delayedToggleHighlightTimer) return;
 		window.clearTimeout(this.delayedToggleHighlightTimer);
 		this.delayedToggleHighlightTimer = null;
 	},
 	delayedToggleHighlightTimer : null,
@@ -2628,16 +2638,22 @@
 		document.addEventListener('XMigemoFindProgress', this, false);
 		document.addEventListener('XMigemoFindAgain', this, false);
 
 		XMigemoService.addPrefListener(this);
 		XMigemoService.firstListenPrefChange(this);
 
 		this.lastFindMode = this.FIND_MODE_NATIVE;
 
+try {
+  gFindBar;
+} catch(rr) {}
+if (typeof window.gFindBar == 'undefined') {
+  window.gFindBar =  document.getElementById('FindToolbar');
+}
 		if (!('gFindBarInitialized' in window) || gFindBarInitialized) {
 			if (typeof window.gFindBar == 'undefined')
 				window.gFindBar = this.findBar;
 			this.initFindBar();
 		}
 		else {
 			let self = this;
 			window.watch('gFindBarInitialized', function(aValue) {
diff -r -U 8 -b ./xul_migemo-0.13.6-fx+tb/components/xmXMigemoDictionary.js ./xul_migemo-0.13.6mod4-fx+tb/components/xmXMigemoDictionary.js
--- ./xul_migemo-0.13.6-fx+tb/components/xmXMigemoDictionary.js	2010-07-06 21:54:00 +0900
+++ ./xul_migemo-0.13.6mod4-fx+tb/components/xmXMigemoDictionary.js	2010-07-06 21:54:00 +0900
@@ -235,65 +235,65 @@
 
 		if (aOperation == 'add' && !term) {
 			return this.RESULT_ERROR_NO_TARGET;
 		}
 
 		var systemDic = this.list['system'];
 		var userDic   = this.list['user'];
 
-		var regexp = new RegExp();
+		var regexp;
 
 		if (aOperation == 'add') {
 			// ƒfƒtƒHƒ‹ƒg‚ÌŽ«�‘‚É“ü‚Á‚Ä‚¢‚é’PŒê‚Í’Ç‰Á‚µ‚È‚¢
-			regexp.compile('^'+input+'\t(.+)$', 'm');
+			regexp = new RegExp('^'+input+'\t(.+)$', 'm');
 			if (regexp.test(systemDic)) {
 				var terms = RegExp.$1.split('\t').join('\n');
-				regexp.compile('^'+this.textUtils.sanitize(term)+'$', 'm');
+				regexp = new RegExp('^'+this.textUtils.sanitize(term)+'$', 'm');
 				if (regexp.test(terms))
 					return this.RESULT_ERROR_ALREADY_EXIST;
 			}
 		}
 
-		regexp.compile('^'+input+'\t(.+)$', 'm');
+		regexp = new RegExp('^'+input+'\t(.+)$', 'm');
 		if (regexp.test(userDic)) {
 			var terms = RegExp.$1.split('\t').join('\n');
-			regexp.compile('^'+this.textUtils.sanitize(term)+'$', 'm');
+			regexp = new RegExp('^'+this.textUtils.sanitize(term)+'$', 'm');
 			if ((aOperation == 'remove' && !term) || regexp.test(terms)) {
 				// ƒ†�[ƒUŽ«�‘‚É‚·‚Å‚É“o˜^�Ï‚Ý‚Å‚ ‚é�ê�‡
 				switch (aOperation)
 				{
 					case 'add':
 						return this.RESULT_ERROR_ALREADY_EXIST;
 
 					case 'remove':
 						if (term) {
 							terms = terms.replace(regexp, '').replace(/\n\n+/g, '\n').split('\n').join('\t');
 							mydump('terms:'+terms.replace(/\t/g, ' / '));
 							if (terms) {
-								regexp.compile('^('+input+'\t.+)$', 'm');
+								regexp = new RegExp('^('+input+'\t.+)$', 'm');
 								regexp.test(userDic);
 								entry = input + '\t' + terms.replace(/(^\t|\t$)/, '');
 								this.list['user'] = userDic.replace(regexp, entry);
 								break;
 							}
 						}
 
-						regexp.compile('\n?^('+input+'\t.+)\n?', 'm');
+						regexp = new RegExp('\n?^('+input+'\t.+)\n?', 'm');
 						entry = input + '\t';
 						this.list['user'] = userDic.replace(regexp, '');
 						break;
 				}
 			}
 			else {
 				// ƒ†�[ƒUŽ«�‘‚ÉƒGƒ“ƒgƒŠ‚Í‚ ‚é‚ª�A‚»‚ÌŒê‹å‚Í“o˜^‚³‚ê‚Ä‚¢‚È‚¢�ê�‡
 				switch (aOperation)
 				{
 					case 'add':
-						regexp.compile('^('+input+'\t.+)$', 'm');
+						regexp = new RegExp('^('+input+'\t.+)$', 'm');
 						regexp.test(userDic);
 						entry = RegExp.$1 + '\t' + term;
 						this.list['user'] = userDic.replace(regexp, entry);
 						break;
 
 					case 'remove':
 						return this.RESULT_ERROR_NOT_EXIST;
 				}
diff -r -U 8 -b ./xul_migemo-0.13.6-fx+tb/components/xmXMigemoDictionaryJa.js ./xul_migemo-0.13.6mod4-fx+tb/components/xmXMigemoDictionaryJa.js
--- ./xul_migemo-0.13.6-fx+tb/components/xmXMigemoDictionaryJa.js	2010-07-06 22:55:12 +0900
+++ ./xul_migemo-0.13.6mod4-fx+tb/components/xmXMigemoDictionaryJa.js	2010-07-06 22:55:12 +0900
@@ -302,65 +302,65 @@
 
 		if (aOperation == 'add' && !term) {
 			return this.RESULT_ERROR_NO_TARGET;
 		}
 
 		var systemDic = this.list[key];
 		var userDic   = this.list[key+'-user'];
 
-		var regexp = new RegExp();
+		var regexp;
 
 		if (aOperation == 'add') {
 			// ƒfƒtƒHƒ‹ƒg‚ÌŽ«�‘‚É“ü‚Á‚Ä‚¢‚é’PŒê‚Í’Ç‰Á‚µ‚È‚¢
-			regexp.compile('^'+yomi+'\t(.+)$', 'm');
+			regexp = new RegExp('^'+yomi+'\t(.+)$', 'm');
 			if (regexp.test(systemDic)) {
 				var terms = RegExp.$1.split('\t').join('\n');
-				regexp.compile('^'+this.textUtils.sanitize(term)+'$', 'm');
+				regexp = new RegExp('^'+this.textUtils.sanitize(term)+'$', 'm');
 				if (regexp.test(terms))
 					return this.RESULT_ERROR_ALREADY_EXIST;
 			}
 		}
 
-		regexp.compile('^'+yomi+'\t(.+)$', 'm');
+		regexp = new RegExp('^'+yomi+'\t(.+)$', 'm');
 		if (regexp.test(userDic)) {
 			var terms = RegExp.$1.split('\t').join('\n');
-			regexp.compile('^'+this.textUtils.sanitize(term)+'$', 'm');
+			regexp = new RegExp('^'+this.textUtils.sanitize(term)+'$', 'm');
 			if ((aOperation == 'remove' && !term) || regexp.test(terms)) {
 				// ƒ†�[ƒUŽ«�‘‚É‚·‚Å‚É“o˜^�Ï‚Ý‚Å‚ ‚é�ê�‡
 				switch (aOperation)
 				{
 					case 'add':
 						return this.RESULT_ERROR_ALREADY_EXIST;
 
 					case 'remove':
 						if (term) {
 							terms = terms.replace(regexp, '').replace(/\n\n+/g, '\n').split('\n').join('\t');
 							mydump('terms:'+terms.replace(/\t/g, ' / '));
 							if (terms) {
-								regexp.compile('^('+yomi+'\t.+)$', 'm');
+								regexp = new RegExp('^('+yomi+'\t.+)$', 'm');
 								regexp.test(userDic);
 								entry = yomi + '\t' + terms.replace(/(^\t|\t$)/, '');
 								this.list[key+'-user'] = userDic.replace(regexp, entry);
 								break;
 							}
 						}
 
-						regexp.compile('\n?^('+yomi+'\t.+)\n?', 'm');
+						regexp = new RegExp('\n?^('+yomi+'\t.+)\n?', 'm');
 						entry = yomi + '\t';
 						this.list[key+'-user'] = userDic.replace(regexp, '');
 						break;
 				}
 			}
 			else {
 				// ƒ†�[ƒUŽ«�‘‚ÉƒGƒ“ƒgƒŠ‚Í‚ ‚é‚ª�A‚»‚ÌŒê‹å‚Í“o˜^‚³‚ê‚Ä‚¢‚È‚¢�ê�‡
 				switch (aOperation)
 				{
 					case 'add':
-						regexp.compile('^('+yomi+'\t.+)$', 'm');
+						regexp = new RegExp('^('+yomi+'\t.+)$', 'm');
 						regexp.test(userDic);
 						entry = RegExp.$1 + '\t' + term;
 						this.list[key+'-user'] = userDic.replace(regexp, entry);
 						break;
 
 					case 'remove':
 						return this.RESULT_ERROR_NOT_EXIST;
 				}
diff -r -U 8 -b ./xul_migemo-0.13.6-fx+tb/components/xmXMigemoTextTransform.js ./xul_migemo-0.13.6mod4-fx+tb/components/xmXMigemoTextTransform.js
--- ./xul_migemo-0.13.6-fx+tb/components/xmXMigemoTextTransform.js	2010-07-06 21:54:00 +0900
+++ ./xul_migemo-0.13.6mod4-fx+tb/components/xmXMigemoTextTransform.js	2010-07-06 21:54:00 +0900
@@ -127,17 +127,17 @@
  
 	removeLatinModifiers : function(aInput) 
 	{
 		var table = this.LATMOD;
 		var regexp = new RegExp();
 		return String(aInput).replace(this.MODPAT, function(aChar) {
 				for (var i in table)
 				{
-					regexp.compile('^('+table[i].char+')$', 'i')
+					regexp = new RegExp('^('+table[i].char+')$', 'i')
 					if (!regexp.test(aChar)) continue;
 					aChar = table[i].key;
 					break;
 				}
 				return aChar;
 			});
 	}
  
diff -r -U 8 -b ./xul_migemo-0.13.6-fx+tb/components/xmXMigemoTextUtils.js ./xul_migemo-0.13.6mod4-fx+tb/components/xmXMigemoTextUtils.js
--- ./xul_migemo-0.13.6-fx+tb/components/xmXMigemoTextUtils.js	2010-07-11 22:55:36 +0900
+++ ./xul_migemo-0.13.6mod4-fx+tb/components/xmXMigemoTextUtils.js	2010-07-11 22:55:36 +0900
@@ -535,17 +535,19 @@
 			this.visibleNodeFilter[aBackward ? 'isBelow' : 'isAbove' ];
 		this.visibleNodeFilter.isInScreenCompletely =
 			this.visibleNodeFilter[aBackward ? 'isAbove' : 'isBelow' ];
 
 		var lastNode;
 
 		var utils = w.QueryInterface(Ci.nsIInterfaceRequestor)
 						.getInterface(Ci.nsIDOMWindowUtils);
+		var doFx5 = false;
 		if ('nodesFromRect' in utils) { // Firefox 3.6-
+			try {
 			let nodes = utils.nodesFromRect(
 					0,
 					0,
 					this.visibleNodeFilter.minPixels,
 					w.innerWidth+this.visibleNodeFilter.minPixels,
 					w.innerHeight+this.visibleNodeFilter.minPixels,
 					this.visibleNodeFilter.minPixels,
 					true,
@@ -563,18 +565,21 @@
 			else {
 				let i = nodes.length-1;
 				do {
 					lastNode = nodes[i];
 					i--;
 				}
 				while (this.visibleNodeFilter.acceptNode(nodes[i]) != this.visibleNodeFilter.kACCEPT && i > -1);
 			}
+			} catch(ex) {
+        doFx5 = true;
+      }
 		}
-		else { // -Firefox 3.5
+		if (doFx5 || !('nodesFromRect' in utils)) { // -Firefox 3.5
 			let walker = aDocument.createTreeWalker(
 					aDocument.documentElement,
 					Ci.nsIDOMNodeFilter.SHOW_ELEMENT,
 					this.visibleNodeFilter,
 					false
 				);
 
 			if (aBackward) {
diff -r -U 8 -b ./xul_migemo-0.13.6-fx+tb/install.rdf ./xul_migemo-0.13.6mod4-fx+tb/install.rdf
--- ./xul_migemo-0.13.6-fx+tb/install.rdf	2010-07-13 22:55:52 +0900
+++ ./xul_migemo-0.13.6mod4-fx+tb/install.rdf	2010-07-13 22:55:52 +0900
@@ -1,22 +1,22 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
          xmlns:NC="http://home.netscape.com/NC-rdf#"
          xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <RDF:Description RDF:about="urn:mozilla:install-manifest"
                    em:id="{01F8DAE3-FCF4-43D6-80EA-1223B2A9F025}"
                    em:name="XUL/Migemo"
-                   em:version="0.13.6"
+                   em:version="0.13.6mod4"
                    em:description="Provides advanced incremental search for any language."
                    em:homepageURL="http://piro.sakura.ne.jp/xul/xulmigemo/"
                    em:optionsURL="chrome://xulmigemo/content/config/config.xul"
                    em:iconURL="chrome://xulmigemo/content/icon.png">
 	<em:creator>plus7, SHIMODA Hiroshi</em:creator>
-	<em:contributor>alice0775</em:contributor>
+	<em:contributor>alice0775 0.13.6mod4</em:contributor>
 	<em:contributor>Dear Periwinkle</em:contributor>
 
 
 
 
 
 
     <em:localized>
@@ -39,18 +39,18 @@
 		<em:contributor>Dear Periwinkle</em:contributor>
       </RDF:Description>
     </em:localized>
 
 
 	<em:targetApplication>
       <!-- Firefox -->
 	  <RDF:Description em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
-	                   em:minVersion="3.5"
-	                   em:maxVersion="4.0b2pre" />
+	                   em:minVersion="3.6"
+	                   em:maxVersion="8.*" />
     </em:targetApplication>
     <em:targetApplication>
       <!-- Thunderbird -->
 	  <RDF:Description em:id="{3550f703-e582-4d05-9a08-453d09bdfdc6}"
 	                   em:minVersion="3.0"
 	                   em:maxVersion="3.1.*" />
 	</em:targetApplication>
   </RDF:Description>
diff -r -U 8 -b ./xul_migemo-0.13.6-fx+tb/modules/places.jsm ./xul_migemo-0.13.6mod4-fx+tb/modules/places.jsm
--- ./xul_migemo-0.13.6-fx+tb/modules/places.jsm	2010-07-11 22:55:36 +0900
+++ ./xul_migemo-0.13.6mod4-fx+tb/modules/places.jsm	2010-07-11 22:55:36 +0900
@@ -600,17 +600,20 @@
 		       AND t.parent = (SELECT folder_id
 		                         FROM moz_bookmarks_roots
 		                        WHERE root_name = 'tags')
 		 WHERE b.type = 1 AND b.fk = p.id) tags
 	]]>.toString(),
  
 	openCountColumnSQLFragment      : ', o.open_count open_count', 
 	openCountFinalColumnSQLFragment : ', open_count',
-	openCountSourceSQLFragment      : ' LEFT OUTER JOIN moz_openpages_temp o ON o.place_id = p.id',
+  /*
+  https://gist.github.com/985580
+  */
+  openCountSourceSQLFragment      : ' LEFT OUTER JOIN moz_openpages_temp o ON o.url = p.url',
   
 	/* output of the SQL must be:
 		SELECT single_string
 		  FROM ...
 	 */
 	getSingleStringFromRange : function(aSQL, aStart, aRange, aAdditionalBinding) 
 	{
 		if (!aSQL || !this.db) return '';
@@ -620,21 +623,21 @@
 		if (!aRange) return '';
 
 		var offset = aAdditionalBinding ? aAdditionalBinding.length : 0 ;
 		var offsets = {
 				PLACE_FOR_LINEBREAK : -1,
 				PLACE_FOR_START     : -1,
 				PLACE_FOR_RANGE     : -1
 			};
-		var regexp = new RegExp();
+    var regexp;
 		for (var i in offsets)
 		{
 			if (aSQL.indexOf('%'+i+'%') < 0) continue;
-			regexp.compile('%'+i+'%', 'g');
+      regexp = new RegExp('%'+i+'%', 'g');
 			offsets[i] = offset;
 			offset++;
 			aSQL = aSQL.replace(regexp, '?'+offset);
 		}
 
 		var statement = this.getSingleStringFromRange_lastStatement;
 		if (!statement || aSQL != this.getSingleStringFromRange_lastSQL) {
 			this.getSingleStringFromRange_lastStatement = null;
@@ -741,17 +744,17 @@
 
 		if (
 			this.autoStartRegExpFind &&
 			this.textUtils.isRegExp(aBaseQuery.searchTerms)
 			) {
 			var flags = 'gm';
 			if (/\/[^\/]*i[^\/]*$/.test(aBaseQuery.searchTerms)) flags += 'i';
 			this.lastFindRegExp =
-				this.lastTermsRegExp = new RegExp(this.textUtils.extractRegExpSource(aQuery.searchTerms), flags);
+        this.lastTermsRegExp = new RegExp(this.textUtils.extractRegExpSource(aBaseQuery.searchTerms), flags);
 		}
 		else {
 			let termsRegExp = {};
 			let exceptionsRegExp = {};
 			this.lastFindRegExp = XMigemoCore.getRegExpFunctional(aBaseQuery.searchTerms, termsRegExp, exceptionsRegExp);
 			this.lastFindRegExp = new RegExp(this.lastFindRegExp, 'gim');
 			this.lastTermsRegExp = termsRegExp.value ? new RegExp(termsRegExp.value, 'gim') : null ;
 //			this.lastExceptionsRegExp = exceptionsRegExp.value ? new RegExp(exceptionsRegExp.value, 'im') : null ;
@@ -913,17 +916,17 @@
 		browser.urlbar.match.title
 		browser.urlbar.match.url
 		browser.urlbar.matchBehavior
 		browser.urlbar.default.behavior
 	]]>.toString(),
   
 	init : function() 
 	{
-		this.openPageAvailable = XMigemoService.Comparator.compare(XMigemoService.XULAppInfo.version, '3.7a6pre') >= 0;
+    //this.openPageAvailable = XMigemoService.Comparator.compare(XMigemoService.XULAppInfo.version, '3.7a6pre') >= 0;
 		if (!this.openPageAvailable) {
 			this.openCountColumnSQLFragment = '';
 			this.openCountFinalColumnSQLFragment = '';
 			this.openCountSourceSQLFragment = '';
 		}
 
 		XMigemoService.addPrefListener(this);
 		XMigemoService.firstListenPrefChange(this);
diff -r -U 8 -b ./xul_migemo-0.13.6-fx+tb/modules/service.jsm ./xul_migemo-0.13.6mod4-fx+tb/modules/service.jsm
--- ./xul_migemo-0.13.6-fx+tb/modules/service.jsm	2010-07-13 00:08:22 +0900
+++ ./xul_migemo-0.13.6mod4-fx+tb/modules/service.jsm	2010-07-13 00:08:22 +0900
@@ -338,17 +338,17 @@
 		return this.XMigemo.regExpHighlightSelection(aRegExpSource, aRegExpFlags, aFindRange, aSurroundNode);
 	},
  
 	get XMigemo() { 
 		if (!this._XMigemo) {
 			try {
 				this._XMigemo = Cc['@piro.sakura.ne.jp/xmigemo/factory;1']
 					.getService(Ci.xmIXMigemoFactory)
-					.getService(migemo.language);
+					.getService(migemo.lang);
 			}
 			catch(e) {
 				throw e;
 			}
 		}
 		return this._XMigemo;
 	},
 	_XMigemo : null
Only in ./xul_migemo-0.13.6-fx+tb/: xul_migemo-0.13.6mod4.diff
