changeset 33:28505554a8b9

(none)
author Edho Arief <me@myconan.net>
date Sun, 25 Dec 2016 07:41:17 +0000
parents 41953e59d06f
children a1518aba03fa
files jiku-chu-direct-link.user.js mandarake-direct-link.user.js medium-popup-disable.user.js pixiv-direct-external-link.user.js rakuten-books-direct-search.user.js tgsmart-direct-link.user.js tweetdeck-large-image.user.js
diffstat 7 files changed, 69 insertions(+), 62 deletions(-) [+]
line wrap: on
line diff
--- a/jiku-chu-direct-link.user.js	Sat Dec 24 04:41:13 2016 +0000
+++ b/jiku-chu-direct-link.user.js	Sun Dec 25 07:41:17 2016 +0000
@@ -1,7 +1,7 @@
 // ==UserScript==
 // @name         Jiku-Chu direct link
 // @namespace    https://myconan.net
-// @version      2.5.0
+// @version      2.5.1
 // @description  Make proper link on Jiku-Chu pages
 // @author       nanaya
 // @match        http://www.jiku-chu.com/*
@@ -10,14 +10,15 @@
 // ==/UserScript==
 
 ;(function() {
-  Array.prototype.forEach.call(
-    document.querySelectorAll("a[onclick^=\"age_verification_submit('/products/detail.php?product_id=\"]"),
-    function(el) {
-      var
-        productId = el.getAttribute("onclick").replace(/.*product_id=(\d+).*/, "$1"),
-        url = "/products/detail.php?product_id=" + productId;
-      el.setAttribute("href", url);
-      el.setAttribute("onclick", "");
-    }
-  )
+  "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();
\ No newline at end of file
--- a/mandarake-direct-link.user.js	Sat Dec 24 04:41:13 2016 +0000
+++ b/mandarake-direct-link.user.js	Sun Dec 25 07:41:17 2016 +0000
@@ -1,7 +1,7 @@
 // ==UserScript==
 // @name         mandarake direct link
 // @namespace    https://myconan.net
-// @version      1.2.1
+// @version      1.2.2
 // @description  Make proper link on mandarake pages
 // @author       nanaya
 // @match        https://order.mandarake.co.jp/*
@@ -11,15 +11,15 @@
 // ==/UserScript==
 
 ;(function() {
+  "use strict";
   $(".r18mark").remove()
   var fixLink = function(_i, el) {
-    var
-      $el = $(el),
-      url = "/order/detailPage/item?itemCode=" + $el.attr("id") + "&ref=list"
+    var $el = $(el)
+    var url = "/order/detailPage/item?itemCode=" + $el.attr("id") + "&ref=list"
 
-    $el.attr("href", url);
-    $el.removeClass();
-  };
+    $el.attr("href", url)
+    $el.removeClass()
+  }
 
-  $("[href^='#adult_confirm']").each(fixLink);
+  $("[href^='#adult_confirm']").each(fixLink)
 }).call();
\ No newline at end of file
--- a/medium-popup-disable.user.js	Sat Dec 24 04:41:13 2016 +0000
+++ b/medium-popup-disable.user.js	Sun Dec 25 07:41:17 2016 +0000
@@ -1,7 +1,7 @@
 // ==UserScript==
 // @name         Medium popup disable
 // @namespace    https://myconan.net
-// @version      1.0.1
+// @version      1.0.2
 // @description  Strip out Medium's highlighting popup "feature"
 // @author       nanaya
 // @match        https://medium.com/*
@@ -12,13 +12,13 @@
 // ==/UserScript==
 
 ;(function() {
-  'use strict';
-  var popups = document.getElementsByClassName("highlightMenu");
+  "use strict";
+  var popups = document.getElementsByClassName("highlightMenu")
   var killPopup = function(popup) {
-    popup.style.display = 'none';
-  };
+    popup.style.display = "none";
+  }
   var killPopups = function() {
-    Array.prototype.forEach.call(popups, killPopup);
-  };
-  document.addEventListener('click', killPopups);
+    Array.prototype.forEach.call(popups, killPopup)
+  }
+  document.addEventListener('click', killPopups)
 }).call();
\ No newline at end of file
--- a/pixiv-direct-external-link.user.js	Sat Dec 24 04:41:13 2016 +0000
+++ b/pixiv-direct-external-link.user.js	Sun Dec 25 07:41:17 2016 +0000
@@ -1,7 +1,7 @@
 // ==UserScript==
 // @name         pixiv direct external link
 // @namespace    https://myconan.net
-// @version      1.1.0
+// @version      1.1.1
 // @description  Make proper link on pixiv pages
 // @author       nanaya
 // @match        http://www.pixiv.net/*
