view pixiv-direct-external-link.user.js @ 58:960d452dea99

Bump version to force updating to new repository
author nanaya <me@nanaya.pro>
date Thu, 23 Aug 2018 22:58:16 +0900
parents 09f735548b2c
children 3381a9cb88d1
line wrap: on
line source

// ==UserScript==
// @name         pixiv direct external link
// @namespace    https://myconan.net
// @version      1.1.2
// @description  Make proper link on pixiv pages
// @author       nanaya
// @match        http://www.pixiv.net/*
// @grant        none
// @downloadURL  https://bitbucket.org/nanayapro/ec-userscripts/raw/tip/pixiv-direct-external-link.user.js
// ==/UserScript==

;(function() {
  "use strict";

  var fixLink = function(_i, el) {
    var $el = $(el);
    var url = decodeURIComponent($el.attr("href").replace(/^\/?jump.php\?/, ""));

    $el.attr("href", url);
  };

  $("[href^='jump.php?']").each(fixLink);
  $("[href^='/jump.php?']").each(fixLink);
}).call();