From 862198772d1b50822d888bae4d13d3ee8aa69740 Mon Sep 17 00:00:00 2001 From: anekos Date: Sat, 6 Apr 2013 18:18:33 +0900 Subject: ミョクス --- auto-bookmark.js | 35 ++++++++++++++++------------------- erection.js | 4 ++-- google-tasks.js | 8 ++++---- migemized_find.js | 2 +- mpd-currentsong.js | 4 ++-- readitlater.js | 34 +++++++++++++++++----------------- statusbar_panel.js | 7 +++---- stella.js | 10 +++++----- umihara.js | 2 +- zip-de-download.js | 4 ++-- 10 files changed, 53 insertions(+), 57 deletions(-) diff --git a/auto-bookmark.js b/auto-bookmark.js index 7da83ef..96ed9dc 100644 --- a/auto-bookmark.js +++ b/auto-bookmark.js @@ -350,18 +350,15 @@ let INFO = xml` 'autobookmark', 'Auto bookmarking', function () { + function block ([name, data]) { + return xml` +
${name}
+
${data.current.title} ${data.current.URL} (${def(data, 'scroll.x', '?')}, ${def(data, 'scroll.y', '?')}) (${def(data, 'pages.length', '?')})
+ `; + } + liberator.echo( -
{ - template.map( - bookmarks, - function ([name, data]) { - return ` -
{name}
-
{data.current.title} {data.current.URL} ({def(data, 'scroll.x', '?')}, {def(data, 'scroll.y', '?')}) ({def(data, 'pages.length', '?')})
- `; - } - ) - }
+ xml`
${template.map(bookmarks, block)}
` ); }, { @@ -446,21 +443,21 @@ let INFO = xml` let name = args.literalArg; let data = bookmarks.get(name); if (data) { - liberator.echo(` + liberator.echo(xml`
Name
-
{name}
+
${name}
Start URL
-
{data.start.URL}
+
{data.start.URL}
Current Title
-
{data.current.Title}
+
${data.current.Title}
Current URL
-
{data.current.URL}
+
{data.current.URL}
Current Position
-
{def(data, 'scroll.x', '?')}, {def(data, 'scroll.y', '?')}
+
${def(data, 'scroll.x', '?')}, {def(data, 'scroll.y', '?')}
Pages
-
{ - template.map(data.pages, function (it) (
  • {it.URL}
  • )) +
    ${ + template.map(data.pages, function (it) (`
  • ${it.URL}
  • `)) }
    `); diff --git a/erection.js b/erection.js index 23dcd3e..b78182c 100644 --- a/erection.js +++ b/erection.js @@ -79,7 +79,7 @@ let INFO = xml` (function () { - const VERSION = INFO.@version[0]; + const VERSION = '1.1.1'; function erect (callback) { const VC = @@ -225,7 +225,7 @@ let INFO = xml` ['s[how]'], 'Show text and image', makeErectionCommand(function (e) { - liberator.echo(` + liberator.echo(xml`

    {e.text}

    diff --git a/google-tasks.js b/google-tasks.js index a724043..7da89a4 100644 --- a/google-tasks.js +++ b/google-tasks.js @@ -43,17 +43,17 @@ function setup() { access_token = getAccessToken(); let url = rest_uri + '/users/@me/lists?oauth_token=' + access_token; let lists = JSON.parse(httpGet(url).responseText).items; - let tbody = ``; + let tbody = xml``; for (let i=0; i{tasks[i2].title}` : `☐{tasks[i2].title}`; - tbody += {lists[i].title}{taskTitle}; + let taskTitle = (tasks[i2].status == 'completed') ? xml`☑${tasks[i2].title}` : `☐${tasks[i2].title}`; + tbody += xml`${lists[i].title}${taskTitle}`; } } - liberator.echo(`{tbody}
    `); + liberator.echo(xml`{tbody}
    `); }, { subCommands: [ diff --git a/migemized_find.js b/migemized_find.js index 2f27b85..22a738e 100644 --- a/migemized_find.js +++ b/migemized_find.js @@ -255,7 +255,7 @@ let INFO = xml` } let colorsCompltions = [ - [name, {'\u25a0 ' + value}] + [name, xml`${'\u25a0 ' + value}`] for each ([name, value] in Iterator(colors)) ]; diff --git a/mpd-currentsong.js b/mpd-currentsong.js index 829ff1e..f852b9a 100644 --- a/mpd-currentsong.js +++ b/mpd-currentsong.js @@ -44,7 +44,7 @@ let INFO = xml`

    @@ -58,7 +58,7 @@ let INFO = xml`

    diff --git a/readitlater.js b/readitlater.js index 53828b7..74f1453 100644 --- a/readitlater.js +++ b/readitlater.js @@ -412,18 +412,18 @@ let PLUGIN_INFO = xml` req.addEventListener("success",function(data){ let res = libly.$U.evalJson(data.responseText); - liberator.echo( + liberator.echo(xml` + -
    #ReadItLater Stats
    + -
    - since : {unixtimeToDate(res.user_since)}
    - list : {res.count_list}
    - unread : {res.count_unread}
    - read : {res.count_read}
    + ]]>` + + xml`
    #ReadItLater Stats
    ` + + xml`
    + since : ${unixtimeToDate(res.user_since)}
    + list : ${res.count_list}
    + unread : ${res.count_unread}
    + read : ${res.count_read}
    - ); + `); }); req.addEventListener("failure",function(data){ @@ -452,17 +452,17 @@ let PLUGIN_INFO = xml` ); req.addEventListener("success",function(data){ - liberator.echo( + liberator.echo(xml`
    - X-Limit-User-Limit : {data.transport.getResponseHeader("X-Limit-User-Limit")}
    - X-Limit-User-Remaining : {data.transport.getResponseHeader("X-Limit-User-Remaining")}
    - X-Limit-User-Reset : {data.transport.getResponseHeader("X-Limit-User-Reset")}
    - X-Limit-Key-Limit : {data.transport.getResponseHeader("X-Limit-Key-Limit")}
    - X-Limit-Key-Remaining : {data.transport.getResponseHeader("X-Limit-Key-Remaining")}
    - X-Limit-Key-Reset : {data.transport.getResponseHeader("X-Limit-Key-Reset")}
    + X-Limit-User-Limit : ${data.transport.getResponseHeader("X-Limit-User-Limit")}
    + X-Limit-User-Remaining : ${data.transport.getResponseHeader("X-Limit-User-Remaining")}
    + X-Limit-User-Reset : ${data.transport.getResponseHeader("X-Limit-User-Reset")}
    + X-Limit-Key-Limit : ${data.transport.getResponseHeader("X-Limit-Key-Limit")}
    + X-Limit-Key-Remaining : ${data.transport.getResponseHeader("X-Limit-Key-Remaining")}
    + X-Limit-Key-Reset : ${data.transport.getResponseHeader("X-Limit-Key-Reset")}
    - ); + `); }); req.addEventListener("failure",function(data){ diff --git a/statusbar_panel.js b/statusbar_panel.js index 156fd7f..fe2a52b 100644 --- a/statusbar_panel.js +++ b/statusbar_panel.js @@ -52,15 +52,14 @@ function getImages(panel) { } function makeIcon(panel) { - var icon = ; + var icon = xml``; var image = getImages(panel)[0]; if (image) { let style = window.getComputedStyle(image, null); let src = image.src || style.listStyleImage.replace(/^url\("(.+)"\)$/, '$1'); if (src != '') { - icon.@style = 'list-style-image: url("' + src + '");' + - '-moz-image-region: ' + style.MozImageRegion; + icon.setAttribute('style','list-style-image: url("' + src + '");' + '-moz-image-region: ' + style.MozImageRegion); } } return icon; @@ -140,7 +139,7 @@ commands.addUserCommand(['statusbarpanel'],'click statusbar panel', context.keys = { text: 'text', description: 'desc', icon: 'icon' }; context.compare = CompletionContext.Sort.unsorted; context.process = [function (item, text) { - return `{item.icon ? item.icon : ``}{text}` + return xml`{item.icon ? item.icon : ``}{text}` }]; var list = generateStatusbarpaneIDlList(arg); diff --git a/stella.js b/stella.js index 3df8b75..425b839 100644 --- a/stella.js +++ b/stella.js @@ -956,7 +956,7 @@ Thanks: [ 'tags', XMLList([ - [{v.textContent}] + xml`[${v.textContent}]` for ([, v] in Iterator(doc.querySelectorAll('#eow-tags > li > a'))) ].join('')) ], @@ -1112,7 +1112,7 @@ Thanks: [ 'tags', XMLList([ - [{v.textContent}] + xml`[${v.textContent}]` for ([, v] in Iterator(doc.querySelectorAll('#eow-tags > li > a'))) ].join('')) ], @@ -1339,12 +1339,12 @@ Thanks: get pageinfo () { let v = content.wrappedJSObject.Video; return [ - ['thumbnail', ], + ['thumbnail', xml``], ['comment', U.toXML(v.description)], [ 'tag', [ - [{t}] + xml`[${t}]` for each (t in Array.slice(v.tags)) ].join('') ] @@ -2054,7 +2054,7 @@ Thanks: function (verbose) (self.isValid && self.player.has('pageinfo', 'r') ? [ - [n,
    {modules.template.maybeXML(v)}
    ] + [n, xml`
    ${modules.template.maybeXML(v)}
    `] for each ([n, v] in self.player.pageinfo) ] : []) diff --git a/umihara.js b/umihara.js index 4875e82..075fa90 100644 --- a/umihara.js +++ b/umihara.js @@ -137,7 +137,7 @@ let PLUGIN_INFO = xml` ]; function echo (msg) { - liberator.echo(
    {msg}
    ); + liberator.echo(xml`
    ${msg}
    `); } function kawase (value, clipboard, from, to) { diff --git a/zip-de-download.js b/zip-de-download.js index 27aad76..a6d8a97 100644 --- a/zip-de-download.js +++ b/zip-de-download.js @@ -6,7 +6,7 @@ let INFO = xml` teramako MIT -

    +

    特定ページの画像とかのURLを取ってきて一気にZIPにしてダウンロードするお

    -- cgit v1.2.3