您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
支持听云查看自定义上传的 UserId 字段
当前为
// ==UserScript== // @name tingyun-userid // @namespace Violentmonkey Scripts // @author https://github.com/LinusLing // @match https://report.tingyun.com/mobile-web/ // @require http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js // @version 1.0.0 // @grant none // @description 支持听云查看自定义上传的 UserId 字段 // ==/UserScript== (function() { 'use strict'; window.addEventListener("load", function(event) { var th = $("th:first")[0]; // find the first element of "th" type var userid_column = '<th><div class="th-text" ng-reflect-ng-class="th-text"><span>UserId</span><em></em></div></th>'; $(th.parentNode).addClass("").append(userid_column); // call the parentNode to append userid_column // add click function for crash $("tr[style='cursor: default;']").click(function() { if ($(".tr-selected>td").hasClass("userid")) { // if td already append userid then return return; } $("li[target='userDiyInfo']").trigger("click"); // trigger an click event for userDiyInfo(which includes userid) // grap the userid from tab_cust var str = $("#tab_cust")[0].innerText; var userid_str = str.split("\n")[0].split(":").pop().trim(); var y = $(".tr-selected")[0]; // find the selected tr for showing userid var userid_html = '<td class="userid"><div >' + userid_str + '</div></td>'; // build the td element with userid $(y).addClass("").append(userid_html); // append userid to the table $("li[target='stackTrace']").trigger("click"); // restore stackTrace tab }); $(".tr-selected").trigger("click"); }); })();