Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
cerca.ubuntu-it.org
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
cerca.ubuntu-it.org
Commits
9cdd3380
Commit
9cdd3380
authored
Aug 26, 2017
by
Pietro Albini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the new Google Custom Search API
The old one was deprecated, and will be removed soon.
parent
dc2a178b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
24 deletions
+15
-24
www/index.html
www/index.html
+15
-24
No files found.
www/index.html
View file @
9cdd3380
...
...
@@ -103,30 +103,21 @@
Non avete trovato quello che cercate?
<a
href=
"http://www.ubuntu-it.org/contatti"
>
Contattateci
</a>
!
</div>
<div
id=
"cse"
style=
"width: 100%;"
>
Caricamento...
</div>
<script
src=
"https://www.google.it/jsapi"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
>
google
.
load
(
'
search
'
,
'
1
'
,
{
language
:
'
it
'
,
style
:
google
.
loader
.
themes
.
V2_DEFAULT
});
google
.
setOnLoadCallback
(
function
()
{
var
customSearchOptions
=
{};
var
customSearchControl
=
new
google
.
search
.
CustomSearchControl
(
'
008742922050479854700:9nnmuh99is4
'
,
customSearchOptions
);
customSearchControl
.
setResultSetSize
(
google
.
search
.
Search
.
FILTERED_CSE_RESULTSET
);
customSearchControl
.
draw
(
'
cse
'
);
HASH_LABEL
=
"
#
"
;
// Start search handling url hash
customSearchControl
.
execute
(
window
.
location
.
hash
.
substring
(
HASH_LABEL
.
length
));
// Update hash after search
customSearchControl
.
setSearchCompleteCallback
(
customSearchControl
,
function
()
{
window
.
location
.
hash
=
HASH_LABEL
+
this
.
getInputQuery
();
}
)
},
true
);
<gcse:search></gcse:search>
<script>
(
function
()
{
var
cx
=
'
008742922050479854700:9nnmuh99is4
'
;
var
gcse
=
document
.
createElement
(
'
script
'
);
gcse
.
type
=
'
text/javascript
'
;
gcse
.
async
=
true
;
gcse
.
src
=
'
https://cse.google.com/cse.js?cx=
'
+
cx
;
var
s
=
document
.
getElementsByTagName
(
'
script
'
)[
0
];
s
.
parentNode
.
insertBefore
(
gcse
,
s
);
})();
</script>
...
...
Write
Preview
Markdown
is supported
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