annotate mandarake-direct-link.user.js @ 18:512f5438c53d

(none)
author Edho Arief <me@myconan.net>
date Tue, 13 Oct 2015 08:36:57 +0000
parents 4dfc6a9d1777
children 4b13157ae3a1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
Edho Arief <me@myconan.net>
parents:
diff changeset
1 // ==UserScript==
Edho Arief <me@myconan.net>
parents:
diff changeset
2 // @name mandarake direct link
Edho Arief <me@myconan.net>
parents:
diff changeset
3 // @namespace https://myconan.net
18
Edho Arief <me@myconan.net>
parents: 17
diff changeset
4 // @version 1.1
16
Edho Arief <me@myconan.net>
parents:
diff changeset
5 // @description Make proper link on mandarake pages
Edho Arief <me@myconan.net>
parents:
diff changeset
6 // @author nanaya
Edho Arief <me@myconan.net>
parents:
diff changeset
7 // @match https://order.mandarake.co.jp/*
18
Edho Arief <me@myconan.net>
parents: 17
diff changeset
8 // @match http://order.mandarake.co.jp/*
16
Edho Arief <me@myconan.net>
parents:
diff changeset
9 // @grant none
Edho Arief <me@myconan.net>
parents:
diff changeset
10 // @downloadURL https://bitbucket.org/!api/2.0/snippets/nanaya1/TK64/tip/files/mandarake-direct-link.user.js
Edho Arief <me@myconan.net>
parents:
diff changeset
11 // ==/UserScript==
Edho Arief <me@myconan.net>
parents:
diff changeset
12
Edho Arief <me@myconan.net>
parents:
diff changeset
13 ;(function() {
Edho Arief <me@myconan.net>
parents:
diff changeset
14 $(".r18mark").remove()
Edho Arief <me@myconan.net>
parents:
diff changeset
15 var fixLink = function(_i, el) {
Edho Arief <me@myconan.net>
parents:
diff changeset
16 var
Edho Arief <me@myconan.net>
parents:
diff changeset
17 $el = $(el),
Edho Arief <me@myconan.net>
parents:
diff changeset
18 url = "/order/detailPage/item?itemCode=" + $el.attr("id") + "&ref=list"
Edho Arief <me@myconan.net>
parents:
diff changeset
19
Edho Arief <me@myconan.net>
parents:
diff changeset
20 $el.attr("href", url);
Edho Arief <me@myconan.net>
parents:
diff changeset
21 };
Edho Arief <me@myconan.net>
parents:
diff changeset
22
17
Edho Arief <me@myconan.net>
parents: 16
diff changeset
23 $("[href^='#adult_confirm']").each(fixLink);
16
Edho Arief <me@myconan.net>
parents:
diff changeset
24 }).call();