1300

移行用のテストです

アメブロ内部リンク対策

// ==UserScript==
// @name         ameblo_link
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://ameblo.jp/*
// @grant GM_openInTab
// ==/UserScript==
var result = document.evaluate('//a[not(./ancestor::div[@class="skin-entryBody"]) and not(./img)]', document, null, 7, null);
var bname = "/" + location.pathname.split("/")[1] + "/";
var reg = new RegExp(bname);
/*var link_newtab=0;*/

for (var i = 0; i < result.snapshotLength; i++) {
  if (reg.test(result.snapshotItem(i).href)) {
    result.snapshotItem(i).addEventListener('click', sample, false);
    result.snapshotItem(i).dataset.href = result.snapshotItem(i).href;
    result.snapshotItem(i).href = "javascript:void(0);";
  }
}

function sample() {
    //ダミーの履歴を追加
    history.pushState(null,null,"#");
    location.href = this.dataset.href;
  /*else {
    GM_openInTab(this.dataset.href);
  }*/
}
@-moz-document domain("ameblo.jp") {
li>a[href*="?"]:not(.bfc-list__link){pointer-events: none;}
.skin-entryPaging a{pointer-events: none;}
}