<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel rdf:about="https://let.hatelabo.jp/efcl/rss">
    <link>https://let.hatelabo.jp/efcl/rss</link>
    <description></description>
    <title>Bookmarklets from efcl</title>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/hJmdgKOVlstQ"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/hJmfwszo56oZ"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/hLHW18zF6YJL"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/hJmehf2N-chp"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/hJmcsZW30sIr"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/hLHU6Y_ukpEa"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/hJmc29LE3adA"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/hLHUsZmX97sE"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/hJmczrGWsuU1"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/hLHUmvf-ptcz"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/hLHUhZfOl5Yp"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/gYC-x83qke2wPA"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/gYC-y4PNrvP6fw"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/gYC-x4CIkuLFfg"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/gYC-xr6s3OyWQA"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/gYC-xrPDn42-Xw"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/gYC-xKaK34KfVQ"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/gYC-y8K-v7_MQA"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/gYC-y6v3n8e6WQ"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/efcl/let/gYC-ytOqgIvJHg"/>
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/hJmdgKOVlstQ">
    <link>https://let.hatelabo.jp/efcl/let/hJmdgKOVlstQ</link>
    <dc:date>2015-09-23T06:30:46Z</dc:date>
    <description>Open JSer.info Pull Request Form</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] JSer.info Contributing</title>
    <content:encoded>&lt;a href="javascript:%28function%28%29%7Bvar%20siteURL%3Dwindow.location.href%2CsiteTitle%3Ddocument.title%3Fdocument.title%3Awindow.top.document.title%3Bvar%20JSER_FORM%3D%22http%3A%2F%2Fjser.info%2Fcontributing%2F%22%3Bwindow.open%28JSER_FORM%2B%22%3Ftitle%3D%22%2BencodeURIComponent%28siteTitle%29%2B%22%26url%3D%22%2BencodeURIComponent%28siteURL%29%29%7D%29%28%29%3B"&gt;JSer.info Contributing&lt;/a&gt;&lt;pre&gt;/*
 * @title JSer.info Contributing
 * @description Open JSer.info Pull Request Form
 * @include https?://*
 * @license MIT License
 * @javascript_url 
 */
(function () {
    var siteURL = window.location.href,
        siteTitle = (document.title) ? document.title : window.top.document.title;
    var JSER_FORM = &amp;quot;http://jser.info/contributing/&amp;quot;;
    window.open(JSER_FORM + &amp;quot;?title=&amp;quot; + encodeURIComponent(siteTitle) + &amp;quot;&amp;amp;url=&amp;quot; + encodeURIComponent(siteURL));
})();&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/hJmfwszo56oZ">
    <link>https://let.hatelabo.jp/efcl/let/hJmfwszo56oZ</link>
    <dc:date>2015-06-21T06:27:42Z</dc:date>
    <description>my bookmarklet</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] leanpub outline</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FhJmfwszo56oZ.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;leanpub outline&lt;/a&gt;&lt;pre&gt;/*
 * @title leanpub outline
 * @description my bookmarklet
 * @include https://leanpub.com/*/read*
 * @license MIT License
 * @require 
 */


var headers = document.querySelectorAll(&amp;quot;h1[id], h2[id], h3[id], h4[id], h5[id]&amp;quot;);
Array.from(headers).forEach(function(header){
    var headerID = header.getAttribute(&amp;quot;id&amp;quot;);
    if(!headerID){ return; }
    var linkName = document.createElement(&amp;quot;a&amp;quot;);
    linkName.href = &amp;quot;#&amp;quot; + headerID;
    wrap(header, linkName);
 });
function wrap(el, wrapper) {
	    el.parentNode.insertBefore(wrapper, el);
	    wrapper.appendChild(el);
	}&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/hLHW18zF6YJL">
    <link>https://let.hatelabo.jp/efcl/let/hLHW18zF6YJL</link>
    <dc:date>2015-01-06T01:12:46Z</dc:date>
    <description>600文字/分の計算</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] このQiitaはn分で読めます。</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FhLHW18zF6YJL.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;このQiitaはn分で読めます。&lt;/a&gt;&lt;pre&gt;/*
 * @title このQiitaはn分で読めます。
 * @description 600文字/分の計算
 * @include http://qiita.com/*
 * @license MIT License
 * @require 
 */

var bodyContent = document.querySelector('[itemProp=&amp;quot;articleBody&amp;quot;]').textContent.replace(/\s+/g, &amp;quot;&amp;quot;);
var bodyLength = bodyContent.length;
var canReadPerMinute = 600;
var minutes = Math.round(bodyLength / canReadPerMinute);
var p = document.createElement(&amp;quot;p&amp;quot;);
var result = &amp;quot;この記事は&amp;quot;+minutes+&amp;quot;分で読めます&amp;quot;;
p.appendChild(document.createTextNode(result));
var ins = document.querySelector(&amp;quot;.itemsShowHeaderTitle_title&amp;quot;);
ins.parentNode.appendChild(p);
alert(result);&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/hJmehf2N-chp">
    <link>https://let.hatelabo.jp/efcl/let/hJmehf2N-chp</link>
    <dc:date>2014-09-01T06:21:31Z</dc:date>
    <description>where-page-in-slide</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] where-page-in-slide</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FhJmehf2N-chp.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;where-page-in-slide&lt;/a&gt;&lt;pre&gt;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==&amp;quot;function&amp;quot;&amp;amp;&amp;amp;require;if(!u&amp;amp;&amp;amp;a)return a(o,!0);if(i)return i(o,!0);var f=new Error(&amp;quot;Cannot find module '&amp;quot;+o+&amp;quot;'&amp;quot;);throw f.code=&amp;quot;MODULE_NOT_FOUND&amp;quot;,f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==&amp;quot;function&amp;quot;&amp;amp;&amp;amp;require;for(var o=0;o&amp;lt;r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*
 * @title where-page-in-slide
 * @description where-page-in-slide
 * @include http://*
 * @license MIT License
 *
 * Source : https://github.com/azu/where-page-in-slide
 */


&amp;quot;use strict&amp;quot;;
switch (location.host) {
    case &amp;quot;speakerdeck.com&amp;quot;:
        require(&amp;quot;./lib/speakerdeck&amp;quot;)();
        break;
    case &amp;quot;www.slideshare.net&amp;quot;:
        require(&amp;quot;./lib/slideshare&amp;quot;)();
        break;
}
},{&amp;quot;./lib/slideshare&amp;quot;:2,&amp;quot;./lib/speakerdeck&amp;quot;:3}],2:[function(require,module,exports){
(function (__filename){
&amp;quot;use strict&amp;quot;;
var assert = require(&amp;quot;assert&amp;quot;);
module.exports = function slideshare() {
    var slideNo = window.$.slideshareEventManager.controller.currentPosition;
    assert(slideNo &amp;gt;= 0);
    // http://d.hatena.ne.jp/kitokitoki/20130722/p2
    var newURL = location.protocol + &amp;quot;//&amp;quot; + location.host + location.pathname + &amp;quot;/&amp;quot; + slideNo;
    history.pushState(__filename, &amp;quot;&amp;quot;, newURL);
};
}).call(this,&amp;quot;/lib/slideshare.js&amp;quot;)
},{&amp;quot;assert&amp;quot;:4}],3:[function(require,module,exports){
(function (__filename){
&amp;quot;use strict&amp;quot;;
var assert = require(&amp;quot;assert&amp;quot;);
module.exports = function speackerdeck() {
    var iframeDoc = document.querySelector(&amp;quot;.speakerdeck-iframe&amp;quot;).contentDocument;
    assert(iframeDoc != null);
    var slideSpan = iframeDoc.getElementsByClassName(&amp;quot;current_slide&amp;quot;)[0];
    var slideNo = slideSpan.textContent;
    assert(slideNo &amp;gt;= 0);
    // http://d.hatena.ne.jp/kitokitoki/20130722/p2
    var newURL = location.protocol + &amp;quot;//&amp;quot; + location.host + location.pathname + &amp;quot;?slide=&amp;quot; + slideNo;
    history.pushState(__filename, &amp;quot;&amp;quot;, newURL);
};
}).call(this,&amp;quot;/lib/speakerdeck.js&amp;quot;)
},{&amp;quot;assert&amp;quot;:4}],4:[function(require,module,exports){
// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
//
// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
//
// Originally from narwhal.js (http://narwhaljs.org)
// Copyright (c) 2009 Thomas Robinson &amp;lt;280north.com&amp;gt;
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the 'Software'), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

// when used in node, this will actually load the util module we depend on
// versus loading the builtin util module as happens otherwise
// this is a bug in node module loading as far as I am concerned
var util = require('util/');

var pSlice = Array.prototype.slice;
var hasOwn = Object.prototype.hasOwnProperty;

// 1. The assert module provides functions that throw
// AssertionError's when particular conditions are not met. The
// assert module must conform to the following interface.

var assert = module.exports = ok;

// 2. The AssertionError is defined in assert.
// new assert.AssertionError({ message: message,
//                             actual: actual,
//                             expected: expected })

assert.AssertionError = function AssertionError(options) {
  this.name = 'AssertionError';
  this.actual = options.actual;
  this.expected = options.expected;
  this.operator = options.operator;
  if (options.message) {
    this.message = options.message;
    this.generatedMessage = false;
  } else {
    this.message = getMessage(this);
    this.generatedMessage = true;
  }
  var stackStartFunction = options.stackStartFunction || fail;

  if (Error.captureStackTrace) {
    Error.captureStackTrace(this, stackStartFunction);
  }
  else {
    // non v8 browsers so we can have a stacktrace
    var err = new Error();
    if (err.stack) {
      var out = err.stack;

      // try to strip useless frames
      var fn_name = stackStartFunction.name;
      var idx = out.indexOf('\n' + fn_name);
      if (idx &amp;gt;= 0) {
        // once we have located the function frame
        // we need to strip out everything before it (and its line)
        var next_line = out.indexOf('\n', idx + 1);
        out = out.substring(next_line + 1);
      }

      this.stack = out;
    }
  }
};

// assert.AssertionError instanceof Error
util.inherits(assert.AssertionError, Error);

function replacer(key, value) {
  if (util.isUndefined(value)) {
    return '' + value;
  }
  if (util.isNumber(value) &amp;amp;&amp;amp; (isNaN(value) || !isFinite(value))) {
    return value.toString();
  }
  if (util.isFunction(value) || util.isRegExp(value)) {
    return value.toString();
  }
  return value;
}

function truncate(s, n) {
  if (util.isString(s)) {
    return s.length &amp;lt; n ? s : s.slice(0, n);
  } else {
    return s;
  }
}

function getMessage(self) {
  return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' +
         self.operator + ' ' +
         truncate(JSON.stringify(self.expected, replacer), 128);
}

// At present only the three keys mentioned above are used and
// understood by the spec. Implementations or sub modules can pass
// other keys to the AssertionError's constructor - they will be
// ignored.

// 3. All of the following functions must throw an AssertionError
// when a corresponding condition is not met, with a message that
// may be undefined if not provided.  All assertion methods provide
// both the actual and expected values to the assertion error for
// display purposes.

function fail(actual, expected, message, operator, stackStartFunction) {
  throw new assert.AssertionError({
    message: message,
    actual: actual,
    expected: expected,
    operator: operator,
    stackStartFunction: stackStartFunction
  });
}

// EXTENSION! allows for well behaved errors defined elsewhere.
assert.fail = fail;

// 4. Pure assertion tests whether a value is truthy, as determined
// by !!guard.
// assert.ok(guard, message_opt);
// This statement is equivalent to assert.equal(true, !!guard,
// message_opt);. To test strictly for the value true, use
// assert.strictEqual(true, guard, message_opt);.

function ok(value, message) {
  if (!value) fail(value, true, message, '==', assert.ok);
}
assert.ok = ok;

// 5. The equality assertion tests shallow, coercive equality with
// ==.
// assert.equal(actual, expected, message_opt);

assert.equal = function equal(actual, expected, message) {
  if (actual != expected) fail(actual, expected, message, '==', assert.equal);
};

// 6. The non-equality assertion tests for whether two objects are not equal
// with != assert.notEqual(actual, expected, message_opt);

assert.notEqual = function notEqual(actual, expected, message) {
  if (actual == expected) {
    fail(actual, expected, message, '!=', assert.notEqual);
  }
};

// 7. The equivalence assertion tests a deep equality relation.
// assert.deepEqual(actual, expected, message_opt);

assert.deepEqual = function deepEqual(actual, expected, message) {
  if (!_deepEqual(actual, expected)) {
    fail(actual, expected, message, 'deepEqual', assert.deepEqual);
  }
};

function _deepEqual(actual, expected) {
  // 7.1. All identical values are equivalent, as determined by ===.
  if (actual === expected) {
    return true;

  } else if (util.isBuffer(actual) &amp;amp;&amp;amp; util.isBuffer(expected)) {
    if (actual.length != expected.length) return false;

    for (var i = 0; i &amp;lt; actual.length; i++) {
      if (actual[i] !== expected[i]) return false;
    }

    return true;

  // 7.2. If the expected value is a Date object, the actual value is
  // equivalent if it is also a Date object that refers to the same time.
  } else if (util.isDate(actual) &amp;amp;&amp;amp; util.isDate(expected)) {
    return actual.getTime() === expected.getTime();

  // 7.3 If the expected value is a RegExp object, the actual value is
  // equivalent if it is also a RegExp object with the same source and
  // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
  } else if (util.isRegExp(actual) &amp;amp;&amp;amp; util.isRegExp(expected)) {
    return actual.source === expected.source &amp;amp;&amp;amp;
           actual.global === expected.global &amp;amp;&amp;amp;
           actual.multiline === expected.multiline &amp;amp;&amp;amp;
           actual.lastIndex === expected.lastIndex &amp;amp;&amp;amp;
           actual.ignoreCase === expected.ignoreCase;

  // 7.4. Other pairs that do not both pass typeof value == 'object',
  // equivalence is determined by ==.
  } else if (!util.isObject(actual) &amp;amp;&amp;amp; !util.isObject(expected)) {
    return actual == expected;

  // 7.5 For all other Object pairs, including Array objects, equivalence is
  // determined by having the same number of owned properties (as verified
  // with Object.prototype.hasOwnProperty.call), the same set of keys
  // (although not necessarily the same order), equivalent values for every
  // corresponding key, and an identical 'prototype' property. Note: this
  // accounts for both named and indexed properties on Arrays.
  } else {
    return objEquiv(actual, expected);
  }
}

function isArguments(object) {
  return Object.prototype.toString.call(object) == '[object Arguments]';
}

function objEquiv(a, b) {
  if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b))
    return false;
  // an identical 'prototype' property.
  if (a.prototype !== b.prototype) return false;
  //~~~I've managed to break Object.keys through screwy arguments passing.
  //   Converting to array solves the problem.
  if (isArguments(a)) {
    if (!isArguments(b)) {
      return false;
    }
    a = pSlice.call(a);
    b = pSlice.call(b);
    return _deepEqual(a, b);
  }
  try {
    var ka = objectKeys(a),
        kb = objectKeys(b),
        key, i;
  } catch (e) {//happens when one is a string literal and the other isn't
    return false;
  }
  // having the same number of owned properties (keys incorporates
  // hasOwnProperty)
  if (ka.length != kb.length)
    return false;
  //the same set of keys (although not necessarily the same order),
  ka.sort();
  kb.sort();
  //~~~cheap key test
  for (i = ka.length - 1; i &amp;gt;= 0; i--) {
    if (ka[i] != kb[i])
      return false;
  }
  //equivalent values for every corresponding key, and
  //~~~possibly expensive deep test
  for (i = ka.length - 1; i &amp;gt;= 0; i--) {
    key = ka[i];
    if (!_deepEqual(a[key], b[key])) return false;
  }
  return true;
}

