您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Redirect the native Jenkins UI to Blue Ocean
当前为
// ==UserScript== // @name Jenkins - Redirect Native UI to Blue Ocean // @namespace http://hear.com // @version 2024-07-11 // @description Redirect the native Jenkins UI to Blue Ocean // @author [email protected] // @match https://jenkins.audibene.net/job/Audibene-GMBH/job/*/job/*/* // @icon https://www.google.com/s2/favicons?sz=64&domain=audibene.net // @tag productivity // @grant none // ==/UserScript== (function() { 'use strict'; const url = window.location.href const parameterizedUrl = "https://jenkins.audibene.net/blue/organizations/jenkins/:organizationId%2F:repo/detail/:pr/:run/pipeline/"; const regex = /https:\/\/jenkins\.audibene\.net\/job\/(?<organizationId>[^\/]+)\/job\/(?<repo>[^\/]+)\/job\/(?<pr>[^\/]+)\/(?<run>[^\/]+)\/pipeline-graph\//; const match = url.match(regex); if (match) { const { organizationId, repo, pr, run } = match.groups; const hydratedUrl = parameterizedUrl .replace(':organizationId', organizationId) .replace(':repo', repo) .replace(':pr', pr) .replace(':run', run); console.log(`Hydrated URL: ${hydratedUrl}`); if (confirm('Redirect to Blue Ocean?')) { window.location.href = hydratedUrl; } } else { console.log("No match found"); } })();