Browse files

リンクのマッチング時もmigemoに対応した

  • Loading branch information...
1 parent 23d258e commit 28fd6292cdebe139400114c577d58f4dee433d3e @trapezoid committed Oct 19, 2011
Showing with 8 additions and 6 deletions.
  1. +0 −4 Chrome/glee_chrome/js/events.js
  2. +1 −1 Chrome/glee_chrome/js/glee.js
  3. +7 −1 Chrome/glee_chrome/js/linkreaper.js
View
4 Chrome/glee_chrome/js/events.js
@@ -202,10 +202,6 @@ Glee.Events = {
// Set timer to search for links
Glee.timer = setTimeout(function() {
LinkReaper.reapLinks(Glee.value());
- Glee.selectedElement = LinkReaper.getFirst();
- Glee.setState(Glee.selectedElement, 'el');
- Glee.scrollToElement(Glee.selectedElement);
- Glee.setSearchActivity(false);
}, Glee.defaults.linkSearchTimer);
}
else {
View
2 Chrome/glee_chrome/js/glee.js
@@ -906,4 +906,4 @@ $(document).ready(function() {
if (!IS_CHROME && window !== window.top)
return;
Glee.init();
-});
+});
View
8 Chrome/glee_chrome/js/linkreaper.js
@@ -30,7 +30,8 @@ var LinkReaper = {
*/
reapLinks: function(term, override) {
var self = this;
- if (term.length < 3) return;
+ //if (term.length < 3) return;
+ console.log(term);
chrome.extension.sendRequest(
'pocnedlaincikkkcmlpcbipcflgjnjlj' // ChromeMigemo の Extension ID (Extension Gallery からインストールした場合)
,{"action": "getRegExpString", "query": term}
@@ -55,6 +56,11 @@ var LinkReaper = {
LinkReaper.searchTerm = term;
LinkReaper.selectedLinks = Utils.sortElementsByPosition(LinkReaper.selectedLinks);
LinkReaper.traversePosition = 0;
+
+ Glee.selectedElement = LinkReaper.getFirst();
+ Glee.setState(Glee.selectedElement, 'el');
+ Glee.scrollToElement(Glee.selectedElement);
+ Glee.setSearchActivity(false);
}
}
);

0 comments on commit 28fd629

Please sign in to comment.