// 8. The non-equivalence assertion tests for any deep inequality.
// assert.notDeepEqual(actual, expected, message_opt);

assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
  if (_deepEqual(actual, expected)) {
    fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
  }
};

// 9. The strict equality assertion tests strict equality, as determined by ===.
// assert.strictEqual(actual, expected, message_opt);

assert.strictEqual = function strictEqual(actual, expected, message) {
  if (actual !== expected) {
    fail(actual, expected, message, '===', assert.strictEqual);
  }
};

// 10. The strict non-equality assertion tests for strict inequality, as
// determined by !==.  assert.notStrictEqual(actual, expected, message_opt);

assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
  if (actual === expected) {
    fail(actual, expected, message, '!==', assert.notStrictEqual);
  }
};

function expectedException(actual, expected) {
  if (!actual || !expected) {
    return false;
  }

  if (Object.prototype.toString.call(expected) == '[object RegExp]') {
    return expected.test(actual);
  } else if (actual instanceof expected) {
    return true;
  } else if (expected.call({}, actual) === true) {
    return true;
  }

  return false;
}

function _throws(shouldThrow, block, expected, message) {
  var actual;

  if (util.isString(expected)) {
    message = expected;
    expected = null;
  }

  try {
    block();
  } catch (e) {
    actual = e;
  }

  message = (expected &amp;amp;&amp;amp; expected.name ? ' (' + expected.name + ').' : '.') +
            (message ? ' ' + message : '.');

  if (shouldThrow &amp;amp;&amp;amp; !actual) {
    fail(actual, expected, 'Missing expected exception' + message);
  }

  if (!shouldThrow &amp;amp;&amp;amp; expectedException(actual, expected)) {
    fail(actual, expected, 'Got unwanted exception' + message);
  }

  if ((shouldThrow &amp;amp;&amp;amp; actual &amp;amp;&amp;amp; expected &amp;amp;&amp;amp;
      !expectedException(actual, expected)) || (!shouldThrow &amp;amp;&amp;amp; actual)) {
    throw actual;
  }
}

// 11. Expected to throw an error:
// assert.throws(block, Error_opt, message_opt);

assert.throws = function(block, /*optional*/error, /*optional*/message) {
  _throws.apply(this, [true].concat(pSlice.call(arguments)));
};

// EXTENSION! This is annoying to write outside this module.
assert.doesNotThrow = function(block, /*optional*/message) {
  _throws.apply(this, [false].concat(pSlice.call(arguments)));
};

assert.ifError = function(err) { if (err) {throw err;}};

var objectKeys = Object.keys || function (obj) {
  var keys = [];
  for (var key in obj) {
    if (hasOwn.call(obj, key)) keys.push(key);
  }
  return keys;
};

},{&amp;quot;util/&amp;quot;:8}],5:[function(require,module,exports){
if (typeof Object.create === 'function') {
  // implementation from standard node.js 'util' module
  module.exports = function inherits(ctor, superCtor) {
    ctor.super_ = superCtor
    ctor.prototype = Object.create(superCtor.prototype, {
      constructor: {
        value: ctor,
        enumerable: false,
        writable: true,
        configurable: true
      }
    });
  };
} else {
  // old school shim for old browsers
  module.exports = function inherits(ctor, superCtor) {
    ctor.super_ = superCtor
    var TempCtor = function () {}
    TempCtor.prototype = superCtor.prototype
    ctor.prototype = new TempCtor()
    ctor.prototype.constructor = ctor
  }
}

},{}],6:[function(require,module,exports){
// shim for using process in browser

var process = module.exports = {};

process.nextTick = (function () {
    var canSetImmediate = typeof window !== 'undefined'
    &amp;amp;&amp;amp; window.setImmediate;
    var canPost = typeof window !== 'undefined'
    &amp;amp;&amp;amp; window.postMessage &amp;amp;&amp;amp; window.addEventListener
    ;

    if (canSetImmediate) {
        return function (f) { return window.setImmediate(f) };
    }

    if (canPost) {
        var queue = [];
        window.addEventListener('message', function (ev) {
            var source = ev.source;
            if ((source === window || source === null) &amp;amp;&amp;amp; ev.data === 'process-tick') {
                ev.stopPropagation();
                if (queue.length &amp;gt; 0) {
                    var fn = queue.shift();
                    fn();
                }
            }
        }, true);

        return function nextTick(fn) {
            queue.push(fn);
            window.postMessage('process-tick', '*');
        };
    }

    return function nextTick(fn) {
        setTimeout(fn, 0);
    };
})();

process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];

function noop() {}

process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;

process.binding = function (name) {
    throw new Error('process.binding is not supported');
}

// TODO(shtylman)
process.cwd = function () { return '/' };
process.chdir = function (dir) {
    throw new Error('process.chdir is not supported');
};

},{}],7:[function(require,module,exports){
module.exports = function isBuffer(arg) {
  return arg &amp;amp;&amp;amp; typeof arg === 'object'
    &amp;amp;&amp;amp; typeof arg.copy === 'function'
    &amp;amp;&amp;amp; typeof arg.fill === 'function'
    &amp;amp;&amp;amp; typeof arg.readUInt8 === 'function';
}
},{}],8:[function(require,module,exports){
(function (process,global){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// &amp;quot;Software&amp;quot;), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED &amp;quot;AS IS&amp;quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var formatRegExp = /%[sdj%]/g;
exports.format = function(f) {
  if (!isString(f)) {
    var objects = [];
    for (var i = 0; i &amp;lt; arguments.length; i++) {
      objects.push(inspect(arguments[i]));
    }
    return objects.join(' ');
  }

  var i = 1;
  var args = arguments;
  var len = args.length;
  var str = String(f).replace(formatRegExp, function(x) {
    if (x === '%%') return '%';
    if (i &amp;gt;= len) return x;
    switch (x) {
      case '%s': return String(args[i++]);
      case '%d': return Number(args[i++]);
      case '%j':
        try {
          return JSON.stringify(args[i++]);
        } catch (_) {
          return '[Circular]';
        }
      default:
        return x;
    }
  });
  for (var x = args[i]; i &amp;lt; len; x = args[++i]) {
    if (isNull(x) || !isObject(x)) {
      str += ' ' + x;
    } else {
      str += ' ' + inspect(x);
    }
  }
  return str;
};


// Mark that a method should not be used.
// Returns a modified function which warns once by default.
// If --no-deprecation is set, then it is a no-op.
exports.deprecate = function(fn, msg) {
  // Allow for deprecating things in the process of starting up.
  if (isUndefined(global.process)) {
    return function() {
      return exports.deprecate(fn, msg).apply(this, arguments);
    };
  }

  if (process.noDeprecation === true) {
    return fn;
  }

  var warned = false;
  function deprecated() {
    if (!warned) {
      if (process.throwDeprecation) {
        throw new Error(msg);
      } else if (process.traceDeprecation) {
        console.trace(msg);
      } else {
        console.error(msg);
      }
      warned = true;
    }
    return fn.apply(this, arguments);
  }

  return deprecated;
};


var debugs = {};
var debugEnviron;
exports.debuglog = function(set) {
  if (isUndefined(debugEnviron))
    debugEnviron = process.env.NODE_DEBUG || '';
  set = set.toUpperCase();
  if (!debugs[set]) {
    if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
      var pid = process.pid;
      debugs[set] = function() {
        var msg = exports.format.apply(exports, arguments);
        console.error('%s %d: %s', set, pid, msg);
      };
    } else {
      debugs[set] = function() {};
    }
  }
  return debugs[set];
};


/**
 * Echos the value of a value. Trys to print the value out
 * in the best way possible given the different types.
 *
 * @param {Object} obj The object to print out.
 * @param {Object} opts Optional options object that alters the output.
 */
/* legacy: obj, showHidden, depth, colors*/
function inspect(obj, opts) {
  // default options
  var ctx = {
    seen: [],
    stylize: stylizeNoColor
  };
  // legacy...
  if (arguments.length &amp;gt;= 3) ctx.depth = arguments[2];
  if (arguments.length &amp;gt;= 4) ctx.colors = arguments[3];
  if (isBoolean(opts)) {
    // legacy...
    ctx.showHidden = opts;
  } else if (opts) {
    // got an &amp;quot;options&amp;quot; object
    exports._extend(ctx, opts);
  }
  // set default options
  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
  if (isUndefined(ctx.depth)) ctx.depth = 2;
  if (isUndefined(ctx.colors)) ctx.colors = false;
  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
  if (ctx.colors) ctx.stylize = stylizeWithColor;
  return formatValue(ctx, obj, ctx.depth);
}
exports.inspect = inspect;


// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
inspect.colors = {
  'bold' : [1, 22],
  'italic' : [3, 23],
  'underline' : [4, 24],
  'inverse' : [7, 27],
  'white' : [37, 39],
  'grey' : [90, 39],
  'black' : [30, 39],
  'blue' : [34, 39],
  'cyan' : [36, 39],
  'green' : [32, 39],
  'magenta' : [35, 39],
  'red' : [31, 39],
  'yellow' : [33, 39]
};

// Don't use 'blue' not visible on cmd.exe
inspect.styles = {
  'special': 'cyan',
  'number': 'yellow',
  'boolean': 'yellow',
  'undefined': 'grey',
  'null': 'bold',
  'string': 'green',
  'date': 'magenta',
  // &amp;quot;name&amp;quot;: intentionally not styling
  'regexp': 'red'
};


function stylizeWithColor(str, styleType) {
  var style = inspect.styles[styleType];

  if (style) {
    return '\u001b[' + inspect.colors[style][0] + 'm' + str +
           '\u001b[' + inspect.colors[style][1] + 'm';
  } else {
    return str;
  }
}


function stylizeNoColor(str, styleType) {
  return str;
}


function arrayToHash(array) {
  var hash = {};

  array.forEach(function(val, idx) {
    hash[val] = true;
  });

  return hash;
}


function formatValue(ctx, value, recurseTimes) {
  // Provide a hook for user-specified inspect functions.
  // Check that value is an object with an inspect function on it
  if (ctx.customInspect &amp;amp;&amp;amp;
      value &amp;amp;&amp;amp;
      isFunction(value.inspect) &amp;amp;&amp;amp;
      // Filter out the util module, it's inspect function is special
      value.inspect !== exports.inspect &amp;amp;&amp;amp;
      // Also filter out any prototype objects using the circular check.
      !(value.constructor &amp;amp;&amp;amp; value.constructor.prototype === value)) {
    var ret = value.inspect(recurseTimes, ctx);
    if (!isString(ret)) {
      ret = formatValue(ctx, ret, recurseTimes);
    }
    return ret;
  }

  // Primitive types cannot have properties
  var primitive = formatPrimitive(ctx, value);
  if (primitive) {
    return primitive;
  }

  // Look up the keys of the object.
  var keys = Object.keys(value);
  var visibleKeys = arrayToHash(keys);

  if (ctx.showHidden) {
    keys = Object.getOwnPropertyNames(value);
  }

  // IE doesn't make error fields non-enumerable
  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
  if (isError(value)
      &amp;amp;&amp;amp; (keys.indexOf('message') &amp;gt;= 0 || keys.indexOf('description') &amp;gt;= 0)) {
    return formatError(value);
  }

  // Some type of object without properties can be shortcutted.
  if (keys.length === 0) {
    if (isFunction(value)) {
      var name = value.name ? ': ' + value.name : '';
      return ctx.stylize('[Function' + name + ']', 'special');
    }
    if (isRegExp(value)) {
      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
    }
    if (isDate(value)) {
      return ctx.stylize(Date.prototype.toString.call(value), 'date');
    }
    if (isError(value)) {
      return formatError(value);
    }
  }

  var base = '', array = false, braces = ['{', '}'];

  // Make Array say that they are Array
  if (isArray(value)) {
    array = true;
    braces = ['[', ']'];
  }

  // Make functions say that they are functions
  if (isFunction(value)) {
    var n = value.name ? ': ' + value.name : '';
    base = ' [Function' + n + ']';
  }

  // Make RegExps say that they are RegExps
  if (isRegExp(value)) {
    base = ' ' + RegExp.prototype.toString.call(value);
  }

  // Make dates with properties first say the date
  if (isDate(value)) {
    base = ' ' + Date.prototype.toUTCString.call(value);
  }

  // Make error with message first say the error
  if (isError(value)) {
    base = ' ' + formatError(value);
  }

  if (keys.length === 0 &amp;amp;&amp;amp; (!array || value.length == 0)) {
    return braces[0] + base + braces[1];
  }

  if (recurseTimes &amp;lt; 0) {
    if (isRegExp(value)) {
      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
    } else {
      return ctx.stylize('[Object]', 'special');
    }
  }

  ctx.seen.push(value);

  var output;
  if (array) {
    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
  } else {
    output = keys.map(function(key) {
      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
    });
  }

  ctx.seen.pop();

  return reduceToSingleString(output, base, braces);
}


function formatPrimitive(ctx, value) {
  if (isUndefined(value))
    return ctx.stylize('undefined', 'undefined');
  if (isString(value)) {
    var simple = '\'' + JSON.stringify(value).replace(/^&amp;quot;|&amp;quot;$/g, '')
                                             .replace(/'/g, &amp;quot;\\'&amp;quot;)
                                             .replace(/\\&amp;quot;/g, '&amp;quot;') + '\'';
    return ctx.stylize(simple, 'string');
  }
  if (isNumber(value))
    return ctx.stylize('' + value, 'number');
  if (isBoolean(value))
    return ctx.stylize('' + value, 'boolean');
  // For some reason typeof null is &amp;quot;object&amp;quot;, so special case here.
  if (isNull(value))
    return ctx.stylize('null', 'null');
}


function formatError(value) {
  return '[' + Error.prototype.toString.call(value) + ']';
}


function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
  var output = [];
  for (var i = 0, l = value.length; i &amp;lt; l; ++i) {
    if (hasOwnProperty(value, String(i))) {
      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
          String(i), true));
    } else {
      output.push('');
    }
  }
  keys.forEach(function(key) {
    if (!key.match(/^\d+$/)) {
      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
          key, true));
    }
  });
  return output;
}


