annotate pixiv-direct-external-link.user.js @ 129:dc960ef1248b

Add lashinbang always consent script
author nanaya <me@nanaya.net>
date Tue, 07 Feb 2023 21:51:34 +0900
parents 8de2d53a4cb1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
Edho Arief <me@myconan.net>
parents:
diff changeset
1 // ==UserScript==
118
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
2 // @name pixiv direct external link
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
3 // @namespace https://nanaya.net
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
4 // @version 1.1.5
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
5 // @description Make proper link on pixiv pages
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
6 // @author nanaya
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
7 // @match http://www.pixiv.net/*
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
8 // @grant none
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
9 // @downloadURL https://hg.nanaya.net/ec-userscripts/raw-file/tip/pixiv-direct-external-link.user.js
14
Edho Arief <me@myconan.net>
parents:
diff changeset
10 // ==/UserScript==
Edho Arief <me@myconan.net>
parents:
diff changeset
11
109
ef21ef445fc6 Cleanups
nanaya <me@nanaya.net>
parents: 108
diff changeset
12 'use strict';
ef21ef445fc6 Cleanups
nanaya <me@nanaya.net>
parents: 108
diff changeset
13
66
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 59
diff changeset
14 /* global $ */
117
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
15 const fixLink = function (_i, el) {
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
16 const $el = $(el);
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
17 const url = decodeURIComponent($el.attr('href').replace(/^\/?jump.php\?/, ''));
14
Edho Arief <me@myconan.net>
parents:
diff changeset
18
117
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
19 $el.attr('href', url);
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
20 };
66
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 59
diff changeset
21
117
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
22 $("[href^='jump.php?']").each(fixLink);
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
23 $("[href^='/jump.php?']").each(fixLink);