# HG changeset patch # User Yoshiki Yazawa # Date 1218733079 -32400 # Node ID c47ec96326ad4e34a51baecbf3ab40b0b2390615 initial import diff -r 000000000000 -r c47ec96326ad Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,14 @@ +app=googlebookmarks_incsearch +vers=_2_0_0 + +all: + cd chrome; zip -r $(app).jar content skin + zip -r $(app)$(vers).xpi chrome/$(app).jar chrome.manifest install.rdf + +clean: + rm -f $(app)$(vers).xpi + rm -f chrome/$(app).jar + +mostlyclean: clean + find . -name "*~" -exec rm {} ';' + find . -name "#*#" -exec rm {} ';' diff -r 000000000000 -r c47ec96326ad chrome.manifest --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chrome.manifest Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,6 @@ +content googlebookmarks_incsearch jar:chrome/googlebookmarks_incsearch.jar!/content/ +skin googlebookmarks_incsearch classic/1.0 jar:chrome/googlebookmarks_incsearch.jar!/skin/ + +overlay chrome://browser/content/browser.xul chrome://googlebookmarks_incsearch/content/overlay.xul +style chrome://browser/content/browser.xul chrome://googlebookmarks_incsearch/skin/toolbar-button.css +style chrome://global/content/customizeToolbar.xul chrome://googlebookmarks_incsearch/skin/toolbar-button.css diff -r 000000000000 -r c47ec96326ad chrome/content/base.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chrome/content/base.css Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,153 @@ +body, div, +dl, dt, dd, ul, ol, li, +h1, h2, h3, h4, h5, h6, +pre, p, blockquote, form, th, td { + font-style: normal; + font-weight: normal; + margin: 0; + padding: 0; +} + +body { + font-family: Verdana, Arial, sans-serif; + line-height:1.3; + background-color: #FFFFFF; + margin: 5px; +} + +span#title { + margin: 0px 5px 0px 0px; +} + +table { + width: 96%; + margin: 5px 10px 5px 10px; + border-collapse: collapse; +} + +th { + padding: 2px 4px 2px 4px; + border: solid 1px #737373; + text-align: left; + font-weight: normal; + background-color: #CFCFCF; + font-size: 80%; +} + +td { + padding: 2px 4px 2px 4px; + border: solid 1px #737373; + background-color: #FFFFFF; + font-size: 80%; +} + +tr > th:first-child { + padding: 1px; +} + +tr > td:first-child { + padding: 1px; +} + +tr.focus > td { + background-color: #EFEFEF; +} + +tr.focus > td:first-child { + background-color: #737373; +} + +td p { + padding: 4px 2px 2px 6px; +} + +strong { + font-weight: normal; +} +strong.high1 { + background-color: #FFFF99 +} +strong.high2 { + background-color: #FFDFFF; +} +strong.high3 { + background-color: #CCFF99; +} +strong.high4 { + background-color: #FFCC99; +} + +img { + vertical-align: middle; + border: none; +} + +.buttons { + text-align: center; + +} +#footer { + clear: both; + padding: 5px 5px 5px 10px; + background-color: #FFFFFF; + font-size: 80%; + color: #000000; +} + +#option { + padding: 0px 2px 0px 2px; + font-size: 80%; +} +#option a { + padding: 0px 2px 0px 2px; +} + +#status { + padding: 4px 2px 0px 20px; + font-size: 80%; +} + +#viewArea { + clear: both; +} + +#viewHeader { + padding-top: 5px; + width: 97%; +} +#viewFooter { + width: 97%; +} + +#pageLinkTop { + padding: 4px 2px 0px 10px; + text-align: right; + font-size: 80%; +} +#pageLinkBottom { + padding: 0px 2px 0px 10px; + text-align: right; + font-size: 80%; +} + +.pageLink a:visited { + color: #0000EE; +} + + +div#loadingBox { + text-align: center; +} +div#loadingBox p { + margin: 2px; + padding: 2px; +} + + +div#settingBox table tr th { + width: 50%; +} +div#helpBox table tr th { + width: 50%; +} + diff -r 000000000000 -r c47ec96326ad chrome/content/database.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chrome/content/database.js Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,207 @@ +// Database +function Database(name, dir) { + name += '.sqlite'; + + var file = Database.getService('@mozilla.org/file/directory_service;1', 'nsIProperties') + .get('ProfD', Components.interfaces.nsIFile); + + if (dir) { + file.append(dir); + if (!file.exists()) { + file.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0755); + } + } + + file.append(name); + + this.connection = Database.getService('@mozilla.org/storage/service;1', 'mozIStorageService').openDatabase(file); +} + +Database.getService = function(cls, interface) { + return Components.classes[cls].getService(Components.interfaces[interface]); +} + +Database.bindParams = function(wrapper, params) { + + if (params == null) return; + + // Hash + if (typeof(params) == 'object' && params.length == null) { + var paramNames = this.getParamNames(wrapper); + for each(var name in paramNames) { + var param = params[name]; + if (typeof(param)=='undefined') continue; + + if (param instanceof Date){ + wrapper.params[name] = param.getTime(); + continue; + } + + wrapper.params[name] = param; + } + return; + } + + // Array + if (typeof(params) == 'string' || params.length == null) { + params = [].concat(params); + } + + var statement = wrapper.statement; + for (var i = 0, len = statement.parameterCount; i < len; i++) { + statement.bindUTF8StringParameter(i, params[i]); + } +} + +Database.getParamNames = function(wrapper) { + var paramNames = []; + var statement = wrapper.statement; + for (var i=0, len=statement.parameterCount ; i width) { + width = document.documentElement.scrollWidth; + } + if (document.documentElement.scrollHeight > height) { + height = document.documentElement.scrollHeight; + } + } else { + if (document.body.scrollWidth > width) { + width = document.body.scrollWidth; + } + if (document.body.scrollHeight > height) { + height = document.body.scrollHeight; + } + } + + return {width: width, height: height}; + }, + + // Styles + getOpacity: function(element) { + var value = this._getStyle(element, 'opacity'); + if (value) return parseFloat(value); + + if (value = (element.style.filter || '').match(/alpha\(opacity=(.*)\)/)) { + if (value[1]) return parseFloat(value[1]) / 100; + } + + return 1.0; + }, + _getStyle: function(element, style) { + var value = element.style[style]; + if (value) return value; + + if (document.defaultView && document.defaultView.getComputedStyle) { + var oldDisplay = element.style.display; + if (Glayer.isWebKit) element.style.display = 'block'; + var css = document.defaultView.getComputedStyle(element, null); + if (css) value = css.getPropertyValue(style); + if (Glayer.isWebKit) element.style.display = oldDisplay; + return value; + } else if (element.currentStyle) { + return element.currentStyle[style]; + } + + return null; + }, + + // debug + getDebugInfo: function() { + + var debugInfo = new Array(); + + debugInfo.push("document.compatMode:" + document.compatMode); + debugInfo.push("window.innerWidth:" + window.innerWidth); + debugInfo.push("window.innerHeight:" + window.innerHeight); + debugInfo.push("window.scrollMaxX:" + window.scrollMaxX); + debugInfo.push("window.scrollMaxY:" + window.scrollMaxY); + debugInfo.push("document.body.scrollWidth:" + document.body.scrollWidth); + debugInfo.push("document.body.scrollHeight:" + document.body.scrollHeight); + debugInfo.push("document.body.offsetWidth:" + document.body.offsetWidth); + debugInfo.push("document.body.offsetHeight:" + document.body.offsetHeight); + debugInfo.push("document.body.clientWidth:" + document.body.clientWidth); + debugInfo.push("document.body.clientHeight:" + document.body.clientHeight); + debugInfo.push("document.documentElement:" + document.documentElement); + if (document.documentElement) { + debugInfo.push("document.documentElement.scrollWidth:" + document.documentElement.scrollWidth); + debugInfo.push("document.documentElement.scrollHeight:" + document.documentElement.scrollHeight); + debugInfo.push("document.documentElement.offsetWidth:" + document.documentElement.offsetWidth); + debugInfo.push("document.documentElement.offsetHeight:" + document.documentElement.offsetHeight); + debugInfo.push("document.documentElement.clientWidth:" + document.documentElement.clientWidth); + debugInfo.push("document.documentElement.clientHeight:" + document.documentElement.clientHeight); + } + + return debugInfo; + } +}; + + +// Fade In/Out +Glayer.Fade = function(element, options) { + this.setup(element, options); +}; + +Glayer.Fade.prototype = { + intervalTime: 10, + duration: 800, + + setup: function(element, options) { + this.element = element; + this.style = this.element.style; + + options = options || {}; + + if (options.duration != undefined) this.duration = options.duration; + if (options.from != undefined) this.from = options.from; + if (options.to != undefined) this.to = options.to; + if (options.callback != undefined) this.callback = options.callback; + + this.startTime = new Date().getTime(); + this.endTime = this.startTime + this.duration; + + this.range = this.to - this.from; + + if (Glayer.isIE && (!this.element.currentStyle.hasLayout)) { + this.style['zoom'] = 1; + } + this.first = true; + }, + start: function(updater) { + var self = this; + updater = updater || function(){ self.update(); }; + this.intervalId = setInterval(updater, this.intervalTime); + }, + end: function() { + if (this.intervalId != null) { + clearInterval(this.intervalId); + this.intervalId = null; + } + this.execCallback(); + }, + execCallback: function() { + if (!this.callback) return; + + if (typeof this.callback == 'function') { + this.callback(); + } else { + for (var i = 0; i < this.callback.length; i++) { + this.callback[i](); + } + } + }, + update: function() { + var nowTime = new Date().getTime(); + + if (this.first) { + this.style.display = ''; + this.first = false; + } + + if (nowTime >= this.endTime) { + this.setOpacity(this.to); + this.end(); + } else { + this.setOpacity(this.from + (this.range * (nowTime - this.startTime) / this.duration)); + } + }, + setOpacity: function(opacity) { + this.style.opacity = opacity; + if (Glayer.isIE) this.style.filter = 'alpha(opacity=' + (opacity * 100) + ')'; + } +}; + +Glayer.FadeIn = function() { + Glayer.Fade.apply(this, arguments); +}; +Glayer.copyProperties(Glayer.FadeIn.prototype, Glayer.Fade.prototype); +Glayer.FadeIn.prototype.from = 0.0; +Glayer.FadeIn.prototype.to = 1.0; + +Glayer.FadeOut = function() { + Glayer.Fade.apply(this, arguments); +}; +Glayer.copyProperties(Glayer.FadeOut.prototype, Glayer.Fade.prototype); +Glayer.FadeOut.prototype.from = 1.0; +Glayer.FadeOut.prototype.to = 0.0; +Glayer.FadeOut.prototype.end = function() { + this.style.display = 'none'; + this.setOpacity(this.from); + Glayer.Fade.prototype.end.apply(this, arguments); +}; + diff -r 000000000000 -r c47ec96326ad chrome/content/glayer_ex.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chrome/content/glayer_ex.js Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,246 @@ +/* +-------------------------------------------------------- +glayer_ex.js (glayer.js extensions) +Version 1.0 (Update 2007/05/28) + +- onozaty (http://www.enjoyxstudy.com) + +Released under the Creative Commons License(Attribution 2.1 Japan): + http://creativecommons.org/licenses/by/2.1/jp/ + +For details, see the web site: + http://www.enjoyxstudy.com/javascript/glayer/extension/ + http://www.enjoyxstudy.com/javascript/glayer/ + +-------------------------------------------------------- +*/ +Glayer.copyProperties(Glayer, { + //// Base //// + boxClassName: 'glayer_box', + createBox: function(boxElement) { + boxElement = this.createElement(boxElement); + boxElement.className = this.boxClassName; + return boxElement; + }, + showBox: function(boxElement, boxOptions, grayElement) { + this.setBoxPosition(boxElement, boxOptions); + return this.showParallel([boxElement], grayElement); + }, + hideBox: function(boxElement, grayElement) { + return this.hideParallel([boxElement], grayElement); + }, + fadeInBox: function(boxElement, boxOptions, grayElement, fadeOption) { + this.setBoxPosition(boxElement, boxOptions); + return this.fadeInParallel([boxElement], grayElement, fadeOption); + }, + fadeOutBox: function(boxElement, grayElement, fadeOption) { + return this.fadeOutParallel([boxElement], grayElement, fadeOption); + }, + + setBoxPosition: function(boxElement, boxOptions) { + var style = boxElement.style; + + boxOptions = boxOptions || {}; + var topRatio = boxOptions.topRatio != null ? boxOptions.topRatio : 0.5; + var leftRatio = boxOptions.leftRatio != null ? boxOptions.leftRatio : 0.5; + style.width = boxOptions.width || ''; + style.height = boxOptions.height || ''; + + var windowTop = 0; + var windowLeft = 0; + var position = this._getStyle(boxElement, 'position'); + if (position != 'fixed') { + windowTop = document.documentElement.scrollTop || document.body.scrollTop; + windowLeft = document.documentElement.scrollLeft || document.body.scrollLeft; + } + + style.display = ''; + var offsetHeight = boxElement.offsetHeight; + var offsetWidth = boxElement.offsetWidth; + style.display = 'none'; + + var windowSize = this.getWindowSize(); + + style.top = ((windowSize.height * topRatio) - (offsetHeight * topRatio) + windowTop) + 'px'; + style.left = ((windowSize.width * leftRatio) - (offsetWidth * leftRatio) + windowLeft) + 'px'; + }, + + //// Message //// + defaultMessage: { + boxId: 'glayer_message', + textId: 'glayer_message_text' + }, + createMessageBox: function(message, boxOptions) { + boxOptions = boxOptions || {}; + var boxElement = boxOptions.box || this.defaultMessage.boxId; + var boxId = boxElement.id || boxElement; + var textElement = boxOptions.text || this.defaultMessage.textId; + var textId = textElement.id || textElement; + + boxElement = this.getElement(boxElement); + if (!boxElement) { + boxElement = this.createBox(boxId); + textElement = document.createElement('p'); + textElement.id = textId; + boxElement.appendChild(textElement); + } else { + textElement = this.getElement(textElement); + } + + textElement.innerHTML = message; + return boxElement; + }, + + showMessage: function(message, boxOptions, grayElement) { + return this.showBox(this.createMessageBox(message, boxOptions), boxOptions, grayElement); + }, + hideMessage: function(boxElement, grayElement) { + return this.hideBox(boxElement || this.defaultMessage.boxId, grayElement); + }, + fadeInMessage: function(message, boxOptions, grayElement, fadeOption) { + return this.fadeInBox(this.createMessageBox(message, boxOptions), boxOptions, grayElement, fadeOption); + }, + fadeOutMessage: function(boxElement, grayElement, fadeOption) { + return this.fadeOutBox(boxElement || this.defaultMessage.boxId, grayElement, fadeOption); + }, + + //// Alert //// + defaultAlert: { + boxId: 'glayer_alert', + textId: 'glayer_alert_text', + buttonId: 'glayer_alert_button', + okId: 'glayer_alert_ok', + okLabel: 'OK' + }, + getDefaultAlertOkFunc: function() { + return function(){ Glayer.hideAlert(); }; + }, + + createAlertBox: function(message, boxOptions) { + + boxOptions = boxOptions || {}; + var boxElement = boxOptions.box || this.defaultAlert.boxId; + var boxId = boxElement.id || boxElement; + var textElement = boxOptions.text || this.defaultAlert.textId; + var textId = textElement.id || textElement; + var okElement = boxOptions.ok || this.defaultAlert.okId; + var okId = okElement.id || okElement; + + boxElement = this.getElement(boxElement); + if (!boxElement) { + boxElement = this.createBox(boxId); + + textElement = document.createElement('p'); + textElement.id = textId; + boxElement.appendChild(textElement); + + var buttonElement = document.createElement('p'); + buttonElement.id = this.defaultAlert.buttonId; + boxElement.appendChild(buttonElement); + + okElement = document.createElement('input'); + okElement.type = 'button'; + okElement.id = okId; + buttonElement.appendChild(okElement); + } else { + textElement = this.getElement(textElement); + okElement = this.getElement(okElement); + } + + textElement.innerHTML = message; + + okElement.value = boxOptions.okLabel || this.defaultAlert.okLabel; + okElement.onclick = boxOptions.callback || this.getDefaultAlertOkFunc(); + + return boxElement; + }, + + showAlert: function(message, boxOptions, grayElement) { + return this.showBox(this.createAlertBox(message, boxOptions), boxOptions, grayElement); + }, + hideAlert: function(boxElement, grayElement) { + return this.hideBox(boxElement || this.defaultAlert.boxId, grayElement); + }, + fadeInAlert: function(message, boxOptions, grayElement, fadeOption) { + return this.fadeInBox(this.createAlertBox(message, boxOptions), boxOptions, grayElement, fadeOption); + }, + fadeOutAlert: function(boxElement, grayElement, fadeOption) { + return this.fadeOutBox(boxElement || this.defaultAlert.boxId, grayElement, fadeOption); + }, + + //// Confirm //// + defaultConfirm: { + boxId: 'glayer_confirm', + textId: 'glayer_confirm_text', + buttonId: 'glayer_confirm_button', + okId: 'glayer_confirm_ok', + okLabel: 'OK', + cancelId: 'glayer_confirm_cancel', + cancelLabel: 'Cancel' + }, + getConfirmResultFunc: function(callback, result) { + return function(){ callback(result); }; + }, + + createConfirmBox: function(message, resultCallback, boxOptions) { + + boxOptions = boxOptions || {}; + var boxElement = boxOptions.box || this.defaultConfirm.boxId; + var boxId = boxElement.id || boxElement; + var textElement = boxOptions.text || this.defaultConfirm.textId; + var textId = textElement.id || textElement; + var okElement = boxOptions.ok || this.defaultConfirm.okId; + var okId = okElement.id || okElement; + var cancelElement = boxOptions.cancel || this.defaultConfirm.cancelId; + var cancelId = cancelElement.id || cancelElement; + + boxElement = this.getElement(boxElement); + if (!boxElement) { + boxElement = this.createBox(boxId); + + textElement = document.createElement('p'); + textElement.id = textId; + boxElement.appendChild(textElement); + + var buttonElement = document.createElement('p'); + buttonElement.id = this.defaultConfirm.buttonId; + boxElement.appendChild(buttonElement); + + okElement = document.createElement('input'); + okElement.type = 'button'; + okElement.id = okId; + buttonElement.appendChild(okElement); + cancelElement = document.createElement('input'); + cancelElement.type = 'button'; + cancelElement.id = cancelId; + buttonElement.appendChild(cancelElement); + } else { + textElement = this.getElement(textElement); + okElement = this.getElement(okElement); + cancelElement = this.getElement(cancelElement); + } + + textElement.innerHTML = message; + + okElement.value = boxOptions.okLabel || this.defaultConfirm.okLabel; + okElement.onclick = this.getConfirmResultFunc(resultCallback, true); + + cancelElement.value = boxOptions.cancelLabel || this.defaultConfirm.cancelLabel; + cancelElement.onclick = this.getConfirmResultFunc(resultCallback, false); + + return boxElement; + }, + + showConfirm: function(message, resultCallback, boxOptions, grayElement) { + return this.showBox(this.createConfirmBox(message, resultCallback, boxOptions), boxOptions, grayElement); + }, + hideConfirm: function(boxElement, grayElement) { + return this.hideBox(boxElement || this.defaultConfirm.boxId, grayElement); + }, + fadeInConfirm: function(message, resultCallback, boxOptions, grayElement, fadeOption) { + return this.fadeInBox(this.createConfirmBox(message, resultCallback, boxOptions), boxOptions, grayElement, fadeOption); + }, + fadeOutConfirm: function(boxElement, grayElement, fadeOption) { + return this.fadeOutBox(boxElement || this.defaultConfirm.boxId, grayElement, fadeOption); + } +}); diff -r 000000000000 -r c47ec96326ad chrome/content/googlebookmarks.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chrome/content/googlebookmarks.js Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,131 @@ +var GoogleBookmarksParser = { + parse: function(xml, idStart) { + var items = xml.getElementsByTagName('item'); + + var list = []; + for (var i = 0, len = items.length; i < len; i++) { + var bookmark = {}; + var item = items[i]; + + bookmark.id = idStart + i; + bookmark.url = this.getFirstText(item, 'link'); + bookmark.title = this.getFirstText(item, 'title'); + bookmark.info = this.getInfo(item); + bookmark.tags = this.getTags(item); + bookmark.time = this.getFirstText(item, 'pubDate'); + + list.push(bookmark); + } + + return list; + }, + getInfo: function(item) { + + var annotation = item.getElementsByTagNameNS('http://www.google.com/history/', 'bkmk_annotation'); + return (annotation.length != 0) ? annotation[0].firstChild.nodeValue : ''; + }, + getTags: function(item) { + + var tags = item.getElementsByTagNameNS('http://www.google.com/history/', 'bkmk_label'); + + var tagsList = []; + for (var i = 0, len = tags.length; i < len; i++) { + tagsList.push(tags[i].firstChild.nodeValue); + } + + if (tagsList.length == 0) { + return ''; + } + return '[' + tagsList.join('] [') + ']'; + }, + getFirstText: function(element, tagName) { + var firstChild = element.getElementsByTagName(tagName)[0].firstChild; + return (firstChild) ? firstChild.nodeValue : ''; + } +} + + +var GoogleBookmarksLoader = function(statusElement, loadingElement, database, callback) { + this.init(statusElement, loadingElement, database, callback); +}; + +for (var prop in LoaderBase.prototype) { + GoogleBookmarksLoader.prototype[prop] = LoaderBase.prototype[prop]; +} + +GoogleBookmarksLoader.prototype.url = 'https://www.google.com/bookmarks/lookup?output=rss&sort=date'; +GoogleBookmarksLoader.COLLECT_SIZE = 1000; + +GoogleBookmarksLoader.prototype._load = function() { + this.bookmarks = []; + this.__load(); +} +GoogleBookmarksLoader.prototype.__load = function() { + + var self = this; + var request = new XMLHttpRequest(); + + request.onreadystatechange = function() { + if (request.readyState == 4) { + try { + request.status + } catch(e) { + // error + self.error('error :connect error :' + self.url); + } + + if (request.status == 200) { + // success + + var xml = request.responseXML; + + var tempBookmarks = GoogleBookmarksParser.parse(xml, self.bookmarks.length); + self.bookmarks = self.bookmarks.concat(tempBookmarks); + + if (tempBookmarks.length < GoogleBookmarksLoader.COLLECT_SIZE) { + + var userId = 'dummy'; + prefBranch.setCharPref('userId', userId); + incsearch.userId = userId; + + self.total = self.bookmarks.length; + + var generator = self.update(self.bookmarks); + + var executer = new Executer( + generator, + 100, + function(count) { + self.dispLoading(count); + }, + function() { + self.dispEnd(self.bookmarks.length); + self.callback(); + } + ); + + executer.run(); + + } else { + self.__load(); + } + } else { + // error + var errMsg = 'error :' + request.status + ' :' + request.statusText + ' :' + self.url; + self.error(errMsg); + } + } + }; + + request.open("GET", this.url + '&start=' + this.bookmarks.length + '&num=' + GoogleBookmarksLoader.COLLECT_SIZE, true); + request.send(null); +}; + + +IncSearch.prototype.createEditUrl = function(bookmark) { + return 'http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=' + encodeURIComponent(bookmark.url); +}; + + +var EXTENSION_NAME = 'googlebookmarks_incsearch'; +var BookmarkLoader = GoogleBookmarksLoader; diff -r 000000000000 -r c47ec96326ad chrome/content/help.gif Binary file chrome/content/help.gif has changed diff -r 000000000000 -r c47ec96326ad chrome/content/incsearch.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chrome/content/incsearch.js Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,631 @@ +var IncSearch = function() { + this.initialize.apply(this, arguments); +}; + +/*-- Utils --------------------------------------------*/ +IncSearch._copyProperties = function(dest, src) { + for (var property in src) { + dest[property] = src[property]; + } + return dest; +}; + +IncSearch._copyProperties = function(dest, src) { + for (var property in src) { + dest[property] = src[property]; + } + return dest; +}; + +IncSearch._getElement = function(element) { + return (typeof element == 'string') ? document.getElementById(element) : element; +}; + +IncSearch._addEvent = function(element, type, func) { + element.addEventListener(type, func, false); +}; + +IncSearch._stopEvent = function(event) { + event.preventDefault(); + event.stopPropagation(); +}; + +/*-----------------------------------------------------*/ +IncSearch.prototype = { + initialize: function(input, viewArea) { + this.input = IncSearch._getElement(input); + this.viewArea = IncSearch._getElement(viewArea); + + this.checkLoopTimer = null; + this.setOptions(arguments[2] || {}); + + this.reset(); + + // check loop start + this.checkLoop(); + }, + + reset: function() { + this.oldInput = null; + this.results = null; + this.resultCount = null; + + this.nowPage = 0; + this.nowRow = 0; + + this.resetTotalCount(); + }, + + // options + interval: 500, + delay: 0, + dispMax: 10, + initDispNon: false, + ignoreCase: true, + highlight: true, + highClassName: 'high', + highClassNum: 4, + delim: ' ', + escape: true, + pagePrevName: 'prev', + pageNextName: 'next', + useHotkey: true, + urlTarget: '_blank', + editTarget: '_blank', + + startElementText: '', + + setOptions: function(options) { + + IncSearch._copyProperties(this, options); + + if (this.useHotkey) { + IncSearch._addEvent(document, 'keydown', this._bindEvent(this.hotkey)); + } + }, + + checkLoop: function() { + var input = this.getInput(); + if (this.isChange(input)) { + this.oldInput = input; + if (this.delay == 0) { + this.startSearch(input); + } else { + if (this.startSearchTimer) clearTimeout(this.startSearchTimer); + this.startSearchTimer = setTimeout(this._bind(this.startSearch, input), this.delay); + } + } + if (this.checkLoopTimer) clearTimeout(this.checkLoopTimer); + this.checkLoopTimer = setTimeout(this._bind(this.checkLoop), this.interval); + }, + + isChange: function(input) { + return (!this.oldInput || (input.join(this.delim) != this.oldInput.join(this.delim))); + }, + + startSearch: function(input) { + // init + this.clearViewArea(); + if (!this.initDispNon || input.length != 0) { + if (this.searchBefore) this.searchBefore(); + this.count(input); + this.search(input, 1); + this.createViewArea(input); + this.nowPage = 1; + this.changeRow(1); + this.createPageLink(1, this.pageLinkTop); + this.createPageLink(1, this.pageLinkBottom); + if (this.searchAfter) this.searchAfter(); + } + }, + changePage: function(pageNo) { + + var start = (pageNo - 1) * this.dispMax + 1; + + if (start > this.resultCount) return false; + + if (this.changePageBefore) this.changePageBefore(pageNo); + this.search(this.oldInput, start); + this.createViewArea(this.oldInput); + this.nowPage = pageNo; + this.nowRow = 0; + this.changeRow(1); + this.createPageLink(pageNo, this.pageLinkTop); + this.createPageLink(pageNo, this.pageLinkBottom); + if (this.changePageAfter) this.changePageAfter(pageNo); + return true; + }, + changeRow: function(rowNo) { + + if (this.results.length == 0) { + return; + } + + if (rowNo < 1) { + if (this.nowPage > 1) { + this.changePage(this.nowPage - 1); + this.changeRow(this.results.length); + } + return; + } + + if (rowNo > this.results.length) { + if (this.nowPage < this.getPageCount()) { + this.changePage(this.nowPage + 1); + } + return; + } + + var table = this.viewArea.getElementsByTagName('table')[0]; + + if (this.nowRow != 0 && table.rows[this.nowRow]) { + table.rows[this.nowRow].className = ''; + } + var row = table.rows[rowNo]; + row.className = 'focus'; + + var margin = 0; + var topPos = (this.viewArea.offsetTop + row.offsetTop) - (this.viewArea.offsetTop + table.rows[1].offsetTop); + var bottomPos = (this.viewArea.offsetTop + row.offsetTop + row.offsetHeight) + 5; + + if (topPos < document.documentElement.scrollTop) { + window.scrollTo(0, topPos); + } else if (bottomPos > document.documentElement.clientHeight + document.documentElement.scrollTop) { + window.scrollTo(0, bottomPos - document.documentElement.clientHeight); + } + + this.nowRow = rowNo; + }, + openUrl: function(rowNo) { + + if (this.results.length == 0) { + return; + } + + window.open(this.results[rowNo - 1].url, this.urlTarget); + }, + openEditWindow: function(rowNo) { + + if (this.results.length == 0) { + return; + } + + window.open(this.createEditUrl(this.results[rowNo - 1]), this.editTarget); + }, + + countSql: 'SELECT COUNT(*) count FROM bookmark', + resetTotalCount: function() { + + var handler = new ResultArrayHandler(this.database, this.countSql); + handler.execute(); + this.totalCount = handler.result[0].count; + }, + + count: function(patternList) { + var where = this.createWhere(patternList); + var sql = this.countSql + where.where; + + try{ + var handler = new ResultArrayHandler(this.database, sql); + handler.execute(where.params); + this.resultCount = handler.result[0].count; + } catch(e) { + alert(e.message || e); + throw e; + } + }, + + searchSql: 'SELECT url, title, info, tags, time FROM bookmark', + search: function(patternList, start) { + + var where = this.createWhere(patternList); + var sql = [ + this.searchSql, where.where, + ' ORDER BY id', + ' LIMIT ', this.dispMax, + ' OFFSET ', (start - 1)].join(''); + + try { + var handler = new ResultArrayHandler(this.database, sql); + handler.execute(where.params); + this.results = handler.result; + } catch(e) { + alert(e.message || e); + throw e; + } + }, + createWhere: function(patternList) { + + var where = []; + var params = {}; + + if (patternList.length != 0) { + for (var i = 0, len = patternList.length; i < len; i++) { + var temp = this.createCondOne(patternList[i], params, 'param' + i); + if (temp != '') { + if (where.length != 0) where.push(' AND'); + where.push(temp); + } + } + } + + var whereString = where.join(''); + if (whereString.length > 0) whereString = ' WHERE' + whereString; + + return { + where: whereString, + params: params}; + }, + createCondOne: function(pattern, params, paramName) { + + var where = []; + if (pattern.indexOf('|') > -1) { + var patterns = this.getSplitPatterns(pattern, '|'); + if (patterns.length != 0) { + for (var i = 0, len = patterns.length; i < len; i++) { + var temp = this.createCondOne(patterns[i], params, paramName + '_' + i); + if (temp != '') { + if (where.length != 0) where.push(' OR'); + where.push(temp); + } + } + if (where.length != 0) { + where.unshift(' ('); + where.push(')'); + } + } + } else if (pattern.indexOf('!') == 0) { + if (pattern.length != 1) { + where.push(this._createCondOne(pattern.substr(1), params, paramName, true)); + } + } else { + where.push(this._createCondOne(pattern, params, paramName)); + } + return where.join(''); + }, + _createCondOne: function(pattern, params, paramName, not) { + params[paramName] = ['%', pattern.toUpperCase().replace(/\\/g, '\\\\').replace(/\%/g, '\\%').replace(/\_/g, '\\_'), '%'].join(''); + return [" search_text ", (not ? "NOT " : ""), "LIKE :", paramName, " ESCAPE '\\'"].join(''); + }, + + getSplitPatterns: function(pattern, separator) { + var temp = pattern.split(separator); + var patterns = []; + for (var i = 0, len = temp.length; i < len; i++) { + if (temp[i] != '') patterns.push(temp[i]); + } + return patterns; + }, + + createPageLink: function(pageNo, pageLinkElm) { + + pageLinkElm = IncSearch._getElement(pageLinkElm); + + var pageCount = this.getPageCount(); + + var prev_page = false; + var next_page = false; + + if (pageCount > 1) { + + if (pageNo == 1) { + next_page = true; + } else if (pageNo == pageCount) { + prev_page = true; + } else { + next_page = true; + prev_page = true; + } + } + + pageLinkElm.innerHTML = ''; + + if (prev_page) { + this.createPageAnchor(pageLinkElm, this.pagePrevName, pageNo - 1); + } + if (next_page) { + if (prev_page) { + pageLinkElm.appendChild(document.createTextNode(' | ')); + } + + this.createPageAnchor(pageLinkElm, this.pageNextName, pageNo + 1); + } + }, + + createPageAnchor: function(parent, text, page) { + + var a = parent.appendChild(document.createElement('a')); + a.setAttribute('href', 'javascript:void(0)'); + a.appendChild(document.createTextNode(text)); + + IncSearch._addEvent(a, 'click', this._bind(this.changePage, page)); + }, + + getPageCount: function() { + var pageCount = 0; + + if (this.resultCount && this.resultCount != 0) { + if (this.dispMax == 0) { + pageCount = 1; + } else { + pageCount = Math.floor((this.resultCount + this.dispMax - 1) / this.dispMax); + } + } + return pageCount; + }, + + createInfo: function() { + var displayInfo = ''; + + if (this.resultCount != 0) { + var start = (this.nowPage - 1) * this.dispMax + 1; + var end = start + this.dispMax - 1; + + if (this.dispMax == 0 || end > this.resultCount) { + end = this.resultCount; + } + displayInfo = ['(display :', start, '-', end, ')'].join(''); + } + this.status.innerHTML = [this.resultCount.toString(), ' hits ', + displayInfo, ' / total : ', this.totalCount].join(''); + }, + searchAfter: function() { + this.createInfo(); + window.scrollTo(0, 0); + }, + searchBefore: function() { + this.status.innerHTML = 'Search...'; + }, + changePageAfter: function(pageNo) { + this.createInfo(); + window.scrollTo(0, 0); + }, + + hotkey: function(event) { + if (event.ctrlKey) { + switch(event.keyCode) { + case 13: // Enter + case 77: // m (Enter Max OS X) + this.openUrl(this.nowRow); + IncSearch._stopEvent(event); + break; + case 37: // Left + if (this.nowPage > 1) { + this.changePage(this.nowPage - 1); + } + IncSearch._stopEvent(event); + break; + case 38: // Up + this.changeRow(this.nowRow - 1); + IncSearch._stopEvent(event); + break; + case 39: // Right + if (this.nowPage < this.getPageCount()) { + this.changePage(this.nowPage + 1); + } + IncSearch._stopEvent(event); + break; + case 40: // Down + this.changeRow(this.nowRow + 1); + IncSearch._stopEvent(event); + break; + case 69: // e + this.openEditWindow(this.nowRow); + IncSearch._stopEvent(event); + break; + default: + break; + } + } + }, + + createViewArea: function(patternList) { + var elementText = []; + + patternList = this.getHighlightPatterns(patternList); + + for (var i = 0, len = this.results.length; i < len; i++) { + elementText.push(this.createLineElement(this.results[i], patternList)); + } + + if (elementText.length > 0) { + if (this.startElementText) elementText.unshift(this.startElementText); + if (this.endElementText) elementText.push(this.endElementText); + this.viewArea.innerHTML = elementText.join(''); + } + + if (this.afterHookCreateView) { + this.afterHookCreateView(patternList); + } + }, + + getHighlightPatterns: function(patternList) { + var highlightPatterns = []; + + for (var i = 0, len = patternList.length; i < len; i++) { + var pattern = patternList[i]; + if (pattern.indexOf('|') > -1) { + var patterns = this.getSplitPatterns(pattern, '|'); + highlightPatterns = highlightPatterns.concat(this.getHighlightPatterns(patterns)); + } else if (pattern.indexOf('!') != 0) { + highlightPatterns.push(pattern); + } + } + return highlightPatterns; + }, + + clearViewArea: function() { + this.viewArea.innerHTML = ''; + this.results = null; + this.resultCount = null; + this.nowPage = 0; + this.nowRow = 0; + }, + + createLineElement: function(bookmark, patternList) { + + var text = [''); + + // tags + text.push(this.createElement(this.tagsString(bookmark.tags), patternList, 'td')); + + // time + text.push(this.createElement(bookmark.time, patternList, 'td', false)); + + // edit + text.push(this.createEditElement(bookmark, patternList)); + text.push(''); + + return text.join(''); + }, + + createElement: function(value, patternList, tagName, highlight) { + + return ['<', tagName, '>', + this.createText(value, patternList, highlight), + ''].join(''); + }, + + createText: function(value, patternList, highlight) { + + var textList = []; + + if (highlight == null) highlight = this.highlight; + + if (highlight) { + + var first = this.getFirstMatch(value, patternList); + + while (first.listIndex != -1) { + textList.push(this._escapeHTML(value.substr(0, first.matchIndex))); + textList.push(''); + textList.push(this._escapeHTML(value.substr(first.matchIndex, patternList[first.listIndex].length))); + textList.push(''); + + value = value.substr(first.matchIndex + patternList[first.listIndex].length); + first = this.getFirstMatch(value, patternList); + } + } + + textList.push(this._escapeHTML(value)); + + return textList.join(''); + }, + + tagsString: function(tags, sep) { + + if (typeof(tags) == 'string') return tags; + + sep = sep || ' '; + if (this.tagBracket && tags.length != 0) { + return ['[', tags.join(']' + sep + '['), ']'].join(''); + } else { + return tags.join(sep); + } + }, + + createTitleElement: function(bookmark, patternList) { + var text = [''); + text.push(this.createText(bookmark.title, patternList)); + text.push(''); + + if (this.addTitleText) { + text.push(this.addTitleText(bookmark, patternList)); + } + + text.push('
'); + return text.join(''); + }, + + createEditElement: function(bookmark, patternList) { + + var text = [''); + + return text.join(''); + }, + + matchIndex: function(value, pattern) { + + if (this.ignoreCase) { + return value.toLowerCase().indexOf(pattern.toLowerCase()); + } else { + return value.indexOf(pattern); + } + }, + + getFirstMatch: function(value, patternList) { + + var first = {}; + first.listIndex = -1; + first.matchIndex = value.length; + + for (var i = 0, len = patternList.length; i < len; i++) { + var index = this.matchIndex(value, patternList[i]); + if (index != -1 && index < first.matchIndex) { + first.listIndex = i; + first.matchIndex = index; + } + } + + return first; + }, + + getInput: function() { + + var value = this.input.value; + + if (!value) { + return []; + } else if (this.delim) { + var list = value.split(this.delim); + var inputs = []; + for (var i = 0, len = list.length; i < len; i++) { + if (list[i]) inputs.push(list[i]); + } + return inputs; + } else { + return [value]; + } + }, + + // Utils + _bind: function(func) { + var self = this; + var args = Array.prototype.slice.call(arguments, 1); + return function(){ func.apply(self, args); }; + }, + _bindEvent: function(func) { + var self = this; + var args = Array.prototype.slice.call(arguments, 1); + return function(event){ event = event || window.event; func.apply(self, [event].concat(args)); }; + }, + _escapeHTML: function(value) { + if (this.escape) { + return value.replace(/\&/g, '&').replace( //g, '>') + .replace(/\"/g, '"').replace(/\'/g, ''').replace(/\n|\r\n/g, '
'); + } else { + return value; + } + } +} diff -r 000000000000 -r c47ec96326ad chrome/content/init.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chrome/content/init.js Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,287 @@ +var DEFAULT_NUMBER_OF_RESULTS = 10; +var DEFAULT_SIZE_OF_INPUT_AREA = 80; +var USER_EXT_JS = "user-extension.js" +var USER_EXT_JS_SAMPLE = "user-extension-sample.js" +var USER_CSS = "user.css" +var USER_CSS_SAMPLE = "user-sample.css" + +if (!createTableSql) { + var createTableSql = "CREATE TABLE bookmark(id INTEGER, url TEXT, title TEXT, info TEXT, tags TEXT, time TEXT, search_text TEXT, PRIMARY KEY(id))"; +} + +var database = new Database('bookmark', EXTENSION_NAME); + +var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); +var prefBranch = prefSvc.getBranch('extensions.' + EXTENSION_NAME + '.'); +var incsearch = null; + +window.addEventListener('load', function(){ + var text = document.getElementById('text'); + var viewArea = document.getElementById('viewArea'); + var status = document.getElementById('status'); + var sync = document.getElementById('sync'); + var setting = document.getElementById('setting'); + var help = document.getElementById('help'); + var loadingBox = document.getElementById('loadingBox'); + var loadingImage = document.getElementById('loadingImage'); + var loadingMessage = document.getElementById('loadingMessage'); + var pageLinkTop = document.getElementById('pageLinkTop'); + var pageLinkBottom = document.getElementById('pageLinkBottom'); + + var userId = null; + try { + userId = prefBranch.getCharPref("userId"); + } catch(e){ + } + + var numberOfResults = DEFAULT_NUMBER_OF_RESULTS; + try { + numberOfResults = prefBranch.getIntPref("numberOfResults"); + } catch(e){ + } + + var sizeOfInputArea = DEFAULT_SIZE_OF_INPUT_AREA; + try { + sizeOfInputArea = prefBranch.getIntPref("sizeOfInputArea"); + } catch(e){ + } + + text.size = sizeOfInputArea; + + + try { + if (!userId || !database.connection.tableExists('bookmark')) { + if (database.connection.tableExists('bookmark')) { + database.execute("DROP TABLE bookmark"); + } + database.execute(createTableSql); + } + } catch(e) { + + status.innerHTML = e.message || e; + loading.style.display = 'none'; + throw e; + } + + // global + incsearch = new IncSearch( + text, + viewArea, + { + dispMax: numberOfResults, + status: status, + pageLinkTop: pageLinkTop, + pageLinkBottom: pageLinkBottom, + database: database, + userId: userId + } + ); + incsearch.input.focus(); + + var update = function() { + incsearch.input.focus(); + new BookmarkLoader(loadingBox, loadingMessage, database); + }; + + sync.addEventListener('click', update, false); + + // settings + var settingBox = document.getElementById('settingBox'); + var settingSave = document.getElementById('settingSave'); + var settingCancel = document.getElementById('settingCancel'); + var numberOfResultElement = document.getElementById('numberOfResults'); + var sizeOfInputAreaElement = document.getElementById('sizeOfInputArea'); + + var openSetting = function() { + Glayer.showBox(settingBox); + numberOfResultElement.value = incsearch.dispMax; + numberOfResultElement.focus(); + sizeOfInputAreaElement.value = text.size; + }; + + var closeSetting = function() { + Glayer.hideBox(settingBox); + incsearch.input.focus(); + }; + + setting.addEventListener('click', openSetting, false); + + numberOfResultElement.addEventListener( + 'keydown', + function(event) { + if (event.keyCode == 13) { + settingSave.click(); + } + }, + false); + + sizeOfInputAreaElement.addEventListener( + 'keydown', + function(event) { + if (event.keyCode == 13) { + settingSave.click(); + } + }, + false); + + settingSave.addEventListener( + 'click', + function() { + Glayer.hideBox(settingBox); + incsearch.dispMax = parseInt(numberOfResultElement.value) || incsearch.dispMax; + prefBranch.setIntPref('numberOfResults', incsearch.dispMax); + incsearch.input.size = parseInt(sizeOfInputAreaElement.value) || incsearch.input.size; + prefBranch.setIntPref('sizeOfInputArea', incsearch.input.size); + + incsearch.reset(); + incsearch.input.focus(); + }, + false); + + settingCancel.addEventListener('click', closeSetting, false); + + // help + var helpBox = document.getElementById('helpBox'); + var helpClose = document.getElementById('helpClose'); + + var openHelp = function() { + Glayer.showBox(helpBox); + helpClose.focus(); + }; + + var closeHelp = function() { + Glayer.hideBox(helpBox); + incsearch.input.focus(); + }; + + var hideMsgBox = function() { + helpBox.style.display = 'none'; + settingBox.style.display = 'none'; + loadingBox.style.display = 'none'; + + var confirmBox = document.getElementById('glayer_confirm'); + if (confirmBox) { + confirmBox.style.display = 'none'; + } + var alertBox = document.getElementById('glayer_alert'); + if (alertBox) { + alertBox.style.display = 'none'; + } + } + + help.addEventListener('click', openHelp, false); + helpClose.addEventListener('click', closeHelp, false); + + // shortcut + document.addEventListener( + 'keydown', + function(event) { + if (event.ctrlKey) { + switch(event.keyCode) { + case 85: // u (Sync) + hideMsgBox(); + update(); + IncSearch._stopEvent(event); + break; + case 83: // s (Setting) + if (settingBox.style.display == '') { + closeSetting(); + } else { + hideMsgBox(); + openSetting(); + } + IncSearch._stopEvent(event); + break; + case 191: // / (Help) + if (helpBox.style.display == '') { + closeHelp(); + } else { + hideMsgBox(); + openHelp(); + } + IncSearch._stopEvent(event); + break; + default: + break; + } + } + }, + false); + + + if (!userId) update(); + +}, false); + +window.addEventListener('unload', function(){ +if (database.connection.transactionInProgress) database.connection.rollbackTransaction(); +}, false); + + +(function() { + function getContents(aURL){ + var ioService = Components.classes["@mozilla.org/network/io-service;1"] + .getService(Components.interfaces.nsIIOService); + var scriptableStream = Components.classes["@mozilla.org/scriptableinputstream;1"] + .getService(Components.interfaces.nsIScriptableInputStream); + + var channel = ioService.newChannel(aURL, null, null); + var input = channel.open(); + scriptableStream.init(input); + var str = scriptableStream.read(input.available()); + scriptableStream.close(); + input.close(); + return str; + } + + var ios = Components.classes["@mozilla.org/network/io-service;1"] + .getService(Components.interfaces.nsIIOService); + var fileHandler = ios.getProtocolHandler("file") + .QueryInterface(Components.interfaces.nsIFileProtocolHandler); + + // user extension javascript + var userExtJs = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("ProfD", Components.interfaces.nsIFile); + + userExtJs.append(EXTENSION_NAME); + userExtJs.append(USER_EXT_JS); + + if (!userExtJs.exists()) { + var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"] + .createInstance(Components.interfaces.nsIFileOutputStream); + + foStream.init(userExtJs, 0x02 | 0x08 | 0x20, 0664, 0); // write, create, truncate + + var sample = getContents("chrome://" + EXTENSION_NAME + "/content/" + USER_EXT_JS_SAMPLE); + foStream.write(sample, sample.length); + foStream.close(); + } + + var userExtJsURL = fileHandler.getURLSpecFromFile(userExtJs); + + document.write(' + + diff -r 000000000000 -r c47ec96326ad chrome/content/setting.gif Binary file chrome/content/setting.gif has changed diff -r 000000000000 -r c47ec96326ad chrome/content/sync.gif Binary file chrome/content/sync.gif has changed diff -r 000000000000 -r c47ec96326ad chrome/content/user-extension-sample.js diff -r 000000000000 -r c47ec96326ad chrome/content/user-sample.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chrome/content/user-sample.css Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,1 @@ +/* user stylesheet */ diff -r 000000000000 -r c47ec96326ad chrome/content/view.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chrome/content/view.html Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + Google Bookmarks IncSearch - Firefox Extension + + +

