Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F35337137
behavior-watch-anchor.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
818 B
Subscribers
None
behavior-watch-anchor.js
View Options
/**
* @provides javelin-behavior-phabricator-watch-anchor
* @requires javelin-behavior
* javelin-stratcom
* javelin-util
* javelin-dom
*/
JX
.
behavior
(
'phabricator-watch-anchor'
,
function
()
{
var
highlighted
;
function
highlight
()
{
highlighted
&&
JX
.
DOM
.
alterClass
(
highlighted
,
'anchor-target'
,
false
);
try
{
highlighted
=
JX
.
$
(
'anchor-'
+
window
.
location
.
hash
.
replace
(
'#'
,
''
));
JX
.
DOM
.
alterClass
(
highlighted
,
'anchor-target'
,
true
);
}
catch
(
ex
)
{
if
(
ex
===
JX
.
$
.
NotFound
)
{
highlighted
=
null
;
}
else
{
throw
ex
;
}
}
}
JX
.
Stratcom
.
listen
(
'hashchange'
,
null
,
// Defer invocation so other listeners can update the document.
function
()
{
JX
.
defer
(
highlight
);
});
JX
.
defer
(
highlight
);
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 6, 8:14 AM (7 h, 40 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3c/31/c6b016595e950768ed0b186dc72e
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment