1300

移行用のテストです

アメブロ旦那観察日記の画像をインスタグラムと同じサイズで表示

let.hatelabo.jp

// ==UserScript==
// @name         mofu_ameblo
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://ameblo.jp/mofu-everyday/entry*
// @match        https://ameblo.jp/mofu-everyday/theme*
// @grant        GM_addStyle
// @grant        GM_getResourceText
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// @require      https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js
// @resource style https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css
// @resource style2 https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.css
// ==/UserScript==
var style = GM_getResourceText('style');
GM_addStyle(style);
var style2 = GM_getResourceText('style2');
GM_addStyle(style2);
var result2 = document.evaluate('//div[./a[@href="https://html.co.jp/ha_chu"]]', document, null, 7, null);
result2.snapshotItem(0).insertAdjacentHTML('afterbegin', '<input type="button" value="画像のみ表示" id="gazou">');
document.getElementById("gazou").addEventListener('click', sample, false);

function sample() {
  var result = document.evaluate('//div[@class="skin-entryBody"]//a/img', document, null, 7, null);
  var tmp = [];
  for (var i = 0; i < result.snapshotLength; i++) {
    result.snapshotItem(i).src = result.snapshotItem(i).src.replace("?caw=800", "?caw=600");
    tmp[i] = result.snapshotItem(i).src;
  }
  if (i > 0) {
    document.body.innerHTML = '<div id="slick-box"></div><div id="count"></div>';
    for (i = 0; i < tmp.length; i++) {
      document.getElementById("slick-box").insertAdjacentHTML('beforeend', '<figure><img src=' + tmp[i] + ' title=' + (i + 1) + '/' + tmp.length + '></figure>');
    }
    $(function () {
      $('#slick-box').slick();
      $('#slick-box').on('afterChange', function (slick, currentSlide) {
        var current_slide = $('#slick-box').slick('slickCurrentSlide');
        $('#count').text((current_slide + 1) + "/" + tmp.length);
      });
    });
  }
}
$(function () {
  $('.skin-borderQuiet img').hover(function () {
    $(this).attr('src', $(this).attr('src').replace('?cpd=100', '?cpd=200'));
  }, function () {
    if (!$(this).hasClass('currentPage')) {
      $(this).attr('src', $(this).attr('src').replace('?cpd=200', '?cpd=100'));
    }
  });
});

http://scratchpad.io/next-cows-1097

[data-uranus-component="blogGenreEntryRankInfo"] {
  display: none;
}

[data-uranus-component="entryHead"], [data-uranus-component="entryBody"] {
  margin: 0;
}

.hashtag-module-borderTop, .hashtag-module {
  margin: 0;
  padding: 0;
}

.skin-entryAd {
  display: none;
}

#slick-box {
  width: 660px;
  margin-left: 3%;
}

#count {
  margin-left: 350px;
}

[data-uranus-component="imageFrame"] a:hover img {
  width: 200px !important;
  height: 200px !important;
}