1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00

Removed getElementsByClassName in repositor-crossreference.js

Summary: Used JX.DOM.scry() to locate blocks.

Test Plan: I made the necessary changes, differential is loading diffs as usual. Let me know if I have done it correctly.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T3007

Differential Revision: https://secure.phabricator.com/D5887

Conflicts:

	src/__celerity_resource_map__.php

Conflicts:

	src/__celerity_resource_map__.php
This commit is contained in:
Afaque Hussain 2013-05-12 06:52:53 -07:00 committed by epriestley
parent 13e03c3d6c
commit 8ab4b88504
2 changed files with 24 additions and 24 deletions

View file

@ -2258,7 +2258,7 @@ celerity_register_resource_map(array(
),
'javelin-behavior-repository-crossreference' =>
array(
'uri' => '/res/4b5fab1c/rsrc/js/application/repository/repository-crossreference.js',
'uri' => '/res/d3f9d50b/rsrc/js/application/repository/repository-crossreference.js',
'type' => 'js',
'requires' =>
array(
@ -4133,7 +4133,7 @@ celerity_register_resource_map(array(
'uri' => '/res/pkg/dd27a69b/differential.pkg.css',
'type' => 'css',
),
'27c55b30' =>
'77e07ff4' =>
array(
'name' => 'differential.pkg.js',
'symbols' =>
@ -4159,7 +4159,7 @@ celerity_register_resource_map(array(
18 => 'javelin-behavior-differential-toggle-files',
19 => 'javelin-behavior-differential-user-select',
),
'uri' => '/res/pkg/27c55b30/differential.pkg.js',
'uri' => '/res/pkg/77e07ff4/differential.pkg.js',
'type' => 'js',
),
'c8ce2d88' =>
@ -4256,7 +4256,7 @@ celerity_register_resource_map(array(
'aphront-typeahead-control-css' => 'd8236471',
'differential-changeset-view-css' => 'dd27a69b',
'differential-core-view-css' => 'dd27a69b',
'differential-inline-comment-editor' => '27c55b30',
'differential-inline-comment-editor' => '77e07ff4',
'differential-local-commits-view-css' => 'dd27a69b',
'differential-results-table-css' => 'dd27a69b',
'differential-revision-add-comment-css' => 'dd27a69b',
@ -4274,24 +4274,24 @@ celerity_register_resource_map(array(
'javelin-behavior-aphlict-dropdown' => '26980a1c',
'javelin-behavior-aphlict-listen' => '26980a1c',
'javelin-behavior-aphront-basic-tokenizer' => '26980a1c',
'javelin-behavior-aphront-drag-and-drop' => '27c55b30',
'javelin-behavior-aphront-drag-and-drop-textarea' => '27c55b30',
'javelin-behavior-aphront-drag-and-drop' => '77e07ff4',
'javelin-behavior-aphront-drag-and-drop-textarea' => '77e07ff4',
'javelin-behavior-aphront-form-disable-on-submit' => '26980a1c',
'javelin-behavior-audit-preview' => 'f96657b8',
'javelin-behavior-dark-console' => '4ccfeb47',
'javelin-behavior-device' => '26980a1c',
'javelin-behavior-differential-accept-with-errors' => '27c55b30',
'javelin-behavior-differential-add-reviewers-and-ccs' => '27c55b30',
'javelin-behavior-differential-comment-jump' => '27c55b30',
'javelin-behavior-differential-diff-radios' => '27c55b30',
'javelin-behavior-differential-dropdown-menus' => '27c55b30',
'javelin-behavior-differential-edit-inline-comments' => '27c55b30',
'javelin-behavior-differential-feedback-preview' => '27c55b30',
'javelin-behavior-differential-keyboard-navigation' => '27c55b30',
'javelin-behavior-differential-populate' => '27c55b30',
'javelin-behavior-differential-show-more' => '27c55b30',
'javelin-behavior-differential-toggle-files' => '27c55b30',
'javelin-behavior-differential-user-select' => '27c55b30',
'javelin-behavior-differential-accept-with-errors' => '77e07ff4',
'javelin-behavior-differential-add-reviewers-and-ccs' => '77e07ff4',
'javelin-behavior-differential-comment-jump' => '77e07ff4',
'javelin-behavior-differential-diff-radios' => '77e07ff4',
'javelin-behavior-differential-dropdown-menus' => '77e07ff4',
'javelin-behavior-differential-edit-inline-comments' => '77e07ff4',
'javelin-behavior-differential-feedback-preview' => '77e07ff4',
'javelin-behavior-differential-keyboard-navigation' => '77e07ff4',
'javelin-behavior-differential-populate' => '77e07ff4',
'javelin-behavior-differential-show-more' => '77e07ff4',
'javelin-behavior-differential-toggle-files' => '77e07ff4',
'javelin-behavior-differential-user-select' => '77e07ff4',
'javelin-behavior-diffusion-commit-graph' => 'f96657b8',
'javelin-behavior-diffusion-pull-lastmodified' => 'f96657b8',
'javelin-behavior-error-log' => '4ccfeb47',
@ -4299,7 +4299,7 @@ celerity_register_resource_map(array(
'javelin-behavior-history-install' => '26980a1c',
'javelin-behavior-konami' => '26980a1c',
'javelin-behavior-lightbox-attachments' => '26980a1c',
'javelin-behavior-load-blame' => '27c55b30',
'javelin-behavior-load-blame' => '77e07ff4',
'javelin-behavior-maniphest-batch-selector' => 'f85eb6d8',
'javelin-behavior-maniphest-subpriority-editor' => 'f85eb6d8',
'javelin-behavior-maniphest-transaction-controls' => 'f85eb6d8',
@ -4310,7 +4310,7 @@ celerity_register_resource_map(array(
'javelin-behavior-phabricator-gesture' => '26980a1c',
'javelin-behavior-phabricator-keyboard-shortcuts' => '26980a1c',
'javelin-behavior-phabricator-nav' => '26980a1c',
'javelin-behavior-phabricator-object-selector' => '27c55b30',
'javelin-behavior-phabricator-object-selector' => '77e07ff4',
'javelin-behavior-phabricator-oncopy' => '26980a1c',
'javelin-behavior-phabricator-remarkup-assist' => '26980a1c',
'javelin-behavior-phabricator-reveal-content' => '26980a1c',
@ -4318,7 +4318,7 @@ celerity_register_resource_map(array(
'javelin-behavior-phabricator-tooltips' => '26980a1c',
'javelin-behavior-phabricator-watch-anchor' => '26980a1c',
'javelin-behavior-refresh-csrf' => '26980a1c',
'javelin-behavior-repository-crossreference' => '27c55b30',
'javelin-behavior-repository-crossreference' => '77e07ff4',
'javelin-behavior-toggle-class' => '26980a1c',
'javelin-behavior-workflow' => '26980a1c',
'javelin-dom' => '202a3dd0',
@ -4348,7 +4348,7 @@ celerity_register_resource_map(array(
'phabricator-core-css' => 'd8236471',
'phabricator-crumbs-view-css' => 'd8236471',
'phabricator-directory-css' => 'd8236471',
'phabricator-drag-and-drop-file-upload' => '27c55b30',
'phabricator-drag-and-drop-file-upload' => '77e07ff4',
'phabricator-dropdown-menu' => '26980a1c',
'phabricator-file-upload' => '26980a1c',
'phabricator-filetree-view-css' => 'd8236471',
@ -4370,7 +4370,7 @@ celerity_register_resource_map(array(
'phabricator-prefab' => '26980a1c',
'phabricator-project-tag-css' => '6b1fccc6',
'phabricator-remarkup-css' => 'd8236471',
'phabricator-shaped-request' => '27c55b30',
'phabricator-shaped-request' => '77e07ff4',
'phabricator-side-menu-view-css' => 'd8236471',
'phabricator-standard-page-view' => 'd8236471',
'phabricator-textareautils' => '26980a1c',

View file

@ -55,7 +55,7 @@ JX.behavior('repository-crossreference', function(config) {
}
function linkAll(section) {
var blocks = section.getElementsByClassName('remarkup-code-block');
var blocks = JX.DOM.scry(document.body, 'div', 'remarkup-code-block');
for (var i = 0; i < blocks.length; ++i) {
if (blocks[i].hasAttribute('data-code-lang')) {
var lang = blocks[i].getAttribute('data-code-lang');