Edho Arief Userscripts Collection

Created by Edho Arief last modified
// ==UserScript==
// @name         Jiku-Chu direct link
// @namespace    https://myconan.net
// @version      2.5.1
// @description  Make proper link on Jiku-Chu pages
// @author       nanaya
// @match        http://www.jiku-chu.com/*
// @grant        none
// @downloadURL  https://bitbucket.org/!api/2.0/snippets/nanaya1/TK64/tip/files/jiku-chu-direct-link.user.js
// ==/UserScript==

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

    el.setAttribute("href", url)
    el.setAttribute("onclick", "")
  }

  Array.prototype.forEach.call(links, removeOnClick)
}).call();
// ==UserScript==
// @name         mandarake direct link
// @namespace    https://myconan.net
// @version      1.2.2
// @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/nanaya1/TK64/tip/files/mandarake-direct-link.user.js
// ==/UserScript==

;(function() {
  "use strict";
  $(".r18mark").remove()
  var fixLink = function(_i, el) {
    var $el = $(el)
    var url = "/order/detailPage/item?itemCode=" + $el.attr("id") + "&ref=list"

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

  $("[href^='#adult_confirm']").each(fixLink)
}).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/nanaya1/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/nanaya1/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/nanaya1/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/nanaya1/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/nanaya1/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)