// ==UserScript== // @name ECU Bitbucket Improvements // @namespace raveren // @license MIT // @version 1.10 // @author raveren // @description tbd // @require https://code.jquery.com/jquery-3.6.3.min.js // @include https://bitbucket.org/ecu1/internal-www/pull-requests* // @run-at document-start // @downloadURL none // ==/UserScript== (function () { 'use strict'; window.addEventListener('load', function () { if (location.href === 'https://bitbucket.org/ecu1/internal-www/pull-requests/') { document.title = 'All Pull Requests'; } else { document.title = document.title.replace('ecu1 / internal-www / Pull Request ', ''); } $(document).on('mouseover', 'a.line-number-permalink', function (e) { if ($(this).data('ecu-loaded')) { return } $(this).data('ecu-loaded', 1) // https://bitbucket.org/ecu1/internal-www/pull-requests/1373#chg_app/Libs/Statistic/Modules/MidataOffeneAuftraege.php_newline81 let link = $(this).prop('href').replace(/.*chg_app/, '') let line = link.replace(/.*_newline/, '') let path = link.replace(/_newline\d+$/, '') let a = document.createElement('span'); a.innerHTML = ''; $(this).before(a); }); }); })();