in modules/ROOT/attachments/javadocs/typedevent/0.0.2/remote-spi/search-page.js [27:59]
$(function() {
var copy = $("#page-search-copy");
var expand = $("#page-search-expand");
var searchLink = $("span#page-search-link");
var redirect = $("input#search-redirect");
function setSearchUrlTemplate() {
var href = document.location.href.split(/[#?]/)[0];
href += "?q=" + "%s";
if (redirect.is(":checked")) {
href += "&r=1";
}
searchLink.html(href);
copy[0].onmouseenter();
}
function copyLink(e) {
copyToClipboard(this.previousSibling.innerText);
switchCopyLabel(this, this.lastElementChild);
}
copy.click(copyLink);
copy[0].onmouseenter = function() {};
redirect.click(setSearchUrlTemplate);
setSearchUrlTemplate();
copy.prop("disabled", false);
redirect.prop("disabled", false);
expand.click(function (e) {
var searchInfo = $("div.page-search-info");
if(this.parentElement.hasAttribute("open")) {
searchInfo.attr("style", "border-width: 0;");
} else {
searchInfo.attr("style", "border-width: 1px;").height(searchInfo.prop("scrollHeight"));
}
});
});