From 5d9188de47a1d627fc299176e91a68094a255d01 Mon Sep 17 00:00:00 2001
From: drry
Date: Tue, 9 Dec 2008 01:50:13 +0000
Subject: * 調べたところこのコンテキストでは「`--`」許容でありました。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@26161 d0d07461-0603-4401-acd4-de1884942a52
---
_libly.js | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
(limited to '_libly.js')
diff --git a/_libly.js b/_libly.js
index 8644a62..36b20d6 100644
--- a/_libly.js
+++ b/_libly.js
@@ -5,7 +5,7 @@ var PLUGIN_INFO =
vimperator plugins library?
適当なライブラリっぽいものたち。
suVene
- 0.1.2
+ 0.1.3
1.2
2.0pre
+ ]]>
;
//}}}
if (!liberator.plugins.libly) {
@@ -50,7 +50,7 @@ liberator.plugins.libly = {};
var lib = liberator.plugins.libly;
lib.$U = {//{{{
- getLogger: function(prefix) {
+ getLogger: function(prefix) {
return new function() {
this.log = function(msg, level) {
if (typeof msg == 'object') msg = util.objectToString(msg);
@@ -83,8 +83,7 @@ lib.$U = {//{{{
}
},
stripTags: function(str, tags) {
- var ignoreTags = [].concat(tags);
- ignoreTags = '(?:' + ignoreTags.join('|') + ')';
+ var ignoreTags = '(?:' + tags.join('|') + ')';
return str.replace(new RegExp('<' + ignoreTags + '(?:[ \\t\\n\\r][^>]*|/)?>([\\S\\s]*?)<\/' + ignoreTags + '[ \\t\\r\\n]*>', 'ig'), '');
},
eval: function(text) {
@@ -152,17 +151,16 @@ lib.$U = {//{{{
},
xmlSerialize: function(xml) {
try {
- return (new XMLSerializer()).serializeToString(xml)
- .replace(/<[^>]+>/g, function(all) all.toLowerCase())
- .replace(//g, ''); // actually
- //.replace(//g, ''); // strictly
+ return (new XMLSerializer()).serializeToString(xml)
+ .replace(//g, '')
+ .replace(/<[^>]+>/g, function(all) all.toLowerCase());
} catch (e) { return '' }
}
};
//}}}
lib.Request = function() {//{{{
- this.initialize.apply(this, arguments);
+ this.initialize.apply(this, arguments);
};
lib.Request.EVENTS = ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
lib.Request.requestCount = 0;
@@ -245,7 +243,7 @@ lib.Request.prototype = {
} catch (e) {
if (!this.fireEvent('onException', e, this.options.asynchronous)) throw e;
}
- }
+ }
},
setRequestHeaders: function() {
var headers = {
@@ -308,7 +306,7 @@ lib.Response.prototype = {
getHTMLDocument: function(xpath, xmlns, ignoreTags) {
if (!this.doc) {
this.htmlFragmentstr = this.responseText.replace(/^[\s\S]*?]*)?>|<\/html[ \t\r\n]*>[\S\s]*$/ig, '').replace(/[\r\n]+/g, ' ');
- var iTags = ['script'];
+ let iTags = ['script'];
if (ignoreTags) {
iTags.concat(ignoreTags.split(','));
}
--
cgit v1.2.3