diff options
author | anekos | 2013-04-07 12:09:59 +0900 |
---|---|---|
committer | anekos | 2013-04-07 12:09:59 +0900 |
commit | 27808e83be05aac27880d2e06bd8d593f4961a94 (patch) | |
tree | 4de0b39dd2c7f7c746dbde388341bdee77c9ae47 | |
parent | 37f3071e579fbe36deaf17c2513a6619707eab45 (diff) | |
download | vimperator-plugins-27808e83be05aac27880d2e06bd8d593f4961a94.tar.bz2 |
Fix いいいぃいぃぃぃぃいぃぃふぉおおおおおおうううううえっっっっっっくす!!!
-rw-r--r-- | memo.js | 16 | ||||
-rw-r--r-- | twittperator.js | 6 | ||||
-rw-r--r-- | twittperator/twsidebar.tw | 29 |
3 files changed, 25 insertions, 26 deletions
@@ -122,9 +122,9 @@ let PLUGIN_INFO = xml` if (arg.literalArg) { puts(arg.literalArg); } else { - let out = ``; + let out = xml``; gets().split(/\n/).reverse().forEach(function (l) { - out += <li>{l}</li> + out += xml`<li>${l}</li>`; }); liberator.echo(out); } @@ -142,16 +142,16 @@ let PLUGIN_INFO = xml` let desc = item[1] || this.process[1].call(this, item, item.description); if (item.description && item.description.length) { - return <div highlight={highlightGroup || "CompItem"} style="white-space: nowrap"> + return xml`<div highlight=${highlightGroup || "CompItem"} style="white-space: nowrap"> <li highlight="CompDesc"> - {item.description} + ${item.description} </li> - </div>; + </div>`; } - return <div highlight={highlightGroup || "CompItem"} style="white-space: nowrap"> - <li highlight="CompDesc">{item[0]} </li> - </div>; + return xml`<div highlight=${highlightGroup || "CompItem"} style="white-space: nowrap"> + <li highlight="CompDesc">${item[0]} </li> + </div>`; }; context.filters = [function (item) this.match(item.description)]; diff --git a/twittperator.js b/twittperator.js index 604503c..40bc733 100644 --- a/twittperator.js +++ b/twittperator.js @@ -1707,9 +1707,9 @@ let INFO = xml` let center = m[0]; let [head, tail] = [center[0], center.slice(1)]; let right = str.substring(m.index + m[0].length); - let content = head === "@" ? `<a highlight="URL" href=${setting.showTLURLScheme + "://twitter.com/" + tail}> ${center} </a>` - : `<a highlight="URL" href=${center}> ${center} </a>`; - return `${Utils.anchorLink(left)}${content}${Utils.anchorLink(right)}`; + let content = head === "@" ? xml`<a highlight="URL" href=${setting.showTLURLScheme + "://twitter.com/" + tail}> ${center} </a>` + : xml`<a highlight="URL" href=${center}> ${center} </a>`; + return xml`${Utils.anchorLink(left)}${content}${Utils.anchorLink(right)}`; } return str; }, // }}} diff --git a/twittperator/twsidebar.tw b/twittperator/twsidebar.tw index ee8ba3b..191fc13 100644 --- a/twittperator/twsidebar.tw +++ b/twittperator/twsidebar.tw @@ -84,7 +84,7 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () { str = str.trim(); let reg = /https?:\/\/[^\s]+|[#@]\w+/g; XML.ignoreWhitespace = false; - let m, i = 0, buf = "", x = <xhtml:p class="twlist-text" xmlns:xhtml="http://www.w3.org/1999/xhtml"/>; + let m, i = 0, buf = "", x = xml`<xhtml:p class="twlist-text" xmlns:xhtml="http://www.w3.org/1999/xhtml"/>`; while((m=reg.exec(str))){ buf = str.substring(i, m.index); if (buf) @@ -103,8 +103,7 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () { klass += " twlist-url"; href = m[0]; } - x.appendChild(<xhtml:a class={klass} href={href} - onclick="twlist.onClick(event)" xmlns:xhtml={XHTML}>{m[0]}</xhtml:a>); + x.appendChild(xml`<xhtml:a class=${klass} href=${href} onclick="twlist.onClick(event)" xmlns:xhtml=${XHTML}>${m[0]}</xhtml:a>`); i=reg.lastIndex; } buf = str.substr(i); @@ -128,32 +127,32 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () { let richlistitemClasses = [className('tweet-panel'), className('tweet-' + t.type)]; let nameClass = className('item-name') + ' ' + (t.protected ? className('tweet-protected') : ''); xml = - <richlistitem - id={t.id} - class={richlistitemClasses.join(' ')} - style={[ + xml`<richlistitem + id=${t.id} + class=${richlistitemClasses.join(' ')} + style=${[ "font-size: " + px(Config.fontSize - (t.text.length > 70 ? 2 : 0)), "width: " + px(sbWidth - 100) + ' !important' ].join(';')} xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <hbox flex="1"> <vbox width="48"> - <image src={t.img} height="48" width="48" /> + <image src=${t.img} height="48" width="48" /> </vbox> <vbox flex="1"> <hbox flex="1"> - <label flex="2" class={nameClass}>{escapeBreakers(t.name)}</label> - <spacer hidden={!(t.sub || t.time)} /> - <description flex="1" class={className('item-time-and-sub')} hidden={!(t.sub || t.time)}>{escapeBreakers(t.sub || t.time)}</description> + <label flex="2" class=${nameClass}>${escapeBreakers(t.name)}</label> + <spacer hidden=${!(t.sub || t.time)} /> + <description flex="1" class=${className('item-time-and-sub')} hidden=${!(t.sub || t.time)}>${escapeBreakers(t.sub || t.time)}</description> </hbox> - <description flex="1" class={className('item-text')}>{escapeBreakers(t.text)}</description> + <description flex="1" class=${className('item-text')}>${escapeBreakers(t.text)}</description> <hbox> - <description flex="1" class={className('item-sub')} hidden={!t.sub}>{escapeBreakers(t.sub || '')}</description> - <description flex="1" class={className('item-time')} hidden={!t.time}>{escapeBreakers(t.time || '')}</description> + <description flex="1" class=${className('item-sub')} hidden=${!t.sub}>${escapeBreakers(t.sub || '')}</description> + <description flex="1" class=${className('item-time')} hidden=${!t.time}>${escapeBreakers(t.time || '')}</description> </hbox> </vbox> </hbox> - </richlistitem>; + </richlistitem>`; return xml; } |