+ Google Bookmarks IncSearch + + + Sync Bookmarkssync + Settingsetting + Helphelp + +

+
+ + +
+
+
+
+
+ + +
DescriptionTagsTime
']; + + // url, title + text.push(this.createTitleElement(bookmark, patternList)); + + // info + if (bookmark.info) { + text.push(this.createElement(bookmark.info, patternList, 'p')); + } + text.push('
edit
+ + + + + + + + +
Number of results
Size of input area
+
+ + +
+ + + + diff -r 000000000000 -r c47ec96326ad chrome/skin/icon-large.png Binary file chrome/skin/icon-large.png has changed diff -r 000000000000 -r c47ec96326ad chrome/skin/icon-medium.png Binary file chrome/skin/icon-medium.png has changed diff -r 000000000000 -r c47ec96326ad chrome/skin/icon-small.png Binary file chrome/skin/icon-small.png has changed diff -r 000000000000 -r c47ec96326ad chrome/skin/toolbar-button.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chrome/skin/toolbar-button.css Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,7 @@ +#googleBookmarksIncsearchButton { + list-style-image: url("chrome://googlebookmarks_incsearch/skin/icon-medium.png"); +} + +toolbar[iconsize="small"] #googleBookmarksIncsearchButton { + list-style-image: url("chrome://googlebookmarks_incsearch/skin/icon-small.png"); +} diff -r 000000000000 -r c47ec96326ad install.rdf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/install.rdf Fri Aug 15 01:57:59 2008 +0900 @@ -0,0 +1,27 @@ + + + + + + + googlebookmarks_incsearch@enjoyxstudy.com + 2 + 1.3.5 + + + + {ec8030f7-c20a-464f-9b0e-13a3a9e97384} + 2.0 + 3.0.* + + + + Google Bookmarks IncSearch + This extension is a incremental search UI for Google Bookmarks(http://www.google.com/bookmarks/), You can find bookmarks very quickly. + onozaty + http://www.enjoyxstudy.com/firefox/extension/googlebookmarks_incsearch/ + chrome://googlebookmarks_incsearch/skin/icon-large.png + + +