您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
CDD内部使用
// ==UserScript== // @name tower提交发布清单 // @namespace http://tampermonkey.net/ // @version 0.1 // @description CDD内部使用 // @author 华哥 // @match https://tower.im/teams/* // @run-at document-end // @grant none // ==/UserScript== (function(exports) { 'use strict'; $('.todo-additions').append('<p onclick="addCddList()" style="font-size:16px;line-height: 30px;color:#44acb6;cursor:pointer;">添加到发布清单</p>'); var title = ''; function addCddList() { title = prompt("请输入标题", $.trim($('.todo-detail-title').text())); console.log(title); if (title.length > 0) { cddSubmit(); } } exports.addCddList = addCddList; function cddSubmit() { let guid = $('#conn-guid').val(), assignee_guid = 'fcc0322d607d45c1811c6781c85f3551'; let params = { "conn_guid": guid, "utf8": "✓", "todos_creation": { "content": title, "assignee_guid": assignee_guid, "due_at": "", "start_at": "", "priority": "normal", "label_ids": [ "" ], "desc": '<p><span style=""><a href="' + location.href + '" rel="nofollow">'+ location.href +'</a></span><br></p>', "is_html": "1", "attfile_guids": [ "''" ] }, "is_html": "1", "name": "button", "value": "" }; $.ajax({ url: '/projects/7591affe52b51b30544824c8a91a2cdf/lists/638b4981c664e77ee21ff23c7b321f32', type: 'post', data: params }).done(function(res) { console.log(res); }).always(function() { alert("已完成"); }); } })(window);