<?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/saitamanodoruji/rss">
    <link>https://let.hatelabo.jp/saitamanodoruji/rss</link>
    <description></description>
    <title>Bookmarklets from saitamanodoruji</title>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://let.hatelabo.jp/saitamanodoruji/let/hLHUpdyt-_4f"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/saitamanodoruji/let/gYC-yvbN0ab6YA"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/saitamanodoruji/let/gYC-xoPe5ca7Cw"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/saitamanodoruji/let/gYC-ycqi4YqwDw"/>
        <rdf:li rdf:resource="https://let.hatelabo.jp/saitamanodoruji/let/gYC-ycnvtMuLDg"/>
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://let.hatelabo.jp/saitamanodoruji/let/hLHUpdyt-_4f">
    <link>https://let.hatelabo.jp/saitamanodoruji/let/hLHUpdyt-_4f</link>
    <dc:date>2014-12-14T17:40:25Z</dc:date>
    <description>Cookie Clicker( http://orteil.dashnet.org/cookieclicker/ )にてクッキーを自動でクリックし続ける</description>
    <dc:creator>saitamanodoruji</dc:creator>
    <title>[Let] 自動クッキー叩き</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fsaitamanodoruji%2Flet%2FhLHUpdyt-_4f.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  Cookie Clicker( http://orteil.dashnet.org/cookieclicker/ )にてクッキーを自動でクリックし続ける
 * @include      http://orteil.dashnet.org/cookieclicker/*
 */

(function() {

  //// Auto Click the Big Cookie ////
  
  setInterval(function() {
    document.querySelector('#bigCookie').click();
  }, 1000/16); // meijin

  //// Auto Click Golden Cookies ////

  var isDisplayNone = function(node) {
    return document.defaultView.getComputedStyle(node).getPropertyValue('display') === 'none';
  }

  var $q = function(sel) {
    return Array.prototype.slice.call(document.querySelectorAll(sel));
  }

  // MutationObserver - Web API interfaces | MDN
  // https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver

  // select the target node
  var goldenCookie = document.querySelector('#goldenCookie');
  var seasonPopup = document.querySelector('#seasonPopup');

  // create an observer instance
  var popupObserver = new MutationObserver(function(mutations, observer) {
    mutations.forEach(function(mutation) {
      if (!isDisplayNone(mutation.target)) {
        var popupTxt = '';
        if (mutation.target.id == 'goldenCookie') {
          popupTxt += 'clicked Goleden Cookie, ';
        } else if (mutation.target.id == 'seasonPopup') {
          popupTxt += 'clicked Season Popup,   ';
        }
        mutation.target.click();
        $q('#notes &amp;gt; div').some(function(e) {
          if (!isDisplayNone(e) &amp;amp;&amp;amp; e.textContent !== 'Game saved') {
            popupTxt += e.textContent;
          }
          return popupTxt;
        });
        console.log([
          new Date().toLocaleFormat('%Y-%m-%d %T %Z'),
          popupTxt,
        ].join(', '));
      }
    });
  });

  // configuration of the observer:
  var observerConfig = { attributes: true, attributeFilter: ['style'] };

  //pass in the target node, as well as the observer options
  popupObserver.observe(goldenCookie, observerConfig);
  popupObserver.observe(seasonPopup, observerConfig);

  // later, you can stop observing
  // popupObserver.disconnect();

  console.log('loaded 自動クッキー叩き')

})();&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/saitamanodoruji/let/gYC-yvbN0ab6YA">
    <link>https://let.hatelabo.jp/saitamanodoruji/let/gYC-yvbN0ab6YA</link>
    <dc:date>2012-12-21T17:47:05Z</dc:date>
    <description>ウェブページをクリックで爆散する #RAC7889</description>
    <dc:creator>saitamanodoruji</dc:creator>
    <title>[Let] bakusan</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fsaitamanodoruji%2Flet%2FgYC-yvbN0ab6YA.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;bakusan&lt;/a&gt;&lt;pre&gt;/*
 * @title bakusan
 * @description ウェブページをクリックで爆散する #RAC7889
 * @include http://*
 * @license MIT License
 * @require JSDeferred
 */

// from
// http://reblogadventcalender7889.tumblr.com/kakusan

const delta_t = 50;
document.title += ' #クリックお願いします';

var treeWalker = document.createTreeWalker(
    document.body,
    NodeFilter.SHOW_ALL,
    { acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } },
    false
);
var nodes = [];
while(treeWalker.nextNode()) nodes.push(treeWalker.currentNode);

nodes.forEach(function(e){
  if (e.nodeName !== 'BODY')
    e.addEventListener('click', bakusan, true);
});

Array.prototype.slice.call(document.getElementsByTagName('a')).forEach(function(a){
  var color = getStyle(a, 'color');
  var textDecoration = getStyle(a, 'text-decoration');
  a.removeAttribute('href');
  a.style.color = color;
  a.style.textDecoration = textDecoration;
});

Array.prototype.slice.call(document.getElementsByTagName('input')).forEach(function(input){
  if (input.getAttribute('type') !== 'hidden')
    input.removeAttribute('type');
});

function bakusan(evt) {
  evt.cancelBubble = true;
  var tgt = evt.target;
  var txt = tgt.textContent || tgt.value || tgt.alt || tgt.title || tgt.name || tgt.className || tgt.id  || tgt.src || tgt.nodeName;
  if (txt.length &amp;gt; 50) txt = txt.match(/(.{50})/)[0] || txt;
  var fontSize = Number(getStyle(tgt, 'font-size').replace('px', '')) + 10;
  var fontFamily = getStyle(tgt, 'font-family');
  var fontWeight = getStyle(tgt, 'font-weight');
  var color = getStyle(tgt, 'color');
  var delta_theta = 2 * Math.PI / txt.length;
  var c = function() {;
    var rgb = ['#'];
    for (var i = 0; i &amp;lt; 3; i++) {
      rgb.push(Number(255*Math.random().toFixed(0)).toString(16)
        .replace(/^(\d)$/, '0$1'));
    }
    return rgb.join('');
  }
  var colors = [c(), c(), c()];
  var x = [];
  var y = [];
  txt.split('').forEach(function(t, n){
    var p = document.createElement('p');
    p.innerHTML = t;
    p.className = 'bakusan-letter';
    p.style.position = 'absolute';
    p.style.fontSize = fontSize + 'px';
    var theta_0 = 2 * Math.PI * Math.random();
    var r_0 = 6 * fontSize * (Math.random() - 0.5);
    var x_0 = Number(((evt.pageX - 10) + (r_0 * Math.cos(theta_0))).toFixed(0));
    var y_0 = Number(((evt.pageY - 20) + (r_0 * Math.sin(theta_0))).toFixed(0));
    p.style.left = x_0 + 'px';
    p.style.top = y_0 + 'px';
    var theta_n = (delta_theta * n) + ((delta_theta / 10) * (Math.random() - 0.5));
    var v_x = eval((4.5 * Math.cos(theta_n)).toPrecision(1)); //4.5 [pixel/msec]
    var v_y = eval((4.5 * Math.sin(theta_n)).toPrecision(1));
    var rgb = color.match(/rgb\((\d+), (\d+), (\d+)\)/);
    if (rgb &amp;amp;&amp;amp; rgb[1] == rgb[2] &amp;amp;&amp;amp; rgb[2] == rgb[3])
      p.style.color = colors[Math.floor(3 * Math.random())];
    else
      p.style.color = color;
    p.style.fontFamily = fontFamily;
    p.style.fontWeight = fontWeight;
    p.style.zIndex = '10000';

    x[n] = [];
    y[n] = [];
    for (var t_i = 0; t_i &amp;lt; 5; t_i++) {
      x[n].push([x_0 + v_x * t_i * delta_t, 'px'].join(''));
      y[n].push([y_0 + v_y * t_i * delta_t, 'px'].join(''));
    }

    D().Deferred.loop(5, function(t_i) {
      p.style.left = x[n][t_i];
      p.style.top = y[n][t_i];
      if (t_i == 4) p.parentNode.removeChild(p);
      return Deferred.wait(0.05);
    });

    document.getElementsByTagName('body')[0].appendChild(p);
  });
  tgt.parentNode.removeChild(tgt);
}

function getStyle(el,styleProp) {
  var camelize = function (str) {
    return str.replace(/\-(\w)/g, function(str, letter){
      return letter.toUpperCase();
    });
  };
  if (el.currentStyle) {
    return el.currentStyle[camelize(styleProp)];
  } else if (document.defaultView &amp;amp;&amp;amp; document.defaultView.getComputedStyle) {
    return document.defaultView.getComputedStyle(el,null)
                               .getPropertyValue(styleProp);
  } else {
    return el.style[camelize(styleProp)]; 
  }
}&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/saitamanodoruji/let/gYC-xoPe5ca7Cw">
    <link>https://let.hatelabo.jp/saitamanodoruji/let/gYC-xoPe5ca7Cw</link>
    <dc:date>2012-06-24T09:57:27Z</dc:date>
    <description>いったん j で通り過ぎたアイテムに k で戻ってから「すべて表示」すると、「すべて表示」したアイテムより下にあるアイテムのうち 1 回以上 current-element になったことのあるアイテムの位置がずれるやつを直す。^http://b\.hatena\.ne\.jp/[^/]+/(?:bookmark|favorite|interest)? で使う。</description>
    <dc:creator>saitamanodoruji</dc:creator>
    <title>[Let] はてブJKずれなくする</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fsaitamanodoruji%2Flet%2FgYC-xoPe5ca7Cw.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;はてブJKずれなくする&lt;/a&gt;&lt;pre&gt;/*
 * @title はてブJKずれなくする
 * @description いったん j で通り過ぎたアイテムに k で戻ってから「すべて表示」すると、「すべて表示」したアイテムより下にあるアイテムのうち 1 回以上 current-element になったことのあるアイテムの位置がずれるやつを直す。^http://b\.hatena\.ne\.jp/[^/]+/(?:bookmark|favorite|interest)? で使う。
 * @include http://b.hatena.ne.jp/*
 * @license MIT License
 */

Array.prototype.slice.call(
  document.querySelectorAll('.entry-comment .toggle-show')
).forEach(function(e) {
  e.setAttribute(
    'onclick',
    e.getAttribute('onclick')
    + 'Hatena.Bookmark.navigator.elementPositions.splice(Hatena.Bookmark.navigator.caretIndex+1,Hatena.Bookmark.navigator.elementPositions.length);'
  );
});&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/saitamanodoruji/let/gYC-ycqi4YqwDw">
    <link>https://let.hatelabo.jp/saitamanodoruji/let/gYC-ycqi4YqwDw</link>
    <dc:date>2012-03-27T03:22:03Z</dc:date>
    <description>up dir</description>
    <dc:creator>saitamanodoruji</dc:creator>
    <title>[Let] cd ..</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fsaitamanodoruji%2Flet%2FgYC-ycqi4YqwDw.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;cd ..&lt;/a&gt;&lt;pre&gt;/*
 * @title cd ..
 * @description up dir
 * @include http://*
 * @license MIT License
 */

a=location.pathname.split('/');
if(a.pop()=='')a.pop();
location.pathname=a.join('/');&lt;/pre&gt;</content:encoded>
  </item>
  <item rdf:about="https://let.hatelabo.jp/saitamanodoruji/let/gYC-ycnvtMuLDg">
    <link>https://let.hatelabo.jp/saitamanodoruji/let/gYC-ycnvtMuLDg</link>
    <dc:date>2012-03-26T12:25:45Z</dc:date>
    <description>up dir</description>
    <dc:creator>saitamanodoruji</dc:creator>
    <title>[Let] cd ..</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fsaitamanodoruji%2Flet%2FgYC-ycnvtMuLDg.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;cd ..&lt;/a&gt;&lt;pre&gt;/*
 * @title cd ..
 * @description up dir
 * @include http://*
 * @license MIT License
 */

a=location.pathname.split('/');
a.pop();
location.pathname=a.join('/');&lt;/pre&gt;</content:encoded>
  </item>
</rdf:RDF>
