Greasy Fork 还支持 简体中文。

Tower任务标题复制

任务标题一键复制功能

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Tower任务标题复制
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  任务标题一键复制功能
// @author       ZJoker
// @match        https://tower.im/teams/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=tower.im
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    function copyTitle(e) {
        const contentDiv = e.target.parentNode.nextElementSibling.nextElementSibling
        const title = contentDiv.children[1].innerHTML
        let oInput = document.createElement('input')
        oInput.value = title
        document.body.appendChild(oInput)
        oInput.select()
        document.execCommand('Copy')
        oInput.remove()
    }

    setTimeout(() => {
        const todoList = document.querySelectorAll('.todo-actions')
        todoList.forEach(item => {
            const span = document.createElement('span')
            span.style.cursor = 'pointer'
            span.style.width = '25px'
            span.style.display = 'flex'
            span.style.alignItems = 'center'
            span.style.justifyContent = 'center'
            span.style.height = '100%'
            span.style.outlineColor = '#44acb6'
            span.style.color = '#44acb6'
            span.style.textDecoration = 'none'
            span.style.margin = '0'
            span.style.padding = '0'
            span.style.fontSize = '12px'
            span.style.verticalAlign = 'baseline'
            span.style.background = 'transparent'
            span.title = '复制'
            span.innerHTML = '复制'
            span.addEventListener('click', copyTitle)
            item.appendChild(span)
        })
    }, 1000)


})();