您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Button to go directly to related lists
// ==UserScript== // @name ServiceNow - Go to Related Lists // @version 0.0.1 // @description Button to go directly to related lists // @author Matteo Lecca // @match *.service-now.com/*.do* // @icon https://www.google.com/s2/favicons?sz=64&domain=service-now.com // @grant none // @license MIT // @namespace https://greasyfork.org/users/1246673 // ==/UserScript== (function() { 'use strict'; let tableName = window.location.pathname.match(/\/(\w*)\.do/).pop(); let elementId = tableName + '.form_scroll'; if(!document.getElementById(elementId)) { return; } let relatedListNames = g_form.getRelatedListNames(); if(relatedListNames.length == 0) { return; } let goToTabsButton = document.createElement('a'); goToTabsButton.title = '[WK - SN] Go to related lists'; goToTabsButton.href = '#tabs2_list'; goToTabsButton.classList.add('btn', 'btn-danger', 'btn-ref', 'icon', 'icon-tab'); goToTabsButton.style.cssText += 'position: fixed; right: 2em; top: 3.5em'; document.getElementById(elementId).append(goToTabsButton); })();