NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name GitlabMRtoRedmineIssue // @description none // @version 1 // @author Knazey // @license MIT // @copyright 2019, Kanzey (https://openuserjs.org/users/Kanzey) // @include /.*gitlab.*\/merge_requests\/[0-9]+/ // @run-at document-end // @grant none // @updateURL https://openuserjs.org/meta/Kanzey/GitlabMRtoRedmineIssue.meta.js // ==/UserScript== var origin = document.location.origin var redmine_origin = origin.replace("gitlab", "redmine") var issues_url = redmine_origin + "/issues/" var description = document.querySelector('.detail-page-description') description.innerHTML = description.innerHTML.replace(/#([0-9]+)/g, '<a href="' + issues_url + '$1" target="_blank">#$1</a>')