gitee tuning

Gitee 魔改计划

目前为 2018-11-29 提交的版本。查看 最新版本

// ==UserScript==
// @name         gitee tuning
// @namespace    gitee
// @version      0.1
// @description  Gitee 魔改计划
// @author       BlindingDark
// @match        https://gitee.com/oschina/dashboard/issues*
// @grant        none
// ==/UserScript==

// 目前实现
// 1. 点击 issues 复制 issues 井号标识而不是链接

(function() {
    'use strict';

    // Tools
    // 复制字符串到剪贴板
    const copyToClipboard = str => {
        const el = document.createElement('textarea');
        el.value = str;
        el.setAttribute('readonly', '');
        el.style.position = 'absolute';
        el.style.left = '-9999px';
        document.body.appendChild(el);
        el.select();
        document.execCommand('copy');
        document.body.removeChild(el);
    };

    // 点击 issues 复制 issues 井号标识而不是链接
    $(".ent-issues").on("click", ".issue-number-button .popover-reference", (e) => {
        copyToClipboard(e.target.textContent.trim());
    });
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址