function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
  var name, str, desc;
  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
  if (desc.get) {
    if (desc.set) {
      str = ctx.stylize('[Getter/Setter]', 'special');
    } else {
      str = ctx.stylize('[Getter]', 'special');
    }
  } else {
    if (desc.set) {
      str = ctx.stylize('[Setter]', 'special');
    }
  }
  if (!hasOwnProperty(visibleKeys, key)) {
    name = '[' + key + ']';
  }
  if (!str) {
    if (ctx.seen.indexOf(desc.value) &amp;lt; 0) {
      if (isNull(recurseTimes)) {
        str = formatValue(ctx, desc.value, null);
      } else {
        str = formatValue(ctx, desc.value, recurseTimes - 1);
      }
      if (str.indexOf('\n') &amp;gt; -1) {
        if (array) {
          str = str.split('\n').map(function(line) {
            return '  ' + line;
          }).join('\n').substr(2);
        } else {
          str = '\n' + str.split('\n').map(function(line) {
            return '   ' + line;
          }).join('\n');
        }
      }
    } else {
      str = ctx.stylize('[Circular]', 'special');
    }
  }
  if (isUndefined(name)) {
    if (array &amp;amp;&amp;amp; key.match(/^\d+$/)) {
      return str;
    }
    name = JSON.stringify('' + key);
    if (name.match(/^&amp;quot;([a-zA-Z_][a-zA-Z_0-9]*)&amp;quot;$/)) {
      name = name.substr(1, name.length - 2);
      name = ctx.stylize(name, 'name');
    } else {
      name = name.replace(/'/g, &amp;quot;\\'&amp;quot;)
                 .replace(/\\&amp;quot;/g, '&amp;quot;')
                 .replace(/(^&amp;quot;|&amp;quot;$)/g, &amp;quot;'&amp;quot;);
      name = ctx.stylize(name, 'string');
    }
  }

  return name + ': ' + str;
}


function reduceToSingleString(output, base, braces) {
  var numLinesEst = 0;
  var length = output.reduce(function(prev, cur) {
    numLinesEst++;
    if (cur.indexOf('\n') &amp;gt;= 0) numLinesEst++;
    return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
  }, 0);

  if (length &amp;gt; 60) {
    return braces[0] +
           (base === '' ? '' : base + '\n ') +
           ' ' +
           output.join(',\n  ') +
           ' ' +
           braces[1];
  }

  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
}


// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray(ar) {
  return Array.isArray(ar);
}
exports.isArray = isArray;

function isBoolean(arg) {
  return typeof arg === 'boolean';
}
exports.isBoolean = isBoolean;

function isNull(arg) {
  return arg === null;
}
exports.isNull = isNull;

function isNullOrUndefined(arg) {
  return arg == null;
}
exports.isNullOrUndefined = isNullOrUndefined;

function isNumber(arg) {
  return typeof arg === 'number';
}
exports.isNumber = isNumber;

function isString(arg) {
  return typeof arg === 'string';
}
exports.isString = isString;

function isSymbol(arg) {
  return typeof arg === 'symbol';
}
exports.isSymbol = isSymbol;

function isUndefined(arg) {
  return arg === void 0;
}
exports.isUndefined = isUndefined;

function isRegExp(re) {
  return isObject(re) &amp;amp;&amp;amp; objectToString(re) === '[object RegExp]';
}
exports.isRegExp = isRegExp;

function isObject(arg) {
  return typeof arg === 'object' &amp;amp;&amp;amp; arg !== null;
}
exports.isObject = isObject;

function isDate(d) {
  return isObject(d) &amp;amp;&amp;amp; objectToString(d) === '[object Date]';
}
exports.isDate = isDate;

function isError(e) {
  return isObject(e) &amp;amp;&amp;amp;
      (objectToString(e) === '[object Error]' || e instanceof Error);
}
exports.isError = isError;

function isFunction(arg) {
  return typeof arg === 'function';
}
exports.isFunction = isFunction;

function isPrimitive(arg) {
  return arg === null ||
         typeof arg === 'boolean' ||
         typeof arg === 'number' ||
         typeof arg === 'string' ||
         typeof arg === 'symbol' ||  // ES6 symbol
         typeof arg === 'undefined';
}
exports.isPrimitive = isPrimitive;

exports.isBuffer = require('./support/isBuffer');

function objectToString(o) {
  return Object.prototype.toString.call(o);
}


function pad(n) {
  return n &amp;lt; 10 ? '0' + n.toString(10) : n.toString(10);
}


var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
              'Oct', 'Nov', 'Dec'];

// 26 Feb 16:19:34
function timestamp() {
  var d = new Date();
  var time = [pad(d.getHours()),
              pad(d.getMinutes()),
              pad(d.getSeconds())].join(':');
  return [d.getDate(), months[d.getMonth()], time].join(' ');
}


// log is just a thin wrapper to console.log that prepends a timestamp
exports.log = function() {
  console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
};


/**
 * Inherit the prototype methods from one constructor into another.
 *
 * The Function.prototype.inherits from lang.js rewritten as a standalone
 * function (not on Function.prototype). NOTE: If this file is to be loaded
 * during bootstrapping this function needs to be rewritten using some native
 * functions as prototype setup using normal JavaScript does not work as
 * expected during bootstrapping (see mirror.js in r114903).
 *
 * @param {function} ctor Constructor function which needs to inherit the
 *     prototype.
 * @param {function} superCtor Constructor function to inherit prototype from.
 */
exports.inherits = require('inherits');

exports._extend = function(origin, add) {
  // Don't do anything if add isn't an object
  if (!add || !isObject(add)) return origin;

  var keys = Object.keys(add);
  var i = keys.length;
  while (i--) {
    origin[keys[i]] = add[keys[i]];
  }
  return origin;
};

function hasOwnProperty(obj, prop) {
  return Object.prototype.hasOwnProperty.call(obj, prop);
}

}).call(this,require('_process'),typeof global !== &amp;quot;undefined&amp;quot; ? global : typeof self !== &amp;quot;undefined&amp;quot; ? self : typeof window !== &amp;quot;undefined&amp;quot; ? window : {})
},{&amp;quot;./support/isBuffer&amp;quot;:7,&amp;quot;_process&amp;quot;:6,&amp;quot;inherits&amp;quot;:5}]},{},[1]);
&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/hJmcsZW30sIr">
    <link>https://let.hatelabo.jp/efcl/let/hJmcsZW30sIr</link>
    <dc:date>2014-02-05T14:29:19Z</dc:date>
    <description>Selecting date text</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] WhatDateIs.js</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FhJmcsZW30sIr.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;WhatDateIs.js&lt;/a&gt;&lt;pre&gt;/*
 * @title WhatDateIs.js
 * @description Selecting date text
 * @include http://*
 * @license MIT License
 * @require https://raw.github.com/berryboy/chrono/master/chrono.min.js
 */

(function(){
    var selectText = getSelectingText();
    var parsingDates = chrono.parse(selectText);
    var dates = buildDate(parsingDates);
    alert(dates);

function openURL(url) {
    location.assign(url);
}

function getSelectingText() {
    return window.getSelection().toString();
}

function pickupChronoDate(chronoDates) {
    if (chronoDates.length == 1) {
        return chronoDates[0];
    }
    for (var i = 0; i &amp;lt; chronoDates.length; i++) {
        var chronoDate = chronoDates[i];
        if (&amp;quot;startDate&amp;quot; in chronoDate &amp;amp;&amp;amp; &amp;quot;endDate&amp;quot; in chronoDate) {
            return chronoDate;
        }
    }
    return chronoDates[0];
}

function buildDate(chronoDates) {
    if (typeof chronoDates === &amp;quot;undefined&amp;quot; || chronoDates.length === 0) {
        return;
    }
    var chronoDate = pickupChronoDate(chronoDates);
    var startDateText = formatDateString(chronoDate.startDate);
    var endDateText = chronoDate.endDate ? formatDateString(chronoDate.endDate) : null;
    if (startDateText &amp;amp;&amp;amp; endDateText) {
        return startDateText + &amp;quot;/&amp;quot; + endDateText;
    } else {
        return startDateText;
    }
}
function format0(str, len) {
    return ('_' + Math.pow(10, len) + str).slice(-len);
}
function formatDateString(date) {
    var TDate = date.getUTCFullYear() + format0(date.getUTCMonth() + 1, 2) + format0(date.getUTCDate(), 2);
    var times = format0(date.getUTCHours(), 2) + format0(date.getUTCMinutes(), 2) + format0(date.getUTCSeconds(), 2);
    return date.getUTCFullYear() + &amp;quot;年&amp;quot; + (date.getUTCMonth() + 1) + &amp;quot;月&amp;quot; + date.getUTCDate() + &amp;quot;日&amp;quot;;
}
})();&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/hLHU6Y_ukpEa">
    <link>https://let.hatelabo.jp/efcl/let/hLHU6Y_ukpEa</link>
    <dc:date>2013-12-31T14:10:27Z</dc:date>
    <description>my bookmarklet</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] ひとでごう</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FhLHU6Y_ukpEa.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;ひとでごう&lt;/a&gt;&lt;pre&gt;/*
 * @title ひとでごう
 * @description my bookmarklet
 * @include http://hitode909.hatenablog.com/entry/2013/12/31/220643
 * @license MIT License
 * @require 
 */


var s = document.querySelector(&amp;quot;.entry-content&amp;quot;);
s.innerHTML = s.innerHTML.replace(/\．/g,&amp;quot;&amp;lt;hr/&amp;gt;&amp;quot;);&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/hJmc29LE3adA">
    <link>https://let.hatelabo.jp/efcl/let/hJmc29LE3adA</link>
    <dc:date>2013-12-10T15:38:54Z</dc:date>
    <description>Selecting date text to Google Calendar</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] JSEventカレンダー</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FhJmc29LE3adA.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;JSEventカレンダー&lt;/a&gt;&lt;pre&gt;/*
 * @title JSEventカレンダー
 * @description Selecting date text to Google Calendar
 * @include https?://*
 * @license MIT License
 * @require https://raw.github.com/berryboy/chrono/master/chrono.min.js
 */

(function __main() {
    var selectText = getSelectingText();
    var parsingDates = chrono.parse(selectText);
    var dates = buildDate(parsingDates);
    var url = buildURL({
        &amp;quot;text&amp;quot;: document.title,
        &amp;quot;details&amp;quot;: document.title,
        &amp;quot;dates&amp;quot;: dates
    });
    openURL(url);
})();

function openURL(url) {
    location.href = url;
}

function getSelectingText() {
    return window.getSelection().toString();
}

function pickupChronoDate(chronoDates) {
    if (chronoDates.length == 1) {
        return chronoDates[0];
    }
    for (var i = 0; i &amp;lt; chronoDates.length; i++) {
        var chronoDate = chronoDates[i];
        if (&amp;quot;startDate&amp;quot; in chronoDate &amp;amp;&amp;amp; &amp;quot;endDate&amp;quot; in chronoDate) {
            return chronoDate;
        }
    }
    return chronoDates[0];
}
function buildDate(chronoDates) {
    if (typeof chronoDates === &amp;quot;undefined&amp;quot; || chronoDates.length === 0) {
        return;
    }
    var chronoDate = pickupChronoDate(chronoDates);
    var startDateText = formatDateString(chronoDate.startDate);
    var endDateText = chronoDate.endDate ? formatDateString(chronoDate.endDate) : null;
    if (startDateText &amp;amp;&amp;amp; endDateText) {
        return startDateText + &amp;quot;/&amp;quot; + endDateText;
    } else {
        return startDateText + &amp;quot;/&amp;quot; + startDateText;
    }
}
function format0(str, len) {
    return ('_' + Math.pow(10, len) + str).slice(-len);
}
function formatDateString(date) {
    var TDate = date.getUTCFullYear() + format0(date.getUTCMonth() + 1, 2) + format0(date.getUTCDate(), 2);
    var times = format0(date.getUTCHours(), 2) + format0(date.getUTCMinutes(), 2) + format0(date.getUTCSeconds(), 2);
    return  TDate + &amp;quot;T&amp;quot; + times + &amp;quot;Z&amp;quot;;
}
function buildURL(parameters) {
    var action = parameters.action || &amp;quot;TEMPLATE&amp;quot;;
    var text = parameters.text || &amp;quot;&amp;quot;;
    var details = parameters.details || &amp;quot;&amp;quot;;
    var dates = parameters.dates || &amp;quot;&amp;quot;;
    var location = parameters.location || window.location.href;
    return 'https://www.google.com/calendar/b/1/render?' +
        'action=' + action +
        '&amp;amp;text=' + encodeURIComponent(text) +
        '&amp;amp;details=' + encodeURIComponent(details) +
        '&amp;amp;location=' + encodeURIComponent(location) +
        '&amp;amp;dates=' + dates +
        '&amp;amp;trp=true' +
        '&amp;amp;sprop=website:' + window.location.href;
}&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/hLHUsZmX97sE">
    <link>https://let.hatelabo.jp/efcl/let/hLHUsZmX97sE</link>
    <dc:date>2013-12-04T01:19:43Z</dc:date>
    <description>Selecting date text to Google Calendar</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] GoogleCalendarParsingDate.js</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FhLHUsZmX97sE.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;GoogleCalendarParsingDate.js&lt;/a&gt;&lt;pre&gt;/*
 * @title GoogleCalendarParsingDate.js
 * @description Selecting date text to Google Calendar
 * @include http://*
 * @license MIT License
 * @require https://raw.github.com/wanasit/chrono/master/chrono.min.js
 */