@@ -10,14 +10,15 @@
 // ==/UserScript==
 
 ;(function() {
+  "use strict";
+
   var fixLink = function(_i, el) {
-    var
-      $el = $(el),
-      url = decodeURIComponent($el.attr('href').replace(/^\/?jump.php\?/, ""));
+    var $el = $(el)
+    var url = decodeURIComponent($el.attr("href").replace(/^\/?jump.php\?/, ""))
 
-    $el.attr('href', url);
-  };
+    $el.attr("href", url)
+  }
 
-  $("[href^='jump.php?']").each(fixLink);
-  $("[href^='/jump.php?']").each(fixLink);
+  $("[href^='jump.php?']").each(fixLink)
+  $("[href^='/jump.php?']").each(fixLink)
 }).call();
\ No newline at end of file
--- a/rakuten-books-direct-search.user.js	Sat Dec 24 04:41:13 2016 +0000
+++ b/rakuten-books-direct-search.user.js	Sun Dec 25 07:41:17 2016 +0000
@@ -1,7 +1,7 @@
 // ==UserScript==
 // @name         rakuten books direct search
 // @namespace    https://myconan.net
-// @version      1.0.1
+// @version      1.0.2
 // @description  Search on rakuten without tracking proxy
 // @author       nanaya
 // @match        https://books.rakuten.co.jp/*
@@ -13,10 +13,11 @@
 // ==/UserScript==
 
 ;(function() {
-  var $ = jQuery;
-  var $form = $("form[name='srchFrm']");
-  if (!$form.length) { return; }
+  var $ = jQuery
+  var $form = $("form[name='srchFrm']")
+
+  if (!$form.length) { return }
   
-  var searchUrl = $form.find("input[name='R2']").attr("value");
-  $form.attr("action", searchUrl);
+  var searchUrl = $form.find("input[name='R2']").attr("value")
+  $form.attr("action", searchUrl)
 }).call();
\ No newline at end of file
--- a/tgsmart-direct-link.user.js	Sat Dec 24 04:41:13 2016 +0000
+++ b/tgsmart-direct-link.user.js	Sun Dec 25 07:41:17 2016 +0000
@@ -1,7 +1,7 @@
 // ==UserScript==
 // @name         TG Smart Nuke Out Tracking Function
 // @namespace    https://myconan.net
-// @version      1.0.0
+// @version      1.0.1
 // @description  Remove tracking function from links in TG Smart
 // @author       nanaya
 // @match        http://www.tgsmart.jp/*
@@ -10,10 +10,11 @@
 // ==/UserScript==
 
 ;(function() {
-  Array.prototype.forEach.call(
-    document.querySelectorAll('a[onclick^="trackOutboundLink("'),
-    function(el) {
-      el.setAttribute("onclick", "");
-    }
-  )
+  "use strict";
+  var links = document.querySelectorAll("a[onclick^='trackOutboundLink('")
+  var removeOnClick = function(el) {
+    el.setAttribute("onclick", "")
+  }
+
+  Array.prototype.forEach.call(links, removeOnClick)
 }).call();
\ No newline at end of file
--- a/tweetdeck-large-image.user.js	Sat Dec 24 04:41:13 2016 +0000
+++ b/tweetdeck-large-image.user.js	Sun Dec 25 07:41:17 2016 +0000
@@ -1,7 +1,7 @@
 // ==UserScript==
 // @name         Tweetdeck large image
 // @namespace    https://myconan.net
-// @version      1.0.1
+// @version      1.0.2
 // @description  No more stupid link for images in tweetdeck
 // @author       nanaya
 // @match        https://tweetdeck.twitter.com/*
@@ -10,22 +10,25 @@
 // ==/UserScript==
 
 ;(function() {
-  var $ = jQuery;
-  
-  $(document).off('.ec-userscript');
-  $(document).on('mouseenter.ec-userscript', '.js-media-image-link', function(e) {
-    var link = e.currentTarget;
-    if (link._ecUserscript === true) { return; }
+  "use strict";
+
+  var $ = jQuery
+  var replaceLink = function(e) {
+    var link = e.currentTarget
+    if (link._ecUserscript === true) { return }
     
-    var images = link.getElementsByClassName('media-img');
+    var images = link.getElementsByClassName("media-img")
     
-    var url;
+    var url
     if (images.length) {
-      url = images[0].src.replace(/:[a-z0-9]+$/, '');
+      url = images[0].src.replace(/:[a-z0-9]+$/, "")
     } else {
-      url = getComputedStyle(link).backgroundImage.replace(/^url\(('|")?(.+?)(:small)?\1\)$/, '$2');
+      url = getComputedStyle(link).backgroundImage.replace(/^url\(('|")?(.+?)(:small)?\1\)$/, "$2")
     }
-    link.setAttribute('href', url + ':orig');
-    link._ecUserscript = true;
-  });
+    link.setAttribute("href", url + ":orig")
+    link._ecUserscript = true
+  }
+  
+  $(document).off(".ec-userscript")
+  $(document).on("mouseenter.ec-userscript", ".js-media-image-link", replaceLink)
 }).call();
\ No newline at end of file