Greasy Fork is available in English.

自研 - 插画世界 - 添加「返回 Pixiv」按钮

在行为栏添加前往 Pixiv 对应作品页的按钮。

// ==UserScript==
// @name               自研 - 插画世界 - 添加「返回 Pixiv」按钮
// @name:en_US         Self-made - vilipix - Add a 'Return to Pixiv Site' button
// @description        在行为栏添加前往 Pixiv 对应作品页的按钮。
// @description:en_US  Add a button in the action bar to navigate to the corresponding Pixiv artwork page.
// @version            1.0.2
// @author             CPlayerCHN
// @license            MulanPSL-2.0
// @namespace          https://www.gitlink.org.cn/CPlayerCHN
// @match              https://vilipix.com/illust/*
// @match              https://www.vilipix.com/illust/*
// @icon               https://vilipix.oss-cn-beijing.aliyuncs.com/web/logo/ico.png
// @run-at             document-end
// @noframes
// ==/UserScript==

(function() {
    'use strict';

    // 定义「作品编号」变量
    const artworkid = location.href.split('/')[4];

    // 判断「作品编号」是否为 Pixiv 的,如果是就在行为栏添加「返回 Pixiv」按钮。
    if(!/[a-z]+/.test(artworkid)) {
        document.querySelector('.illust-content .actions').insertAdjacentHTML("afterbegin", `<div><a href="https://www.pixiv.net/artworks/${artworkid}" target="_blank" rel="nofollow noopener noreferrer"><i class="icon iconfont wx-icon-faxian"></i></a></div>`);
    }

})();