(function __main() {
    var selectText = getSelectingText() || window.prompt(&amp;quot;Date?&amp;quot;);
    var parsingDates = chrono.parse(selectText);
    var dates = buildDate(parsingDates);
    var url = buildURL({
        &amp;quot;text&amp;quot;: document.title,
        &amp;quot;details&amp;quot;: document.title,
        &amp;quot;dates&amp;quot;: dates
    });
    openURL(url);
})();

function openURL(url) {
    location.assign(url);
return ;
    if (document.currentScript) {
        location.assign(url);
    } else {
        window.open(url, &amp;quot;_blank&amp;quot;);
    }
}

function getSelectingText() {
    return window.getSelection().toString();
}

function pickupChronoDate(chronoDates) {
    if (chronoDates.length == 1) {
        return chronoDates[0];
    }
    for (var i = 0; i &amp;lt; chronoDates.length; i++) {
        var chronoDate = chronoDates[i];
        if (&amp;quot;startDate&amp;quot; in chronoDate &amp;amp;&amp;amp; &amp;quot;endDate&amp;quot; in chronoDate) {
            return chronoDate;
        }
    }
    return chronoDates[0];
}
function buildDate(chronoDates) {
    if (typeof chronoDates === &amp;quot;undefined&amp;quot; || chronoDates.length === 0) {
        return;
    }
    var chronoDate = pickupChronoDate(chronoDates);
    var startDateText = formatDateString(chronoDate.startDate);
    var endDateText = chronoDate.endDate ? formatDateString(chronoDate.endDate) : null;
    if (startDateText &amp;amp;&amp;amp; endDateText) {
        return startDateText + &amp;quot;/&amp;quot; + endDateText;
    } else {
        return startDateText + &amp;quot;/&amp;quot; + startDateText;
    }
}
function format0(str, len) {
    return ('_' + Math.pow(10, len) + str).slice(-len);
}
function formatDateString(date) {
    var TDate = date.getUTCFullYear() + format0(date.getUTCMonth() + 1, 2) + format0(date.getUTCDate(), 2);
    var times = format0(date.getUTCHours(), 2) + format0(date.getUTCMinutes(), 2) + format0(date.getUTCSeconds(), 2);
    return  TDate + &amp;quot;T&amp;quot; + times + &amp;quot;Z&amp;quot;;
}
function buildURL(parameters) {
    var action = parameters.action || &amp;quot;TEMPLATE&amp;quot;;
    var text = parameters.text || &amp;quot;&amp;quot;;
    var details = parameters.details || &amp;quot;&amp;quot;;
    var dates = parameters.dates || &amp;quot;&amp;quot;;
    var location = parameters.location || window.location.href;
    return 'https://www.google.com/calendar/render?' +
        'action=' + action +
        '&amp;amp;text=' + encodeURIComponent(text) +
        '&amp;amp;details=' + encodeURIComponent(details) +
        '&amp;amp;location=' + encodeURIComponent(location) +
        '&amp;amp;dates=' + dates +
        '&amp;amp;trp=true' +
        '&amp;amp;sprop=website:' + window.location.href;
}&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/hJmczrGWsuU1">
    <link>https://let.hatelabo.jp/efcl/let/hJmczrGWsuU1</link>
    <dc:date>2013-11-20T01:14:41Z</dc:date>
    <description>jump from github.io to github.com</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] Github pages to Github.com</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FhJmczrGWsuU1.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;Github pages to Github.com&lt;/a&gt;&lt;pre&gt;/*
 * @title Github pages to Github.com
 * @description jump from github.io to github.com
 * @include http://*.github.io/*
 * @license MIT License
 * @require 
 */

(function() {
    var userName = location.host.split(&amp;quot;.&amp;quot;).shift();
    if (userName == null) {
        alert(&amp;quot;Not Found UserName&amp;quot;);
    }
    var path = userName + location.pathname;
    var githubRepo = &amp;quot;https://github.com/&amp;quot; + path;
    location.href = githubRepo;
})();

&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/hLHUmvf-ptcz">
    <link>https://let.hatelabo.jp/efcl/let/hLHUmvf-ptcz</link>
    <dc:date>2013-09-01T03:10:10Z</dc:date>
    <description>FullRSS bookmarklet</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] FullRSS bookmarklet</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FhLHUmvf-ptcz.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;FullRSS bookmarklet&lt;/a&gt;&lt;pre&gt;/*
 * @title FullRSS bookmarklet
 * @description FullRSS bookmarklet
 * @include https?://*
 * @license MIT License
 * @require 
 */


(function () {
    var targetRSSURL = getRssURLFromDocument();
    var rssFeedURL = 'http://fullrss.net/analyze/?url=' + encodeURIComponent(targetRSSURL);
    window.open(rssFeedURL, '_blank');

    function getRssURLFromDocument() {
        var linkTags = document.getElementsByTagName(&amp;quot;link&amp;quot;);
        for (var i = 0; i &amp;lt; linkTags.length; i++) {
            var elem = linkTags[i];
            if (elem.getAttribute(&amp;quot;rel&amp;quot;) == &amp;quot;alternate&amp;quot; &amp;amp;&amp;amp; /(xml|rss)/.test(elem.getAttribute(&amp;quot;type&amp;quot;))) {
                return elem.href;
            }
        }
    }

})();&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/hLHUhZfOl5Yp">
    <link>https://let.hatelabo.jp/efcl/let/hLHUhZfOl5Yp</link>
    <dc:date>2013-07-29T08:16:52Z</dc:date>
    <description>Count Feedly subscribers</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] Count Feedly subscribers</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FhLHUhZfOl5Yp.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;Count Feedly subscribers&lt;/a&gt;&lt;pre&gt;/*
 * @title Count Feedly subscribers
 * @description Count Feedly subscribers
 * @include http://*
 * @license MIT License
 * @require 
 */
// http://daisukeblog.com/?p=2129

(function main() {
    var targetURL = getRssURLFromDocument();
    if(targetURL == null) {
        alert(&amp;quot;Not Found RSS URL&amp;quot;);
        return
    }
    var xhr = new XMLHttpRequest();
    xhr.onload = function () {
        if (xhr.status === 200) {
            var json = JSON.parse(xhr.responseText);
            var results = json.query.results.json;
            /* API Result */
            var siteTitle = results[&amp;quot;title&amp;quot;],
                subscribers = results[&amp;quot;subscribers&amp;quot;];
            alert(siteTitle + &amp;quot;の購読者: &amp;quot; + subscribers);
        }
    };
    xhr.open(&amp;quot;get&amp;quot;, getYQLAsURL(targetURL), true);
    xhr.send();
})();
function getYQLAsURL(targetURL) {
    var FeedlyAPI = &amp;quot;http://cloud.feedly.com/v3/feeds/feed&amp;quot;;
    var jsonEndPoint = FeedlyAPI + encodeURIComponent(&amp;quot;/&amp;quot; + targetURL);
    var yqlAsURL = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent('select * from json where url=&amp;quot;' + jsonEndPoint + '&amp;quot;') + '&amp;amp;format=json';
    return yqlAsURL;
}
function getRssURLFromDocument() {
    var linkTags = document.getElementsByTagName(&amp;quot;link&amp;quot;);
    for (var i = 0; i &amp;lt; linkTags.length; i++) {
        var elem = linkTags[i];
        if (elem.getAttribute(&amp;quot;rel&amp;quot;) == &amp;quot;alternate&amp;quot; &amp;amp;&amp;amp; /(xml|rss)/.test(elem.getAttribute(&amp;quot;type&amp;quot;))) {
            return elem.href;
        }
    }
}&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/gYC-x83qke2wPA">
    <link>https://let.hatelabo.jp/efcl/let/gYC-x83qke2wPA</link>
    <dc:date>2013-05-04T08:22:05Z</dc:date>
    <description>ブックマークレットを仕様ページで実行して、比較したい以前のバージョンのリンクをクリックをする</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] W3C Diff by Click</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FgYC-x83qke2wPA.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;W3C Diff by Click&lt;/a&gt;&lt;pre&gt;/*
 * @title W3C Diff by Click
 * @description ブックマークレットを仕様ページで実行して、比較したい以前のバージョンのリンクをクリックをする
 * @include http://*
 * @license MIT License
 * @require 
 */

// http://services.w3.org/htmldiff?doc1=[old]&amp;amp;doc2=[new]

(function (){
    (function main(){
        var aLinks = document.querySelectorAll(&amp;quot;a[href]&amp;quot;);
        var hrefReg = /http:\/\/www\.w3\.org\//i
        document.body.addEventListener(&amp;quot;click&amp;quot;, function (evt){
            evt.preventDefault();
            var src = evt.target;
            if (src.nodeName == &amp;quot;A&amp;quot; &amp;amp;&amp;amp; hrefReg.test(src.href)) {
                jumpToDiff(src.href, location.href);
            }
        }, true);
    })();

    function jumpToDiff(previousURL, newURL){
        location.replace(&amp;quot;http://services.w3.org/htmldiff?doc1=&amp;quot;
            + previousURL
            + &amp;quot;&amp;amp;doc2=&amp;quot;
            + newURL
        );
    }
})();

&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/gYC-y4PNrvP6fw">
    <link>https://let.hatelabo.jp/efcl/let/gYC-y4PNrvP6fw</link>
    <dc:date>2013-01-09T01:08:46Z</dc:date>
    <description>my bookmarklet</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] 初心者ですが、よろしくお願いします</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FgYC-y4PNrvP6fw.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;初心者ですが、よろしくお願いします&lt;/a&gt;&lt;pre&gt;/*
 * @title 初心者ですが、よろしくお願いします
 * @description my bookmarklet
 * @include http://atnd.org/events/*
 * @license MIT License
 * @require 
 */
/*
http://layzie.hatenablog.com/entry/20130109/1357664987
execute on http://atnd.org/events/35720
*/
var messages = document.querySelectorAll(&amp;quot;#members-join em&amp;quot;);
var ArrayFrom = function (object) {
    return [].slice.call(object);
};
ArrayFrom(messages).forEach(function(ele,idx,array){
    var js = /初心者/i, text=ele.textContent;    
    if(text.length === 0 || js.test(text)){return;}
    ele.textContent = &amp;quot;初心者ですが、&amp;quot; + text; 
});
&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/gYC-x4CIkuLFfg">
    <link>https://let.hatelabo.jp/efcl/let/gYC-x4CIkuLFfg</link>
    <dc:date>2013-01-03T13:03:27Z</dc:date>
    <description>メディアマーカーのメンテナンス画面に表示されてるアイテムをまとめて、evernoteに送る</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] post media marker to evernote</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FgYC-x4CIkuLFfg.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;post media marker to evernote&lt;/a&gt;&lt;pre&gt;/*
 * @title post media marker to evernote
 * @description メディアマーカーのメンテナンス画面に表示されてるアイテムをまとめて、evernoteに送る
 * @include http://*
 * @license MIT License
 * @require 
 */

/* http://mediamarker.net/u/&amp;lt;USER&amp;gt;/config?op=evernote
   で設定を済ませておくこと
*/
ArrayFrom = function (object) {
    return [].slice.call(object);
};
var mediaIDs = ArrayFrom(document.getElementsByName(&amp;quot;mt_comid[]&amp;quot;)).map(function(ele,idx,obj){
    return ele.value;
});
// post to evernote
mediaIDs.each(function(mediaID){
    postConnect('evernote', mediaID);
});
&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/gYC-xr6s3OyWQA">
    <link>https://let.hatelabo.jp/efcl/let/gYC-xr6s3OyWQA</link>
    <dc:date>2012-09-23T11:06:53Z</dc:date>
    <description>my bookmarklet</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] GoogleReader+まるごとRSS</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FgYC-xr6s3OyWQA.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;GoogleReader+まるごとRSS&lt;/a&gt;&lt;pre&gt;/*
 * @title GoogleReader+まるごとRSS
 * @description my bookmarklet
 * @include http://*
 * @license MIT License
 * @require 
 */


(function(){
    var el = document.getElementsByTagName(&amp;quot;link&amp;quot;);
    var flag = false;
    for (i = 0; i &amp;lt; el.length; i++){
        if (!flag &amp;amp;&amp;amp; el[i].getAttribute(&amp;quot;rel&amp;quot;) == &amp;quot;alternate&amp;quot; &amp;amp;&amp;amp; /(xml|rss)/.test(el[i].getAttribute(&amp;quot;type&amp;quot;))){
            window.open('http://www.google.com/reader/view/feed/http://mrss.dokoda.jp/analyze/?url=' + encodeURIComponent(el[i].href), '_blank');
            flag = true;
        }
    }
    if (!flag){
       location.href = 'http://www.google.com/reader/view/feed/http://mrss.dokoda.jp/analyze/?url=' + location.href;
    }
})();
&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/gYC-xrPDn42-Xw">
    <link>https://let.hatelabo.jp/efcl/let/gYC-xrPDn42-Xw</link>
    <dc:date>2012-09-20T15:31:41Z</dc:date>
    <description>W3Cの仕様書のページで、前回のバージョンとのDiffを表示</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] W3C Diff</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FgYC-xrPDn42-Xw.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;W3C Diff&lt;/a&gt;&lt;pre&gt;/*
 * @title W3C Diff
 * @description W3Cの仕様書のページで、前回のバージョンとのDiffを表示
 * @include http://www.w3.org/*
 * @license MIT License
 */

