Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ryan Dee
UNL_Search
Commits
a16558ce
Commit
a16558ce
authored
Apr 04, 2017
by
Tyler R Lemburg
Browse files
Cache bust CSS and fix auto-switching
parent
e6fe3a1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/js/search.js
View file @
a16558ce
...
...
@@ -194,10 +194,12 @@ define(['jquery', 'analytics'], function ($, analytics) {
});
$
(
'
img.gcsc-branding-img-noclear
'
,
$root
).
attr
(
'
alt
'
,
'
Google™
'
);
if
(
!
searchToggleLock
&&
localGoogleSearch
&&
control
==
localGoogleSearch
.
control
&&
$
(
'
.gs-no-results-result
'
,
$root
).
length
)
{
$root
.
closest
(
'
.results-group
'
).
find
(
'
.result-tab li:last-child
'
).
click
();
return
;
}
setTimeout
(
function
()
{
if
(
!
searchToggleLock
&&
localGoogleSearch
&&
control
==
localGoogleSearch
.
control
&&
$
(
'
.gs-no-results-result
'
,
$root
).
length
)
{
$root
.
closest
(
'
.results-group
'
).
find
(
'
.result-tab li:last-child
'
).
click
();
return
;
}
},
1000
);
$root
.
closest
(
resultSel
).
addClass
(
actCls
);
$root
.
closest
(
googleSel
).
slideDown
();
...
...
@@ -290,6 +292,8 @@ define(['jquery', 'analytics'], function ($, analytics) {
}
};
$
(
'
#unl_results
'
).
hide
();
var
render_attrs
=
{
div
:
'
unl_results
'
,
tag
:
'
searchresults-only
'
,
...
...
www/templates/end-scripts.tpl.php
View file @
a16558ce
...
...
@@ -19,7 +19,7 @@ require(['jquery', '<?php echo $localScriptUrl ?>'], function($, UNLSearch) {
}).
appendTo
(
$
(
'
body
'
));
var
$localCss
=
$
(
'
<link>
'
,
{
'
href
'
:
'
./css/search-google.css
'
'
href
'
:
'
./css/search-google.css
?v=20170404
'
});
gSearchDefer
.
done
(
function
(
google
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment