Snippets

Edho Arief Userscripts Collection

Created by Edho Arief last modified
// ==UserScript==
// @name         Cuffs/Hulotte tuning
// @namespace    https://myconan.net
// @version      1.1.2
// @description  Strip out Cuffs/Hulotte age confirmation popup, disables lightbox
// @author       nanaya
// @match        http://www.cuffs.co.jp/*
// @match        http://www.cuffs-cube.jp/*
// @match        http://hulotte.jp/*
// @grant        none
// @downloadURL  https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/cuffs-hulotte-popup.user.js
// ==/UserScript==

;(function() {
    "use strict";

    var $ = jQuery;
    var rules = [];
    var i;
    var styleEl;

    if (document.querySelector('body > #mainContent') != null) {
        rules.push('body > :not(#mainContent) { display: none !important; }');
    }

    rules.push('#load_bg { display: none !important; }');
    rules.push('body > .modal { display: none !important; }');
    rules.push('body > div[style*="position: fixed"] { display: none !important; }');

    for (i = 0; i < rules.length; i++) {
        styleEl = document.createElement('style');
        document.head.appendChild(styleEl);
        styleEl.sheet.insertRule(rules[i], 0);
    }

    $(function () {
        $('.cboxElement').removeClass('cboxElement');
    });

    // force remove modal
    $.cookie('modal', 'off');
    if (typeof stopload === 'function') {
        stopload();
    }
}).call();
// ==UserScript==
// @name         Jiku-Chu direct link
// @namespace    https://myconan.net
// @version      2.5.2
// @description  Make proper link on Jiku-Chu pages
// @author       nanaya
// @match        http://www.jiku-chu.com/*
// @match        https://www.jiku-chu.com/*
// @grant        none
// @downloadURL  https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/jiku-chu-direct-link.user.js
// ==/UserScript==

;(function () {
  'use strict';
  const links = document.querySelectorAll("a[onclick^=\"age_verification_submit('/products/detail.php?product_id=\"]");
  const removeOnClick = function (el) {
    const productId = el.getAttribute('onclick').replace(/.*product_id=(\d+).*/, '$1');
    const url = `/products/detail.php?product_id=${productId}`;

    el.setAttribute('href', url);
    el.setAttribute('onclick', '');
  };

  Array.prototype.forEach.call(links, removeOnClick);
}());
// ==UserScript==
// @name         mandarake direct link
// @namespace    https://myconan.net
// @version      1.3.1
// @description  Make proper link on mandarake pages
// @author       nanaya
// @match        https://order.mandarake.co.jp/*
// @match        http://order.mandarake.co.jp/*
// @grant        none
// @downloadURL  https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/mandarake-direct-link.user.js
// ==/UserScript==

;(function() {
  "use strict";

  $(".r18mark").remove();
  $(".r18item").remove();

  var fixR18Link = function(_i, el) {
    var url = `/order/detailPage/item?itemCode=${el.id}`;

    el.setAttribute("href", url);
    el.setAttribute("class", "");
  };

  $("[href^='#adult_confirm']").each(fixR18Link);

  var currentQuery = new URLSearchParams(location.search);
  var fixSearchLink = function(_i, el) {
    var query = new URLSearchParams(el.search);

    for (let [key, value] of currentQuery) {
      if (!query.has(key)) {
        query.set(key, value);
      }
    }

    el.setAttribute("href", `/order/listPage/list?${query.toString()}`);
  };

  $("[href^='/order/listPage/list?']").each(fixSearchLink);
}).call();
// ==UserScript==
// @name         Medium popup disable
// @namespace    https://myconan.net
// @version      1.0.3
// @description  Strip out Medium's highlighting popup "feature"
// @author       nanaya
// @match        https://medium.com/*
// @match        https://blog.medium.com/*
// @match        https://m.signalvnoise.com/*
// @match        https://hackernoon.com/*
// @grant        none
// @downloadURL  https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/medium-popup-disable.user.js
// ==/UserScript==

;(function() {
  "use strict";
  var popups = document.getElementsByClassName("highlightMenu");
  var killPopup = function(popup) {
    popup.style.display = "none";
  };
  var killPopups = function() {
    Array.prototype.forEach.call(popups, killPopup);
  };
  document.addEventListener('click', killPopups);
}).call();
// ==UserScript==
// @name         pixiv direct external link
// @namespace    https://myconan.net
// @version      1.1.1
// @description  Make proper link on pixiv pages
// @author       nanaya
// @match        http://www.pixiv.net/*
// @grant        none
// @downloadURL  https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/pixiv-direct-external-link.user.js
// ==/UserScript==

;(function() {
  "use strict";

  var fixLink = function(_i, el) {
    var $el = $(el);
    var url = decodeURIComponent($el.attr("href").replace(/^\/?jump.php\?/, ""));

    $el.attr("href", url);
  };

  $("[href^='jump.php?']").each(fixLink);
  $("[href^='/jump.php?']").each(fixLink);
}).call();
// ==UserScript==
// @name         rakuten books direct search
// @namespace    https://myconan.net
// @version      1.0.2
// @description  Search on rakuten without tracking proxy
// @author       nanaya
// @match        https://books.rakuten.co.jp/*
// @match        http://books.rakuten.co.jp/*
// @match        https://*.books.rakuten.co.jp/*
// @match        http://*.books.rakuten.co.jp/*
// @grant        none
// @downloadURL  https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/rakuten-books-direct-search.user.js
// ==/UserScript==

;(function() {
  var $ = jQuery;
  var $form = $("form[name='srchFrm']");

  if (!$form.length) { return; }
  
  var searchUrl = $form.find("input[name='R2']").attr("value");
  $form.attr("action", searchUrl);
}).call();
// ==UserScript==
// @name         TG Smart Nuke Out Tracking Function
// @namespace    https://myconan.net
// @version      1.0.1
// @description  Remove tracking function from links in TG Smart
// @author       nanaya
// @match        http://www.tgsmart.jp/*
// @grant        none
// @downloadURL  https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/tgsmart-direct-link.user.js
// ==/UserScript==

;(function() {
  "use strict";
  var links = document.querySelectorAll("a[onclick^='trackOutboundLink('");
  var removeOnClick = function(el) {
    el.setAttribute("onclick", "");
  };

  Array.prototype.forEach.call(links, removeOnClick);
}).call();
// ==UserScript==
// @name         Tweetdeck large image
// @namespace    https://myconan.net
// @version      1.0.2
// @description  No more stupid link for images in tweetdeck
// @author       nanaya
// @match        https://tweetdeck.twitter.com/*
// @grant        none
// @downloadURL  https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/tweetdeck-large-image.user.js
// ==/UserScript==

;(function() {
  "use strict";

  var $ = jQuery;
  var replaceLink = function(e) {
    var link = e.currentTarget;
    if (link._ecUserscript === true) { return; }
    
    var images = link.getElementsByClassName("media-img");
    
    var url;
    if (images.length) {
      url = images[0].src.replace(/:[a-z0-9]+$/, "");
    } else {
      url = getComputedStyle(link).backgroundImage.replace(/^url\(('|")?(.+?)(:small)?\1\)$/, "$2");
    }
    link.setAttribute("href", url + ":orig");
    link._ecUserscript = true;
  };
  
  $(document).off(".ec-userscript");
  $(document).on("mouseenter.ec-userscript", ".js-media-image-link", replaceLink);
}).call();

Comments (0)