diff mandarake-direct-link.user.js @ 16:c0fddafb854b

(none)
author Edho Arief <me@myconan.net>
date Sun, 11 Oct 2015 01:18:29 +0000
parents
children 4dfc6a9d1777
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mandarake-direct-link.user.js	Sun Oct 11 01:18:29 2015 +0000
@@ -0,0 +1,23 @@
+// ==UserScript==
+// @name         mandarake direct link
+// @namespace    https://myconan.net
+// @version      1.0
+// @description  Make proper link on mandarake pages
+// @author       nanaya
+// @match        https://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() {
+  $(".r18mark").remove()
+  var fixLink = function(_i, el) {
+    var
+      $el = $(el),
+      url = "/order/detailPage/item?itemCode=" + $el.attr("id") + "&ref=list"
+
+    $el.attr("href", url);
+  };
+
+  $("[href^=#adult_confirm']").each(fixLink);
+}).call();
\ No newline at end of file