From d26934599d3df506f21e1ead94483d4e351b703c Mon Sep 17 00:00:00 2001
From: anekos
Date: Sat, 6 Apr 2013 17:34:25 +0900
Subject:
ミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョミョ
---
pluginManager.js | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
(limited to 'pluginManager.js')
diff --git a/pluginManager.js b/pluginManager.js
index f191b9a..26442a3 100644
--- a/pluginManager.js
+++ b/pluginManager.js
@@ -1,4 +1,4 @@
-var PLUGIN_INFO =
+var PLUGIN_INFO = xml`
{NAME}
Manage Vimperator Plugins
@@ -99,7 +99,7 @@ detail:
- スタイルの追加(これはすべき?)
]]>
-;
+`;
liberator.plugins.pluginManager = (function(){
@@ -109,22 +109,22 @@ var tags = { // {{{
name: function(info) fromUTF8Octets(info.toString()),
author: function(info){
var name = fromUTF8Octets(info.toString());
- var xml = <>{name}>;
+ var xml = `{name}`;
if (info.@mail.toString() != '')
- xml += <> <'} highlight="URL">{info.@mail}>>;
+ xml += ` <'} highlight="URL">{info.@mail}>`;
if (info.@homepage.toString() != '')
- xml += <> ({makeLink(info.@homepage.toString())})>;
+ xml += ` ({makeLink(info.@homepage.toString())})`;
return xml;
},
description: function(info) makeLink(fromUTF8Octets(info.toString())),
license: function(info){
- var xml = <>{fromUTF8Octets(info.toString())}>;
+ var xml = `{fromUTF8Octets(info.toString())}`;
if (info.@document.toString() != '')
- xml += <> {makeLink(info.@document.toString())}>;
+ xml += ` {makeLink(info.@document.toString())}`;
return xml;
},
require: function(infos){
- let xml = <>>;
+ let xml = ``;
for (let i=0; i 0) {
let m = s.match(/(?:https?:\/\/|mailto:)\S+/);
if (m) {
- result += <>{s.slice(0, m.index)}{m[0]}>;
+ result += `{s.slice(0, m.index)}{m[0]}`;
s = s.slice(m.index + m[0].length);
} else {
- result += <>{s}>;
+ result += `{s}`;
break;
}
}
@@ -230,7 +230,7 @@ Plugin.prototype = { // {{{
initialize: function(path, context){
this.path = path;
this.name = context.NAME;
- this.info = context.PLUGIN_INFO || <>>;
+ this.info = context.PLUGIN_INFO || ``;
this.getItems();
},
getItems: function(){
@@ -386,7 +386,7 @@ var WikiParser = (function () {
return new arguments.callee(lines, result, indents);
this.lines = lines;
- this.result = result || <>>;
+ this.result = result || ``;
this.indents = indents || [];
}
State.prototype = {
@@ -439,7 +439,7 @@ var WikiParser = (function () {
Array.concat(ary);
function xmlJoin (xs, init) {
- let result = init || <>>;
+ let result = init || ``;
for (let i = 0, l = xs.length; i < l; i++)
result += xs[i];
return result;
@@ -470,13 +470,13 @@ var WikiParser = (function () {
// FIXME
function link (s) {
let m;
- let result = <>>;
+ let result = ``;
while (s && (m = s.match(/(?:https?:\/\/|mailto:)\S+/))) {
- result += <>{RegExp.leftContext || ''}{m[0]}>;
+ result += `{RegExp.leftContext || ''}{m[0]}`;
s = RegExp.rightContext;
}
if (s)
- result += <>{s}>;
+ result += `{s}`;
return result;
}
@@ -591,7 +591,7 @@ var WikiParser = (function () {
if (m) {
let h = m[2];
let next = C.many(self.wikiLine)(st.next.indent(m[1]));
- return next.indentBack().set(xmlJoin([<>{h}
>].concat(next.result))).wrap('li');
+ return next.indentBack().set(xmlJoin([`{h}
`].concat(next.result))).wrap('li');
}
return Error(c, st);
};
@@ -606,7 +606,7 @@ var WikiParser = (function () {
emptyLine: function emptyLine (st) {
if (/^\s*$/.test(st.head)) {
- return st.next.set(<>>);
+ return st.next.set(``);
}
return Error('spaces', st);
},
@@ -614,7 +614,7 @@ var WikiParser = (function () {
// St -> St XML
plain: function plain (st) {
let text = st.head;
- return st.next.set(<>{stripAndLink(text)}
>);
+ return st.next.set(`{stripAndLink(text)}
`);
},
// St -> St XML
@@ -750,7 +750,7 @@ HTMLStack.prototype = { // {{{
}
var buf = this.last[this.last.length()-1];
if (buf.nodeKind() == 'text'){
- this.last[this.last.length()-1] += this.isInline(xml) ? <>
{xml}> : xml;
+ this.last[this.last.length()-1] += this.isInline(xml) ? `
{xml}` : xml;
} else if (this.isInline(xml)){
this.stack[this.length-1] += xml;
} else if (buf.localName() == xml.localName()){
@@ -783,7 +783,7 @@ HTMLStack.prototype = { // {{{
if (tmp[tmp.length()-1].nodeKind() == 'element'){
buf[buf.length()-1].* += xml;
} else {
- buf[buf.length()-1].* += <>
{xml}>;
+ buf[buf.length()-1].* += `
{xml}`;
}
} else {
this.last[this.last.length()-1].* += xml;
@@ -965,14 +965,14 @@ var public = {
return plugins.filter(function(plugin) names.indexOf(plugin.name) >= 0);
},
checkVersion: function(names){
- let xml = <>>;
+ let xml = ``;
this.getPlugins(names).forEach(function(plugin){
xml += plugin.checkVersion();
});
return xml;
},
update: function(names){
- let xml = <>>;
+ let xml = ``;
this.getPlugins(names).forEach(function(plugin){
xml += plugin.updatePlugin();
});
@@ -986,7 +986,7 @@ var public = {
return;
},
list: function(names, verbose){
- let xml = <>>
+ let xml = ``
this.getPlugins(names).forEach(function(plugin){
xml += plugin.itemFormatter(verbose);
});
--
cgit v1.2.3