(function(){
    var regText = /previous/i;
    var previousURL, currentURL = location.href;
    var links = document.querySelectorAll(&amp;quot;#Overview dt + dd &amp;gt; a&amp;quot;);
    if(links.length == 0){ links = document.querySelectorAll(&amp;quot;#head dt + dd &amp;gt; a&amp;quot;);}
    for (var i = 0, len = links.length; i &amp;lt; len; i++){
        var linkNode = links[i];
        console.log(linkNode);
        var dt = linkNode.parentNode.previousElementSibling;
        if (regText.test(dt.textContent)){
            previousURL = linkNode.href;
            break;
        }
    }
    if (previousURL){
        // http://www.w3.org/2007/10/htmldiff?doc1=[old]&amp;amp;doc2=[new]
        location.replace(&amp;quot;http://www.w3.org/2007/10/htmldiff?doc1=&amp;quot;
                + previousURL
                + &amp;quot;&amp;amp;doc2=&amp;quot;
                + currentURL
        );
    }
})();&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/gYC-xKaK34KfVQ">
    <link>https://let.hatelabo.jp/efcl/let/gYC-xKaK34KfVQ</link>
    <dc:date>2011-07-16T01:59:55Z</dc:date>
    <description>my bookmarklet</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] waldo-search</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FgYC-xKaK34KfVQ.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;waldo-search&lt;/a&gt;&lt;pre&gt;/*
 * @title waldo-search
 * @description my bookmarklet
 * @include http://*
 * @license MIT License
 * @require 
 */

// http://javascriptweblog.wordpress.com/2011/07/11/waldo-search-the-javascript-runtime-in-under-1-kb/

(function(){
  var traverse = function(util, searchTerm, options) {
    var options = options || {};
    var obj = options.obj || window;
    var path = options.path || ((obj==window) ? &amp;quot;window&amp;quot; : &amp;quot;&amp;quot;);
    var props = Object.keys(obj);
    props.forEach(function(prop) {
      if ((tests[util] || util)(searchTerm, obj, prop)){
        console.log([path, &amp;quot;.&amp;quot;, prop].join(&amp;quot;&amp;quot;), &amp;quot;-&amp;gt;&amp;quot;,[&amp;quot;(&amp;quot;, typeof obj[prop], &amp;quot;)&amp;quot;].join(&amp;quot;&amp;quot;), obj[prop]);
      }
      if((&amp;quot;&amp;quot;+obj[prop])==&amp;quot;[object Object]&amp;quot; &amp;amp;&amp;amp; (obj[prop] != obj) &amp;amp;&amp;amp; path.split(&amp;quot;.&amp;quot;).indexOf(prop) == -1) {
        traverse(util, searchTerm, {obj: obj[prop], path: [path,prop].join(&amp;quot;.&amp;quot;)});
      }
    });
  }

  var dealWithIt = function(util, expected, searchTerm, options) {
    (!expected || typeof searchTerm == expected) ?
      traverse(util, searchTerm, options) :
      console.error([searchTerm, 'must be', expected].join(' '));
  }

  var tests = {
    'name': function(searchTerm, obj, prop) {return searchTerm == prop},
    'nameContains': function(searchTerm, obj, prop) {return prop.indexOf(searchTerm)&amp;gt;-1},
    'type': function(searchTerm, obj, prop) {return obj[prop] instanceof searchTerm},
    'value': function(searchTerm, obj, prop) {return obj[prop] === searchTerm},
    'valueCoerced': function(searchTerm, obj, prop) {return obj[prop] == searchTerm}
  }

  window.find={
    byName: function(searchTerm, options) {dealWithIt('name', 'string', searchTerm, options);},
    byNameContains: function(searchTerm, options) {dealWithIt('nameContains', 'string', searchTerm, options);},
    byType: function(searchTerm, options) {dealWithIt('type', 'function', searchTerm, options);},
    byValue: function(searchTerm, options) {dealWithIt('value', null, searchTerm, options);},
    byValueCoerced: function(searchTerm, options) {dealWithIt('valueCoerced', null, searchTerm, options);},
    custom: function(fn, options) {traverse(fn, null, options);}
  }
})();
&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/gYC-y8K-v7_MQA">
    <link>https://let.hatelabo.jp/efcl/let/gYC-y8K-v7_MQA</link>
    <dc:date>2011-02-11T08:48:10Z</dc:date>
    <description>my bookmarklet</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] 今見ている記事の関連記事を表示</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FgYC-y8K-v7_MQA.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;今見ている記事の関連記事を表示&lt;/a&gt;&lt;pre&gt;/*
 * @title 今見ている記事の関連記事を表示
 * @description my bookmarklet
 * @include http://*
 * @license MIT License
 * @require 
 */

// http://d.hatena.ne.jp/Gwzo/20110206/1296996269
// ----------------------------------------------------------------------------
/*
 * 属性を追加する関数、あまり良くないかな・・・
 */
function makeElement(name, attrs){

	// エレメント生成
	var element = document.createElement(name);
	
	// キー／バリューで追加
	for(var key in attrs){
		element[key] = attrs[key];
	}
	return element;
}

// ----------------------------------------------------------------------------
/*
 * コールバック関数。受け取った値をいろいろと処理する
 */
function setElement(res){

	// 初期化
	var data = '&amp;lt;h3 style=&amp;quot;padding:3px;background:#f2f2f2&amp;quot;&amp;gt;たまに使うといいかもしれない？&amp;lt;/h3&amp;gt;&amp;lt;br /&amp;gt;';
	var r = res.related;
	
	// 受け取った値で、HTMLを作成しちゃう
	for(var i=0 ; i&amp;lt;r.length ; i++){
		data += '&amp;lt;a href=&amp;quot;'+r[i].url+'&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;'+r[i].title+'&amp;lt;/a&amp;gt; ('+r[i].count+')&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
	}

	dispData(data);
}

// ----------------------------------------------------------------------------
/*
 * 表示する関数。
 */
function dispData(data){

	// エレメント生成
	var d = document.createElement('div');

	// スタイルの設定
	with(d.style){
		position='fixed';
		width = '490px';
		height = '390px';
		fontSize = '12px';
		zIndex = 99999;
	}

	// 属性追加
	d.setAttribute('id','gwzo-similar-post-main');

	// データ追加
	d.innerHTML = data;
	
	// ノード追加
	document.getElementById('gwzo-similar-post').appendChild(d);
}

// ----------------------------------------------------------------------------
/*
 * はてなブックマークAPIやURLの設定、JSONPを使用している
 */
function getBukuma(){

	// ベースURL
	var base_url = 'http://b.hatena.ne.jp/entry/json/';
	
	// 現在のURLの取得
	var target = encodeURI(location.href);
	
	// リクエストURLの整形、コールバック関数も
	var url = base_url+'?url='+target+'&amp;amp;callback=setElement';
	
	// 属性の設定
	var attrs = {src : url, type : 'text/javascript', charset : 'UTF-8'}
	
	// makeElement関数を使い、エレメント取得
	var script = makeElement('script', attrs);
	
	// 子ノードを追加する
	document.getElementsByTagName('head')[0].appendChild(script);
}

// ----------------------------------------------------------------------------
/*
 * 背景のスタイルを透過性のある黒に変更する。
 */
function setBg(){

	// エレメント生成
	var d = document.createElement('div');
	
	// スタイルの設定
	with(d.style){
		position = 'fixed';
		width = '100%';
		height = '100%';
		opacity = '0.9';
		top = '0';
		left = '0';
		padding = '20px';
		backgroundColor = '#000';
		border = '1px solid #ccc';
		zIndex = 9998;
	}
	
	// 属性の追加
	d.setAttribute('onclick','document.body.removeChild(this)');
	d.setAttribute('id','gwzo-similar');
	
	// ノード追加
	document.body.appendChild(d);
	setMainBg();
}

// ----------------------------------------------------------------------------
/*
 * 大事なところを白くする・・・
 */
function setMainBg(){

	// エレメント生成
	var d = document.createElement('div');
	
	// スタイルの設定
	with(d.style){
		position = 'fixed';
		width = '500px';
		height = '400px';
		top = '50%';
		left = '50%';
		margin = '-200px 0 0 -295px';
		padding = '20px';
		fontFamily = 'Arial,Helvetica,sans-serif';
		textAlign = 'center';
		backgroundColor = '#f7f7f7';
		border = '1px solid #ccc';
		zIndex = 9998;
	}
	
	// 属性の追加
	d.setAttribute('onclick','document.body.removeChild(this)');
	d.setAttribute('id','gwzo-similar-post');
	
	// ノード追加
	document.getElementById('gwzo-similar').appendChild(d);
}

// ----------------------------------------------------------------------------
// ここからスタート
// ----------------------------------------------------------------------------

// 背景の変更
setBg();

// はてなブックマークAPIを叩き表示させる
getBukuma();

/* END CODE */
&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/gYC-y6v3n8e6WQ">
    <link>https://let.hatelabo.jp/efcl/let/gYC-y6v3n8e6WQ</link>
    <dc:date>2011-01-07T07:50:41Z</dc:date>
    <description>RSSのリンクを探してまるごとRSSのURLをGoogleリーダーに登録</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] まるごとRSS+Googleリーダー</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FgYC-y6v3n8e6WQ.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;まるごとRSS+Googleリーダー&lt;/a&gt;&lt;pre&gt;/*
 * @title まるごとRSS+Googleリーダー
 * @description RSSのリンクを探してまるごとRSSのURLをGoogleリーダーに登録
 * @include http://*
 * @license MIT License
 * @require 
 */
  var el=document.getElementsByTagName(&amp;quot;link&amp;quot;);
  var flag=false;
  for(i=0;i&amp;lt;el.length;i++){
    if(!flag&amp;amp;&amp;amp;el[i].getAttribute(&amp;quot;rel&amp;quot;)==&amp;quot;alternate&amp;quot;&amp;amp;&amp;amp;/(xml|rss)/.test(el[i].getAttribute(&amp;quot;type&amp;quot;))){
      var t=el[i].href.split(&amp;quot;/&amp;quot;);
      t.shift();
      window.open('http://www.google.com/reader/view/feed/http://mrss.dokoda.jp/a/http'+t.join(&amp;quot;/&amp;quot;),'_blank');
      flag=true;
    }
  }
  if(!flag){
    var t=location.href.split(&amp;quot;/&amp;quot;);
    t.shift();
    window.open('http://www.google.com/reader/view/feed/http://mrss.dokoda.jp/a/http'+t.join(&amp;quot;/&amp;quot;),'_blank');
  }&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/efcl/let/gYC-ytOqgIvJHg">
    <link>https://let.hatelabo.jp/efcl/let/gYC-ytOqgIvJHg</link>
    <dc:date>2010-08-22T16:27:11Z</dc:date>
    <description>AutoPagerize IDEの結果をAutoPagerizeに加えやすいように書き換えた。</description>
    <dc:creator>efcl</dc:creator>
    <title>[Let] AutoPagerize IDE</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fefcl%2Flet%2FgYC-ytOqgIvJHg.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;AutoPagerize IDE&lt;/a&gt;&lt;pre&gt;/*
 * @title AutoPagerize IDE
 * @description AutoPagerize IDEの結果をAutoPagerizeに加えやすいように書き換えた。
 * @include http://*
 * @license MIT License
 * @require 
 */


