Last active
October 17, 2019 00:10
-
-
Save mayli/d349360df3a5c738ee0ebcccb980cf03 to your computer and use it in GitHub Desktop.
opengrok jump to line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Opengrok jump to line | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description does it work? | |
// @author You | |
// @include /^https?://opengrok.*$/ | |
// @grant none | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js | |
// @updateUrl https://gist.github.com/mayli/d349360df3a5c738ee0ebcccb980cf03/raw/351ada4d06837c1ee2218894e57587961eecc5b3/opengrok.user.js | |
// @downloadUrl https://gist.github.com/mayli/d349360df3a5c738ee0ebcccb980cf03/raw/351ada4d06837c1ee2218894e57587961eecc5b3/opengrok.user.js | |
// ==/UserScript== | |
var $ = window.jQuery; | |
$(document).ready(function() { | |
var line = window.location.href.split("#")[1]; | |
if(line) { | |
$("a[name='" + line + "']").get(0).scrollIntoView(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment