// ==UserScript== // @name Link File to InteliJ IDE From Github // @namespace https://gist.github.com/raveren/c213f683abe9635a2cf2c4486856ab9e // @version 0.4 // @description Adds a monitor icon next to file name, click it to open your Intelij Ide (Remote Call plugin required) // @author raveren // @match https://github.com/*/files* // @match https://github.com/*/pull* // @require https://greasyfork.org/scripts/2199-waitforkeyelements/code/waitForKeyElements.js?version=6349 // @require https://code.jquery.com/jquery-3.1.0.slim.min.js // @grant none // @downloadURL https://update.greasyfork.icu/scripts/23984/Link%20File%20to%20InteliJ%20IDE%20From%20Github.user.js // @updateURL https://update.greasyfork.icu/scripts/23984/Link%20File%20to%20InteliJ%20IDE%20From%20Github.meta.js // ==/UserScript== (function () { waitForKeyElements('.file-info', function (el) { if (el.children('.user-select-contain').length > 0) { addLink(el.children('.user-select-contain')) } else { addLink(el) } }); function addLink(el) { var a = document.createElement('span'), link = 'http://localhost:8091?message=' + el.html().trim(); a.innerHTML = ''; el.before(a); } })();