//
// AuroPagerize IDE
//
// auther:  KUMAGAI Kentaro, GMO Internet lab. http://labs.gmo.jp/blog/ku/
// version: 0.0.4 2007/12/11
//
// this bookmarklet helps to create rules for Mozilla Firefox Greasemonkey script
// AutoPagerize http://userscripts.org/scripts/show/8551
//
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//


	window.__apride_disable_ui = ( location.host == 'fav' || location.host == 'dokodemo' );
	//window.__apride_disable_ui = true;
	window.DEBUG_MODE = 0;

	function dirty_generated_code() {
		if ( window.__apride_disable_ui )
			return;

			var e = document.createElement('style');e.innerHTML = ( &amp;lt;&amp;gt;&amp;lt;![CDATA[/*
 * #_apride {
	position: fixed;
	top: 5%;
	right: 5%;
}

#_apride_main {
	padding: 10px;
	color: black;
}

/*
#_apride_titlebar {
	background: blue;
	color: white;
	font-weight: bold;
	font-size: large;
	padding: 4px;
}

#_apride input._es_text_error {
	background-color: red;
	color: white;
	font-weight: bold;
}

*/

/**	
 * floating window styles. 
 *
 **/


._floating_window {
	position: fixed!important;
	position: absolute;
	width: 400px;
	height: 400px;
	top: 5%;
	right: 5%;
	text-align: left;
	z-index: 100000;
	color: black;

	font-family: 'メイリオ',Sans-Serif !important;
	font-size: normal !important;
}

._floating_window div {

}

._floating_window img {
	border: 0px none;
}
._floating_logo  {
	padding-top: 10px;
}

._floating_tl {
	background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/tl.png') top left no-repeat;
	cursor: move;
	position: absolute;
	top: 0; left: 0;
	width: 25px;
	height: 59px;
}
._floating_tc {
	background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/tc.png') top center repeat-x;
	cursor: move;
	position: absolute;
	top: 0; left: 25px; right: 25px;
	width: 350px; 
	height: 59px;
}
._floating_tr {
	background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/tr.png') top right no-repeat;
	_background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/tr.gif') top right no-repeat;
	cursor: move;
	position: absolute;
	top: 0; right: 0;
	width: 25px; 
	height: 59px;
}
._floating_ml {
	background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/cl.png') center left repeat-y;
	_background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/cl.gif') center left repeat-y;
	position: absolute;
	top: 59; left: 0; bottom: 23px;
	width: 25px; 
	height: 318px;
}
._floating_mc {
	background: #f9f4e3;
	overflow: auto;
	overflow-x: hidden;
	position: absolute;
	top: 59; left: 25px; right: 20px; bottom: 23px;
	width: 360px; 
	height: 318px;
	z-index: 100001;
	scrollbar-face-color: #d6e3ee;
	scrollbar-3dlight-color: #dae6f0;
	scrollbar-highlight-color: #d6e3ee;
	scrollbar-shadow-color: #d6e3ee;
	scrollbar-darkshadow-color: #b4bfcc;
	scrollbar-arrow-color: #475f84;
	scrollbar-track-color: #f9f4e3;
}
._floating_mr {
	background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/cr.png') center right repeat-y;
	_background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/cr.gif') center right repeat-y;
	position: absolute;
	top: 59; right: 0; bottom: 23px;
	width: 20px; 
	height: 318px;
}
._floating_bl {
	background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/bl.png') bottom left no-repeat;
	_background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/bl.gif') bottom left no-repeat;
	position: absolute;
	bottom: 0; left: 0;
	width: 25px; 
	height: 23px;
}
._floating_bc {
	background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/bc.png') bottom center repeat-x;
	_background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/bc.gif') bottom center repeat-x;
	position: absolute;
	bottom: 0; left: 25px; right: 25px;
	width: 350px; 
	height: 23px;
}
._floating_br {
	background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/br.png') bottom right no-repeat;
	_background: url('http://labs.gmo.jp/blog/ku/bookmarklet/bg/br.gif') bottom right no-repeat;
	cursor: se-resize;
	position: absolute;
	bottom: 0; right: 0;
	width: 25px; 
	height: 23px;
}
/*
._floating_tc a:hover {
	background: none;
}
*/

#_apride img._es_selected_color {
	width: 16px;
	height: 16px;
}


._floating_close {
	float: right;
	margin-top: 16px;
}
._floating_mc .wrap {
	padding: 8px 16px 8px 8px;
}
._floating_mc p {
	line-height: 1.2;
}

._floating_window #_apride_generated_code {
	font-size: small;
	color: black !important;

	margin-top: 10px; 
	display: none;
	width: 295px;
	height: 85px;
}

#_apride .apride_input {
	width: 280px !important;
}

#_apride dt._es_active_field {
	background: #e72d89;
	color: white;
	font-weight: bold;
}

]]&amp;gt;&amp;lt;/&amp;gt; );document.getElementsByTagName(&amp;quot;head&amp;quot;)[0].appendChild(e);var div1=document.createElement('div');
div1.setAttribute('id','//*[@id=&amp;quot;_apride&amp;quot;');
div1.innerHTML =  ( &amp;lt;&amp;gt;&amp;lt;![CDATA[ &amp;lt;div class=&amp;quot;_floating_window&amp;quot; id=&amp;quot;_apride&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;_floating_mc&amp;quot; id=&amp;quot;_floating_mc&amp;quot;&amp;gt;&amp;lt;form action=&amp;quot;javascript:void(0);&amp;quot;&amp;gt;&amp;lt;dl&amp;gt;&amp;lt;dt id=&amp;quot;_es_pageElement_field&amp;quot;&amp;gt;pageElement&amp;lt;dd&amp;gt;&amp;lt;span id=&amp;quot;_es_pageElement_color&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;_es_selected_color&amp;quot; src=&amp;quot;http://labs.gmo.jp/blog/ku/pixelcube.png&amp;quot; /&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;input class=&amp;quot;apride_input&amp;quot; id=&amp;quot;_es_pageElement&amp;quot; name=&amp;quot;_es_pageElement&amp;quot; type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&amp;lt;dt id=&amp;quot;_es_insertBefore_field&amp;quot;&amp;gt;insertBefore&amp;lt;dd&amp;gt;&amp;lt;span id=&amp;quot;_es_insertBefore_color&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;_es_selected_color&amp;quot; src=&amp;quot;http://labs.gmo.jp/blog/ku/pixelcube.png&amp;quot; /&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;input class=&amp;quot;apride_input&amp;quot; id=&amp;quot;_es_insertBefore&amp;quot; name=&amp;quot;_es_insertBefore&amp;quot; type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&amp;lt;dt id=&amp;quot;_es_nextLink_field&amp;quot;&amp;gt;nextLink&amp;lt;dd&amp;gt;&amp;lt;span id=&amp;quot;_es_nextLink_color&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;_es_selected_color&amp;quot; src=&amp;quot;http://labs.gmo.jp/blog/ku/pixelcube.png&amp;quot; /&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;input class=&amp;quot;apride_input&amp;quot; id=&amp;quot;_es_nextLink&amp;quot; name=&amp;quot;_es_nextLink&amp;quot; type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&amp;lt;dt&amp;gt;&amp;lt;span&amp;gt;&amp;lt;img src=&amp;quot;http://labs.gmo.jp/blog/ku/pixelcube.png&amp;quot; /&amp;gt;&amp;lt;/span&amp;gt;url&amp;lt;dd&amp;gt;&amp;lt;input class=&amp;quot;apride_input&amp;quot; id=&amp;quot;_es_url&amp;quot; name=&amp;quot;_es_url&amp;quot; type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&amp;lt;/dl&amp;gt;&amp;lt;input id=&amp;quot;_apride_test&amp;quot; name=&amp;quot;_apride_test&amp;quot; type=&amp;quot;submit&amp;quot; value=&amp;quot;apply this&amp;quot; /&amp;gt; &amp;lt;input id=&amp;quot;_apride_generate&amp;quot; name=&amp;quot;_apride_generate&amp;quot; type=&amp;quot;submit&amp;quot; value=&amp;quot;generate&amp;quot; /&amp;gt; &amp;lt;input id=&amp;quot;_apride_strict&amp;quot; name=&amp;quot;_apride_strict&amp;quot; type=&amp;quot;checkbox&amp;quot; value=&amp;quot;1&amp;quot; /&amp;gt;strict &amp;lt;a href=&amp;quot;http://swdyh.infogami.com/autopagerize&amp;quot; style=&amp;quot;color: black;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;infogami&amp;lt;/a&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;textarea id=&amp;quot;_apride_generated_code&amp;quot;&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div id=&amp;quot;_floating_titlebar&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;_floating_tl&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;_floating_tc&amp;quot; id=&amp;quot;_apride_titlebar&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;_floating_close&amp;quot; id=&amp;quot;_apride_close&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;javascript:void(0);&amp;quot; id=&amp;quot;_floating_closewindow&amp;quot;&amp;gt;&amp;lt;img alt=&amp;quot;close this window&amp;quot; src=&amp;quot;http://labs.gmo.jp/blog/ku/bookmarklet/close.gif&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;_floating_logo&amp;quot;&amp;gt;AutoPagerize IDE 0.0.5&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;_floating_tr&amp;quot; id=&amp;quot;_floating_top_right&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;_floating_ml&amp;quot; id=&amp;quot;_floating_moddile_left&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;_floating_mr&amp;quot; id=&amp;quot;_floating_moddile_right&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;_floating_bl&amp;quot; id=&amp;quot;_floating_bottom_left&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;_floating_bc&amp;quot; id=&amp;quot;_floating_bottom_center&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;_floating_br&amp;quot; id=&amp;quot;_floating_bottom_right&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
 ]]&amp;gt;&amp;lt;/&amp;gt; );

		return div1;
	}
window.assert = window.trace = function (e) {
	if ( window.DEBUG_MODE ) {
		console.log(e);
	}
}

window.$ = function (id) { return document.getElementById(id); }
window.$F = function (id) {
	var e = $(id);
	return (e &amp;amp;&amp;amp; e.value) ? e.value : null;
}

window.get_classnames = function (e) {
	var classnames = { };
	e.className.split(/\s+/).forEach( function (name) {
		classnames[name] = 0;
	} );
	return classnames;
}
window.add_classname = function (e, classname) {
	var classnames = get_classnames(e);
	classnames[classname] = 0;
	var names = [];
	for ( i in classnames ) {
		names.push(i);
	}
	var i = e.className = names.join(&amp;quot; &amp;quot;);
	trace(&amp;quot;name: &amp;quot; + i + &amp;quot;/&amp;quot; + e.id );
}
window.remove_classname = function (e, classname) {
	var classnames = get_classnames(e);
	var names = [];
	for ( i in classnames ) {
		if ( i != classname )
			names.push(i);
	}
	e.className = names.join(&amp;quot; &amp;quot;);
}

window.exec_element_ready = function ( id, fn ) {
	var timer = setInterval( function () {
		if ( $(id) ) {
			clearInterval(timer);
			fn.apply(this, [$(id) ] );
		}
	}, 200);
}

String.prototype.surround = function (c) {
	if (c.length &amp;gt; 1 )
		return c[0] + this + c[1];
	else
		return c + this + c;
}
String.prototype.qq = function () { return this.surround('&amp;quot;&amp;quot;') }
String.prototype.q = function () { return this.surround(&amp;quot;''&amp;quot;) }

String.prototype.markup = function (tagname, attributes, pad) {
	pad = pad || '';

	var pairs = [ '' ];
	if ( attributes ) {
		for ( n in attributes ) {
			pairs.push( n + &amp;quot;=&amp;quot; + attributes[n].replace(/&amp;quot;/g, '&amp;amp;quot;').qq() );
		}
	}

	var str = this.toString();
	return ( str == '') ?  ( '&amp;lt;' + tagname + pairs.join(' ') + '/&amp;gt;' ) :
			( '{' + str.surround(pad) + '}' )
}

Array.prototype.collect = function (fn) {
	var ret = [];
	this.forEach( function(i) {
		ret.push( fn.call(this, i) );
	}.bind(this) );
	return ret;
};


Function.prototype.bind = function (scope) {
	var self = this;
	return function () {
		self.apply(scope, arguments);
	};
}


Function.prototype.bindAsEventListener = function(object) {
	var __method = this;
	return function(event) {
		return __method.call(object, event || window.event);
	}
}

Event.observe = function ( obj, eventname, fn, capture) {
	obj.addEventListener(eventname, fn, capture);
}
Event.stopObserving = function ( obj, eventname, fn, capture) { obj.removeEventListener(eventname, fn, capture); }

//
// copyed from autopagerize.user.js.
//
function getFirstElementByXPath(xpath, node) {
	var node = node || document
		var result = document.evaluate(xpath, node, null,
				XPathResult.FIRST_ORDERED_NODE_TYPE, null)
		// for search element
	//	if (DEBUG_MODE) {
	//		var rule = [&amp;quot;.match{border: 3px solid #f00}\n&amp;quot;,
	//		&amp;quot;.match:after{content:'&amp;quot;, xpath, &amp;quot;'}\n&amp;quot;].join('')
	//			GM_addStyle(rule)
	//			result.singleNodeValue.className =
	//			result.singleNodeValue.className + ' match'
	//	}
	return result.singleNodeValue ? result.singleNodeValue : null
}
function createDocumentFragmentByString(str) {
	var range = document.createRange()
		range.setStartAfter(document.body)
		return range.createContextualFragment(str)
}

function createHTMLDocumentByString(str) {
	var html = str.replace(/&amp;lt;!DOCTYPE.*?&amp;gt;/, '').replace(/&amp;lt;html.*?&amp;gt;/, '').replace(/&amp;lt;\/html&amp;gt;.*/, '')
	var htmlDoc  = document.implementation.createDocument(null, 'html', null)
	var fragment = createDocumentFragmentByString(html)
	htmlDoc.documentElement.appendChild(fragment)
	return htmlDoc
}


function getElementsByXPath(xpath, node) {
    var node = node || document
    var nodesSnapshot = document.evaluate(xpath, node, null,
        XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)
    var data = []
    for (var i = 0; i &amp;lt; nodesSnapshot.snapshotLength; i++) {
        data.push(nodesSnapshot.snapshotItem(i))
    }
    return (data.length &amp;gt;= 1) ? data : null
}



/**
 * @param id  most outer elements id.
 * @param elements id which works as title bar.
 * @return
 **/
function FloatingWindow(id, titlebar_id, resizebar_id, closewindow_id, ui_setup_fn, init_callback, close_callback) {
	this.window_id = id;
	this.titlebar_id =  titlebar_id  || id + &amp;quot;_top_center&amp;quot;;
	this.resizebar_id = resizebar_id || id + &amp;quot;_bottom_right&amp;quot; ;
	this.closewindow_id = closewindow_id || id + &amp;quot;_closewindow&amp;quot; ;
	this.ev = {};

	this.dragging = false;
	this.last_pos = null;

	this.minimumX = null;
	this.minimumY = null;

	this.event_handler = {};

	this.on_init = init_callback || function () {};
	this.ui_setup_fn = ui_setup_fn || function () {};
	this.on_close = close_callback || function () {};

	this.initialize();
}

FloatingWindow.prototype.show_loading = function (show_or_hide) {
	if (show_or_hide) {
		this.div_loading = document.createElement('div');
		this.div_loading.style.position = &amp;quot;fixed&amp;quot;;
		this.div_loading.style.right = &amp;quot;0px&amp;quot;;
		this.div_loading.style.top = &amp;quot;0px&amp;quot;;
		this.div_loading.style.background = &amp;quot;red&amp;quot;;
		this.div_loading.style.fontWeight = &amp;quot;bold&amp;quot;;
		this.div_loading.style.textColor = &amp;quot;white&amp;quot;;
		var text = document.createTextNode(&amp;quot;Loading...&amp;quot;);
		this.div_loading.appendChild( text );
		document.body.appendChild(this.div_loading);
	} else {
		if ( this.div_loading ) {
			document.body.removeChild( this.div_loading );
			this.div_loading = null;
		}
	}
}

FloatingWindow.prototype.onclose = function () {
	var close_window = $(this.closewindow_id);
	var resize = $(this.resizebar_id);
	var handle = $(this.titlebar_id);
	if ( close_window ) 
		Event.stopObserving( close_window, &amp;quot;click&amp;quot;, this.event_handler.close_window);
	if ( resize )
		Event.stopObserving(resize, &amp;quot;mousedown&amp;quot;, this.event_handler.resize);
	if ( handle ) {
		Event.stopObserving(handle, &amp;quot;selectstart&amp;quot;, this.event_handler.selectstart);
		Event.stopObserving(handle, &amp;quot;mousedown&amp;quot;, this.event_handler.handle);
	}
	Event.stopObserving(window.document, &amp;quot;mouseup&amp;quot;, this.event_handler.document_moseup);
	Event.stopObserving(window.document, &amp;quot;mousemove&amp;quot;, this.event_handler.document_mosedown);

	var me = $(this.window_id);
	me.parentNode.removeChild( me );

	return true;
}

FloatingWindow.prototype.initialize = function () {
	this.show_loading(true);
	// disable creating hatolet window for debugging purpose.
	if ( ! window.__debug_disable_folating_window ) {
		var e = this.ui_setup_fn.call(this);
		if (e)
			window.document.body.appendChild(e);
	}

	var timerid = setInterval( function () {
		if ( this.initialize_callback() ) {
			this.on_init();

			var close_window = $(this.closewindow_id);
			if ( close_window ) {
				Event.observe( close_window, &amp;quot;click&amp;quot;,
					this.event_handler.close_window = function () {
					this.on_close.call(this);
					this.onclose();
					return true;
				}.bind(this) );
				close_window.onclick = function () {
				}.bind(this);
			}

			clearInterval(timerid);
		}
		this.show_loading(false);
	}.bind(this), 400);

}

FloatingWindow.prototype.initialize_callback = function () {
	var resize = $(this.resizebar_id);
	var handle = $(this.titlebar_id);
	if (handle == null ) {
		trace(this.titlebar_id + &amp;quot; not found.&amp;quot;);
		return false;
	} else {
		if ( resize )  {
			Event.observe(resize, &amp;quot;mousedown&amp;quot;,
				this.event_handler.resize = this.onmousedown.bind(this) );
		}
		if ( handle ) {
			Event.observe(handle, &amp;quot;mousedown&amp;quot;,
				this.event_handler.handle = this.onmousedown.bind(this) );
			Event.observe(handle, &amp;quot;selectstart&amp;quot;, this.event_handler.selectstart = function(ev) {
				trace(&amp;quot;stop&amp;quot;);
				ev = ev || window.ev;
				window.stop_event(ev);
				return false;
			} );
		}
		Event.observe(window.document, &amp;quot;mouseup&amp;quot;,
			this.event_handler.document_moseup = this.onmouseup.bind(this) );
		Event.observe(window.document, &amp;quot;mousemove&amp;quot;,
			this.event_handler.document_mosedown = this.onmousemove.bind(this) );
		return true;
	}
};

