annotate mandarake-direct-link.user.js @ 30:d884de13423b

(none)
author Edho Arief <me@myconan.net>
date Fri, 20 May 2016 18:06:04 +0000
parents 0552100cceb3
children 28505554a8b9
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
20
Edho Arief <me@myconan.net>
parents: 19
diff changeset
4 // @version 1.2.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);
20
Edho Arief <me@myconan.net>
parents: 19
diff changeset
21 $el.removeClass();
16
Edho Arief <me@myconan.net>
parents:
diff changeset
22 };
Edho Arief <me@myconan.net>
parents:
diff changeset
23
17
Edho Arief <me@myconan.net>
parents: 16
diff changeset
24 $("[href^='#adult_confirm']").each(fixLink);
16
Edho Arief <me@myconan.net>
parents:
diff changeset
25 }).call();