aboutsummaryrefslogtreecommitdiffstats
path: root/multi_requester.js
AgeCommit message (Expand)Author
2008-12-28複数 %s に対応。suVene
2008-12-26wedata local cache.suVene
2008-12-26wedata local cache.suVene
2008-12-25デフォルトのサイト設定を追加anekos
2008-12-22licensesuVene
2008-12-20add <updateURL> for pluginManager.js [27131]suVene
2008-12-19* get absolute path of <a>, <img>.suVene
2008-12-17 * Libraries.drry
2008-12-17* follow PluginManager(pre)suVene
2008-12-17:%s/&lt;/</ganekos
2008-12-13 * fixed the CSS.drry
2008-12-09* _libly.js ver.0.1.4にあわせた修正 [26222]suVene
2008-12-09 * [26161].drry
2008-12-08*PLUGIN_INFO対応(@see http://coderepos.org/share/browser/lang/javascript/vi...suVene
2008-12-07*libty.js bug fix.suVene
2008-12-06library is moved to a libly.jssuVene
2008-12-02 * 正規表現を修正しました。仕様では「`--`」禁止ですが...drry
2008-12-02*SITEINFOと共にkeymap指定suVene
2008-12-01 * fixed a regex.drry
2008-12-011度目のレスポンスから次のリクエストを取り出す仕組みsuVene
2008-11-30*複数リクエスト時のechoが2.0preでうまく出力できないので...suVene
2008-11-30XPathのcontextNodeとして利用するにはDocumentFragment.firstChildをr...suVene
2008-11-29bugfix: fail parsing DOM when DOCTYPE is not setjanus_wel
2008-11-28*引数のサイトをカンマ区切りで同時に指定できるように...suVene
2008-11-26url に %s がない場合は引数なしで実行可能にsuVene
2008-11-26Follow CVS Headanekos
2008-11-23follow the new completer.anekos
2008-11-19for 2.0preanekos
2008-11-19modify siteinfo attribute 'resultXPath' to 'xpath'suVene
2008-11-192.0pre 対応anekos
class="p">() { this._initialize.apply(this, arguments); } Highlighter.prototype = { _initialize: function (args) { if (args) this.set(args); this.highlightList = []; }, set: function (args) { this.color = args.color; this.opacity = args.opacity; this.interval = args.interval; this._prepareTemplate(); return this; }, _prepareTemplate: function () { let div = window.document.createElement('div'); div.className = 'vimp_plugin_highlightelement'; let style = fixedStyle + [ 'background-color: ' + this.color + ';', '-moz-opacity: ' + this.opacity + ';' ].join(''); div.setAttribute('style', style); this._highlightTemplate = div; }, highlight: function (element) { if (!this._isDisplay(element)) return; let doc = element.ownerDocument; // TODO: highlight XUL elements if (!doc.body) return; let scrollX = doc.defaultView.scrollX; let scrollY = doc.defaultView.scrollY; let rects = element.getClientRects(); for (let i=0, l=rects.length ; i<l ; ++i) { let r = rects[i]; let h = this._buildHighlighter({ top: r.top + scrollY, left: r.left + scrollX, width: r.right - r.left, height: r.bottom - r.top, }); this.highlightList.push(h); doc.body.appendChild(h); } }, _unhighlight: function (element) { if (element.intervalId) clearInterval(element.intervalId); element.parentNode.removeChild(element); }, unhighlightAll: function () { let list = this.highlightList; while (list.length) this._unhighlight(list.pop()); }, _isDisplay: function (element) { let computedStyle = content.document.defaultView.getComputedStyle(element, null); return ( computedStyle.getPropertyValue('visibility') !== 'hidden' && computedStyle.getPropertyValue('display') !== 'none'); }, _buildHighlighter: function (rect) { let div = this._highlightTemplate.cloneNode(false); div.style.top = rect.top + 'px'; div.style.left = rect.left + 'px'; div.style.width = rect.width + 'px'; div.style.height = rect.height + 'px'; if (this.interval > 0) { div.intervalId = setInterval( function () { let d = div.style.display; div.style.display = (d === 'block' ? 'none' : 'block'); }, this.interval ); } else { div.intervalId = undefined; } return div; }, }; if (!plugins.highlighterFactory) { plugins.highlighterFactory = function () { let h = new Highlighter(); return h.set.apply(h, arguments); } } } )(); // vim: set sw=4 ts=4 et;