FloatingWindow.prototype.onmousemove = function (ev) {
	if ( this.dragging ) {
		if (window.event) {
			ev = window.event;
		}
		var pos = {
			x: ev.screenX,
			y: ev.screenY
		};
		var diffX = pos.x - this.last_pos.x;
		var diffY = pos.y - this.last_pos.y;

		var w = $(this.window_id);

		if ( this.dragging.id == this.resizebar_id ) {
			var  resize = function (w, change_height_only) {
				var x = parseInt( w.style.width );
				var y = parseInt( w.style.height );
				if (isNaN(x))
					x = w.clientWidth;
				if (isNaN(y))
					y = w.clientHeight;

				//x += diffX;
				//y += diffY;
				//if ( this.minimumX &amp;amp;&amp;amp; x &amp;lt; this.minimumX ) x = this.minimumX;
				//if ( this.minimumY &amp;amp;&amp;amp; y &amp;lt; this.minimumY ) y = this.minimumY;

				w.style.height = (y + diffY) + &amp;quot;px&amp;quot;;
				if ( ! change_height_only )
					w.style.width = (x + diffX) + &amp;quot;px&amp;quot;;
			}
			var objs = [ w ,
				$( this.window_id + &amp;quot;_mc&amp;quot;),
				$( this.window_id + &amp;quot;_rc&amp;quot;),
				$( this.window_id + &amp;quot;_bc&amp;quot;),
];
			for ( var i = 0; i &amp;lt; objs.length; i++) {
				if (objs[i])
					resize( objs[i]  );
			}
			var objs = [ 
				$(this.window_id + &amp;quot;_ml&amp;quot;),
				$(this.window_id + &amp;quot;_mr&amp;quot;),
				//$(this.window_id + &amp;quot;_mc&amp;quot;),
];
			for ( var i = 0; i &amp;lt; objs.length; i++) {
				resize( objs[i], true  );
			}



		}

		if ( this.dragging.id == this.titlebar_id ) {
			var top = parseInt( w.style.top );
			var left = parseInt( w.style.left );
			if (isNaN(top))
				top = w.offsetTop;
			if (isNaN(left))
				left = w.offsetLeft;

			w.style.top = (top + diffY ) + &amp;quot;px&amp;quot;;
			w.style.left = (left + diffX ) + &amp;quot;px&amp;quot;;
		}


		this.last_pos = pos;
		window.stop_event(ev);
	}
	return true;
}
FloatingWindow.prototype.onmousedown = function (ev) {
	if (window.event) {
		ev = window.event;
	}

	this.last_pos = {
		x: ev.screenX,
		y: ev.screenY
	};
	
	//window.stop_event(ev);
	this.dragging = ev.currentTarget;

	
	return true;
}
FloatingWindow.prototype.onmouseup = function (ev) {
	if (window.event) {
		ev = window.event;
	}
	if ( this.dragging ) {
		window.stop_event(ev);
		this.dragging = null;
	}
	return true;
}

window.stop_event = function ( ev ) {
	if( document.all ){
		window.event.cancelBubble = true;
		window.event.returnValue = false;
	} else {
		if (ev) {
			ev.preventDefault();
			ev.stopPropagation()
				// for safari.
				// stopPropagation() is defined but do nothing on safari.
				this['on' + ev.type] = function() { return false };
		}
	}
}



ElementSelector = function (container_id) {
	this.matched_elements = [];
	this.container_id = container_id;
	this.item_suffix = 0;
	this.styles_overwrite = [&amp;quot;outlineWidth&amp;quot;, &amp;quot;outlineStyle&amp;quot;, &amp;quot;outlineColor&amp;quot;, &amp;quot;backgroundColor&amp;quot;];

	this.hijack_events = [&amp;quot;click&amp;quot;, &amp;quot;mouseover&amp;quot;, &amp;quot;mouseout&amp;quot;];
	this.event_handlers = {};
	this.selected_elements_xpath = {};

	this.data_mode = &amp;quot;rss&amp;quot;;

	this.active_field_index = 0;

	if ( this.get_fields ) {
		this.fields =  this.get_fields();
	} else {
		trace(&amp;quot;you need define ElementSelector.prototype.get_fields().&amp;quot;);
	}
}

ElementSelector.get_incetance = function (id) {
	return ElementSelector.singleton ? ElementSelector.singleton : new ElementSelector(id) ;
}


// elements_group_name: id of input which contains xpath expression.
ElementSelector.prototype.refresh_selected_elements = function (elements_group_name, xpath ) {
	if ( this.selected_elements_xpath[elements_group_name] ) {
		this.selected_elements_xpath[elements_group_name].forEach( function (e) {
			this.deselect(e);
		}.bind(this) );
		this.selected_elements_xpath[elements_group_name] = null;
	}

	if (xpath == '' ) {
		return;
	}
	
	var nodes;

	try {
		nodes = ElementSelector.XPath.evaluate(xpath);
		this.selected_elements_xpath[elements_group_name] = nodes;
		if ( this.on_xpath_match )  
			this.on_xpath_match(elements_group_name);


		nodes.forEach( function (e) {
			this.select(e);
		}.bind(this) );

		trace( &amp;quot;new!&amp;quot; + &amp;quot;(&amp;quot; + nodes.length + &amp;quot;)&amp;quot; + xpath );
	} catch(e) {
		if ( this.on_xpath_exception )  
			this.on_xpath_exception(elements_group_name, e);
	}

}

ElementSelector.prototype.set_active_field = function (active_id) {
	for ( var i = 0; i &amp;lt; this.fields.length; i++ ) {
		var id = this.fields[i];
		if ( id == active_id ) {
			this.active_field_index = i;
			break;
		}
	}
	this.refresh_active_field();
}

ElementSelector.prototype.hijack = function (parent_node) {
	this.hijack_events.forEach ( function (event_name) {
		var handler = this[&amp;quot;on&amp;quot; + event_name].bindAsEventListener(this);
		this.event_handlers[event_name] = handler;
		Event.observe( document, event_name, handler, false );
	}.bind(this) );
	this.refresh_active_field();

}



ElementSelector.prototype.refresh_active_field = function () {
	var fields = this.get_fields();
	var active_id = fields[this.active_field_index];

	for ( var i = 0; i &amp;lt; fields.length; i++ ) {
		var e = $(fields[i] + '_field');
		trace(fields[i] + '_field' + &amp;quot;/&amp;quot; );
		if ( i == this.active_field_index ) {
			add_classname(e, '_es_active_field');
		} else {
			remove_classname(e, '_es_active_field');
		}
	}
}


ElementSelector.prototype.restore_event_handlers = function () {
	this.hijack_events.forEach ( function (event_name) {
		var handler = this.event_handlers[event_name];
		Event.stopObserving( document, event_name, handler, false );
	}.bind(this) );
}

ElementSelector.prototype.dehilight = function () {
	for ( var i = 0; i &amp;lt; this.hilighted.length; i++ ) {
		var e = this.hilighted[i];
		e.style.outline = &amp;quot;&amp;quot;;
	}
	this.hilighted = [];
}

ElementSelector.get_index_color = function (n) {
	// Citrus!
	// http://kuler.adobe.com/index.cfm#themeID/34878
	var rgb = [
		&amp;quot;rgb(240, 225, 76)&amp;quot;,
		&amp;quot;rgb(255, 187, 32)&amp;quot;,
		&amp;quot;rgb(250, 123, 18)&amp;quot;,
		&amp;quot;rgb(232, 83, 5)&amp;quot;,
		&amp;quot;rgb(89, 204, 13)&amp;quot;,
	];
	var i = n % rgb.length;

	return rgb[i];
}
ElementSelector.style_matched = function (e ) {
	
	var c = ElementSelector.get_index_color(e.__hatolet_ui_status.field_id);

	ElementSelector.apply_style( e, {
		'outlineWidth': '2px',
		'outlineStyle': 'dotted',
		'outlineColor': &amp;quot;#e72d89&amp;quot;,
		'backgroundColor': c
	} );
}

ElementSelector.style_selected = function (e) {
	
	var c = ElementSelector.get_index_color(e.__hatolet_ui_status.field_id);

	ElementSelector.apply_style( e, {
		'outlineWidth': '2px',
		'outlineStyle': 'dotted',
		'outlineColor': &amp;quot;#0063dc&amp;quot;,
		'backgroundColor': c
	} );
}

ElementSelector.prototype.blur = function () {
	e = this.focused;

	if ( this.focused == null )
		return;

	this.focused = null;
	e.__hatolet_ui_status.focused = false;


	ElementSelector.update_style(e);
}
ElementSelector.update_style = function (e) {
	if ( e.__hatolet_ui_status.selected ) {
		ElementSelector.style_selected(e);
	} else if ( e.__hatolet_ui_status.matched ) {
		ElementSelector.style_matched(e);
	} else if ( e.__hatolet_ui_status.focused ) {
		ElementSelector.apply_style( e, {
			'outlineWidth': '2px',
			'outlineStyle': 'dashed',
			'outlineColor': &amp;quot;#0063dc&amp;quot;
		} );
	} else {
		ElementSelector.restore_style(e);
	}
}

ElementSelector.prototype.focus = function (e) {
	if ( typeof e.__hatolet_ui_status == &amp;quot;undefined&amp;quot; )
		e.__hatolet_ui_status = {};
	e.__hatolet_ui_status.focused = true;
	ElementSelector.update_style(e);
	this.focused = e;
}

ElementSelector.restore_style = function (e, styles) {
	var styles_to_restore = styles || [
			'outlineWidth',
			'outlineStyle',
			'outlineColor',
			'backgroundColor'
	];
	for ( var i = 0; i &amp;lt; styles_to_restore.length; i++ ) {
		var n =  styles_to_restore[i];
		var v = e._hatolet_style_original[ n ] ;
		if (typeof v != &amp;quot;undefined&amp;quot; )
			e.style[n] = v;
	}
}
ElementSelector.apply_style = function (e, styles) {
	for( n in styles ) {
		if ( typeof e._hatolet_style_original == &amp;quot;undefined&amp;quot; )
			e._hatolet_style_original = {};
			
		if ( typeof e._hatolet_style_original[n] == &amp;quot;undefined&amp;quot; ) {
			e._hatolet_style_original[n] = e.style[n];
		}
		e.style[n] = styles[n];
	}
	//this.focused = e;
}

ElementSelector.prototype.deselect = function (node) {
	node.__hatolet_ui_status.selected = false;
	var field_id = node.__hatolet_ui_status.field_id;
	node.__hatolet_ui_status.field_id = null;

	if ( this.remove )
		this.remove(field_id);

	ElementSelector.restore_style(node);
}
ElementSelector.prototype.select = function (node) {
			var field_id = this.item_suffix;

			if ( typeof node.__hatolet_ui_status == 'undefined' ) {
				node.__hatolet_ui_status = {};
			}


			node.__hatolet_ui_status.selected = true;
			node.__hatolet_ui_status.field_id = field_id;
			
			//var path_array = ElementSelector.XPath.get_path_from_element(node);
			//this.add(field_id, node, path_array);
			var matched_elements_hashkey = null;
			ElementSelector.style_selected(node);
}

// obsolete.
/*
ElementSelector.prototype.toggle = function (node) {
		if ( node.__hatolet_ui_status.selected ) {
			this.deselect(node);
		} else {
			this.item_suffix++;

			// this.select(node);

			if ( this.add )
				matched_elements_hashkey = this.add(node);

			this.selected_elements_xpath[matched_elements_hashkey] = [ node ];
		}
}
*/

ElementSelector.prototype.onclick = function (ev) {
	{
		ev = window.event || ev;
		var node = ev.target;

		// if target is submit button.
		if ( node.tagName.toLowerCase() == &amp;quot;input&amp;quot; &amp;amp;&amp;amp;
			( node.type.toLowerCase() ==&amp;quot;submit&amp;quot; ||
				node.type.toLowerCase() ==&amp;quot;checkbox&amp;quot; ||
				node.type.toLowerCase() ==&amp;quot;text&amp;quot; )
		) {
			trace(&amp;quot;form element.&amp;quot; + node.type.toLowerCase() );
			return true;
		}

		// is descendant of div hatolet.
		//if ( node.className != &amp;quot;__hatolet_event_handler&amp;quot; ) {
			var e = node;
			while ( e ) {
				if ( e.id == this.container_id ) {
					if ( node.tag == 'a' ) {
						return true;
					}
					trace(&amp;quot;in apride. discard event.&amp;quot;);
					trace( node );
					return false;
				}
				e = e.parentNode;
			}
		//}

		this.item_suffix++;
		if ( this.active_field_index &amp;lt; this.fields.length ) {
			ret = this.add(node, this.fields[this.active_field_index] );
			this.refresh_selected_elements( ret.id, ret.xpath );
			this.active_field_index++;
			this.refresh_active_field( );
		}


		ev.preventDefault();
		ev.stopPropagation()
	}

	return false;
}
ElementSelector.prototype.onmouseout = function (ev) {
	if (window.event) {
		ev = window.event;
	}

	this.blur( );
	e = this.focused;

	if ( this.focused == null )
		return;

	this.focused = null;
	e.__hatolet_ui_status.focused = false;

	
	window.stop_event(ev);
	//return false;
}
ElementSelector.prototype.is_ascendant = function (e) {
	var hatolet_root = $(this.container_id);
	var node = e;

	while ( node != null ) {
		if (node == hatolet_root )
			return true;
		node = node.parentNode;
	}
	return false;
}
ElementSelector.prototype.onmouseover = function (ev) {
	if (window.event) {
		ev = window.event;
	}

	var target = ev.target;

	if ( this.focused != target ) {
		// if element is descendant of hatolet, dont change styles.
		if ( ! this.is_ascendant(target) ) {
			this.focus( target );
		}
	}

	window.stop_event(ev);
	//return false;
}


