1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 01:10:58 +01:00
phorge-phorge/webroot/rsrc/js/application/diffusion/behavior-jump-to.js
jungejason 431552c357 Add syntax highlight to diffusion.
Summary:
use XHPAST parser to parse the file, and generate a table for
the code to highlight it.  This is part of the task of "Port Diffusion's
Browse File view to Phabricator".

Test Plan:
browse file, try commit version, line number functionality.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 83
2011-03-25 17:41:51 -07:00

14 lines
244 B
JavaScript

/**
* @provides javelin-behavior-diffusion-jump-to
* @requires javelin-lib-dev
*/
JX.behavior('diffusion-jump-to', function(config) {
JX.defer(
function() {
window.scrollTo(0, JX.$V(JX.$(config.target)).y - 100);
});
});