ElementSelector.prototype.show_generated_list_elements = function (prefix, is_show) {
	for ( var i = 0; i &amp;lt; this.item_suffix; i++ ) {
		var e = $(prefix + i);

		if (e == null)
			continue;
		
		e.style.display = (is_show) ? &amp;quot;&amp;quot; : &amp;quot;none&amp;quot;;
	}
}
ElementSelector.prototype.onchange_datatype = function (ev) {
	if (window.event) {
		ev = window.event;
	}
	var s = ev.target;
	var i = s.selectedIndex;
	var v = s.options[i].value;

	var is_rss = ( v == &amp;quot;RSS&amp;quot; );
	this.show_generated_list_elements(&amp;quot;hatolet_window_datatype&amp;quot;, (v == &amp;quot;RSS&amp;quot;) );
	this.show_generated_list_elements(&amp;quot;hatolet_window_fieldname&amp;quot;, ( v == &amp;quot;XML&amp;quot; ) );

}

ElementSelector.prototype.mark_matched = function (matches) {
	//this.matched_elements = [];
	matches.forEach( function ( m ) {
		var items_per_entry = m.length;
		for ( var i = 0; i &amp;lt; items_per_entry; i++ ) {
			m[i].forEach ( function (e) {
				if ( typeof e.__hatolet_ui_status == &amp;quot;undefined&amp;quot; ) {
					e.__hatolet_ui_status = {};
				}
				e.__hatolet_ui_status.matched = true;
				e.__hatolet_ui_status.field_id = i;
				ElementSelector.update_style(e);
			} );
		}
	} );
}

ElementSelector.prototype.alert = function (e) {
	alert(e);
}

/**
 *
 *  ElementSelector.XPath
 *
 **/

ElementSelector.XPath = function () {
}

ElementSelector.XPath.attributes_for_predicate = [
		&amp;quot;border&amp;quot;,
//		&amp;quot;bgColor&amp;quot;,
//		&amp;quot;cellPadding&amp;quot;,
//		&amp;quot;cellSpacing&amp;quot;,
		&amp;quot;height&amp;quot;,
		&amp;quot;width&amp;quot;,
		&amp;quot;class&amp;quot;,
		&amp;quot;id&amp;quot;
];

ElementSelector.XPath.get_predicates = function (e) {
	var names = ElementSelector.XPath.attributes_for_predicate;
	var conds = {};
	for ( var j = 0; j &amp;lt; names.length; j++ ) {
		var predicate_name = names[j];
		var propname = predicate_name;
		if ( predicate_name == &amp;quot;class&amp;quot; ) {
			propname = &amp;quot;className&amp;quot;;
		}
		if ( e[ propname ] ) {
			conds[ predicate_name ] = e[propname];
		}
	}
	return conds;
}
/**
 * get xpath array from DOM element.
 * @param
 * @return
 **/
ElementSelector.XPath.get_path_from_element = function (e) {
	var path = [ ];
	do {
		var tagname = e.tagName.toLowerCase();

		var index = null;

		// we can identify the element only with id if it is specified.
		// no need further information.
		var conds = ElementSelector.XPath.get_predicates(e);
		var has_id = ( (conds &amp;amp;&amp;amp; (typeof conds.id)) != 'undefined' );

		if ( has_id ) {
			conds = { id: conds.id };
		} else {
			index = ElementSelector.XPath._get_sibling_number(e);
		}
		var p = new ElementSelector.XPath.Path(tagname, index, conds, e);
		path.unshift( p );

		if ( has_id ) {
			break;
		}

		e = e.parentNode;
	} while ( e.parentNode );
	return path;
}


/**
 * construct xpath expression from array.
 * @param
 * @return
 *:*/
ElementSelector.XPath.prototype.format_expression = function (is_strict) {
	var s = [ ];
	var path = this.path;
	for ( var i = 0; i &amp;lt; path.length; i++ ) {
		var x = path[i];
		s.push( x.format_expression(is_strict) ); 
	}
	return s.join(&amp;quot;/&amp;quot;);
}

ElementSelector.XPath.evaluate = function (xpath, context) {

	context = context || document;
	return getElementsByXPath(xpath, context);
}

/**
 *
 *  ElementSelector.XPath.Path
 *
 **/

ElementSelector.XPath.Path = function (tagname, index, conds, element) {
	this.tagname = tagname;
	this.index = index;
	this.conds = conds;
	this.element = element;
}
ElementSelector.XPath.Path.prototype.from_string = function (s) {
	if ( s.match( /^(\w+)(\[(.+?)\])*/ ) ) {
		this.tagname = RegExp.$1;
		this.index = RegExp.$3;
	} else {
		// empty path.
		this.tagname = &amp;quot;&amp;quot;;
		this.index = null;
	}
}
ElementSelector.XPath.Path.prototype.relax = function () {
	this.index = null;
}

ElementSelector.XPath.Path.prototype.equal = function (path) {
	trace ( this.tagname + &amp;quot;==&amp;quot;+ path.tagname );
			 trace( this.index +&amp;quot;==&amp;quot;+ path.index );
	return ( this.tagname == path.tagname ) &amp;amp;&amp;amp;
			 ( this.index == path.index );
}
ElementSelector.XPath.Path.prototype.format_predicates = function (is_strict) {
	var conds = [];
	for ( var name in this.conds ) {
		if ( is_strict || (name == 'class' || name == 'id' ) ) 
			conds.push( &amp;quot;@&amp;quot; + name + &amp;quot;=&amp;quot; + String( this.conds[name] ).qq() );
	}
	return ( conds.length &amp;gt; 0 ) ?  conds.join(&amp;quot; and &amp;quot;).surround(&amp;quot;[]&amp;quot;) : '';
}
ElementSelector.XPath.Path.prototype.format_expression = function (is_strict) {
	var s = &amp;quot;&amp;quot;;

	is_strict = is_strict || this.strict;

	s = this.tagname;
	if ( this.index != null ) {
		var index_string = new String(this.index);
		s += index_string.surround(&amp;quot;[]&amp;quot;);
	}
	if ( is_strict ) {
		s += this.format_predicates(is_strict);
	}
	return s;
}


/**
 * get_path_from_element() support function.
 * @param
 * @return
 **/
ElementSelector.XPath._get_sibling_number = function (e) {
	var tagname = e.tagName.toLowerCase();

	var index = 1; 
	var children = e.parentNode.childNodes;
	for ( var i = 0; i &amp;lt; children.length; i++) {
		var c = children[i];
		if ( c == e )
			break;
		else if ( c.tagName &amp;amp;&amp;amp; c.tagName.toLowerCase() == tagname )
			index++;
	}
	return index;
}




// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html

APRIDE = function () {
	this.inserted_items = [] ;
}

APRIDE.get_incetance = function () {
	return ( APRIDE.singleton ) ? APRIDE.singleton : ( APRIDE.singleton = new APRIDE());
}

ElementSelector.prototype.get_fields = function () {
	return [
		'_es_pageElement',
		'_es_insertBefore',
		'_es_nextLink'
	];
}
ElementSelector.prototype.remove = function (field_id) {
	
}

ElementSelector.prototype.on_xpath_match = function (id ) {
	remove_classname($(id), '_es_text_error');
}
ElementSelector.prototype.on_xpath_exception = function (id, exception_object) {
	trace(exception_object);
	add_classname($(id), '_es_text_error');
}

ElementSelector.prototype.add = function (node, id) {
	var elements = [
		'_es_pageElement',
		'_es_insertBefore',
		'_es_nextLink'
	];
	
	var path = ElementSelector.XPath.get_path_from_element(node);

	if ( id == '_es_nextLink' ) {
		// nextLink element must be a anchor tag.
		while ( path.length &amp;gt; 1 &amp;amp;&amp;amp; path[ path.length - 1].tagname != 'a' ) {
			path.pop();
		}
	}

	// remove html and body.
	// it brings some trouble when applying xpath to the next page document.
	while ( path.length &amp;gt; 0 &amp;amp;&amp;amp; ( path[0].tagname == 'html' || path[0].tagname == 'body' ) ) {
		path.shift();
	}

	if ( path.length == 0 ) {
		trace( &amp;quot;selected field does not contain any anchor tags.&amp;quot;);
		return;
	}

	var e = $(id + '_color' );
	e.style.background = ElementSelector.get_index_color( this.item_suffix );

	var is_strict = $('_apride_strict').checked;

	ElementSelector.XPath.is_strict = true;

	var expressions = path.collect( function (d) {
		return  d.tagname + d.format_predicates( is_strict );
	} );

	var xpath = '//' + expressions.join('/');
	$(id).value = xpath;

	return { id: id, xpath: xpath };
}

/**
 * get property names these can use for xpath expression.
 * @param
 * @return
 **/
function get_next_url() {
	var xpath = $('_es_nextLink').value;
	var res = getFirstElementByXPath(xpath, document);

	if ( res ) {
		return res.href;
	} else {
		return null;
	}
}

// elements have 3 state flags. 
// pointed		mouse cursor is inside of element.
// selected		
// 
function onreadystatechange (req) {

	if (req.readyState == 4) {
			// only if &amp;quot;OK&amp;quot;
		if (req.status == 200) {
			trace(&amp;quot;ok&amp;quot;);
			// ...processing statements go here...
			var document_next = createHTMLDocumentByString( req.responseText ) ;
			//window.dn = document_next;

			var page_element_xpath = $F('_es_pageElement');
			var nextpages = getElementsByXPath(page_element_xpath, document_next);
			trace(&amp;quot;nextpage: &amp;quot; + req._requested_url);
			if (  nextpages ) {
				trace(nextpages);
			} else {
				alert(&amp;quot;nextpages not found.&amp;quot;);
				trace(document_next);
				trace(req.responseText);
				window.document_next = document_next;
				return;
			} 
			var thispage = getFirstElementByXPath(page_element_xpath, document);

			trace(&amp;quot;thispage: &amp;quot; + page_element_xpath);
			trace(typeof thispage);
			if ( thispage ) {
				trace(thispage);
			} else {
				alert(&amp;quot;thispage not found.&amp;quot;);
				return;
			}

			var insert_before_xpath = $F('_es_insertBefore');
			var insert_point = getFirstElementByXPath(insert_before_xpath, document);

			var apride = APRIDE.get_incetance();
			apride.inserted_items = nextpages;
			assert( apride.inserted_items == null );

			nextpages.forEach( function ( i ) {
				insert_point.parentNode.insertBefore( i, insert_point );
			} );


			//thispage.parentNode.appendChild(nextpages);
			
		} else {
		trace(&amp;quot;There was a problem retrieving the XML data:\n&amp;quot; +
			req.statusText);
		}
	}

}

function exec_once () {
	try {
		var container_id = &amp;quot;_apride&amp;quot;;
		// prevent creating hatolet window multiple times.
		if ( ! $(container_id) ) {
			
			var w = new FloatingWindow(container_id, container_id + &amp;quot;_titlebar&amp;quot;, null, container_id + &amp;quot;_close&amp;quot;,
				function() { // html generator.
					return dirty_generated_code();
				} , function () { // initializer.
					var es = ElementSelector.get_incetance(container_id);
					APRIDE.es = es;
					es.hijack();
					
					[&amp;quot;_es_pageElement&amp;quot;, &amp;quot;_es_nextLink&amp;quot;, &amp;quot;_es_insertBefore&amp;quot;].forEach( function (id) {
						Event.observe($(id), 'blur', function () {
							var xpath = $(id).value;
							
							if ( $(id).__apride_last_xpath ) {
								if ( $(id).__apride_last_xpath == xpath ) {
									return;
								}
							}
							$(id).__apride_last_xpath = xpath;

							// deselect previous selected elements.
							var matched = this.selected_elements_xpath[id];
							if ( matched ) {
								matched.forEach( function (e) {
									this.deselect(e);
								}.bind(this) );
								this.selected_elements_xpath[id] = [];
							}

							// select newly matched elements.
							es.refresh_selected_elements( id, xpath );
						}.bind(this) );
						Event.observe($(id), 'focus', function () {
							es.set_active_field(id);
						}.bind(this) );
					}.bind(es) );

					var submit = $('_apride_test');
					Event.observe(submit, 'click', function (ev) {
						var ev = window.ev || ev;
						var url;
						try { 
						 url = get_next_url();
						} catch(e) {
							trace(e);
							return;
						}

						if ( url ) {
							var req = new XMLHttpRequest();
							req.onreadystatechange = function () {
								onreadystatechange(req);
							};
							req._requested_url = url;

							// remove previously inserted elements.
							var apride = APRIDE.get_incetance();
							if ( apride.inserted_items ) {
								apride.inserted_items.forEach( function (e) {
									e.parentNode.removeChild(e);
								} );
								apride.inserted_items = null;
							}

							req.open(&amp;quot;GET&amp;quot;, url, true);
							trace(url);
							req.send('');
						} else {
							es.alert('url has false value. maybe xpath is not correct.');
						}
						window.stop_event(ev);
						return false;
					} );

					var gen = $('_apride_generate');
					Event.observe(gen, 'click', function (ev) {
						var ev = window.ev || ev;

						var infogamiEscape = function (v) {
							return v.replace(/([_\*])/, &amp;quot;\\$1&amp;quot; );
						}

						var rules = [&amp;quot;url&amp;quot;, &amp;quot;nextLink&amp;quot;, &amp;quot;pageElement&amp;quot;, &amp;quot;insertBefore&amp;quot; ].map( function (id) {
							var v = infogamiEscape( $('_es_' + id).value );
							return id + &amp;quot;:    '&amp;quot; + v+&amp;quot;',&amp;quot;;
						} );
						rules.push( &amp;quot;exampleUrl:    '&amp;quot; +
							infogamiEscape(document.location.href)+&amp;quot;',&amp;quot; );
						var code = rules.join(&amp;quot;\n&amp;quot;);

						var value = '';

						var title_tags = document.getElementsByTagName('title');
						if ( title_tags.length &amp;gt; 0 ) {
							value = '/* ' + title_tags[0].textContent + '*/\n';
						}

						var textarea = $(container_id + '_generated_code');
						value += ( code.markup('textarea',{}, '\n') );

						textarea.value = value;
						textarea.style.display = 'block';

						window.stop_event(ev);
						return true;
					} );
				}, function () {  // onclose.
					APRIDE.es.restore_event_handlers();
				} );
			

		}

		exec_element_ready( '_es_url', function(e) {
			e.value = location.href;
		} );
	} catch (e) {
		trace(e);
	}
	return false;
}

exec_once();
&lt;/pre&gt;</content:encoded>
  </item>
</rdf:RDF>
