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 @@
...
@@ -103,30 +103,21 @@
Non avete trovato quello che cercate?
<a
href=
"http://www.ubuntu-it.org/contatti"
>
Contattateci
</a>
!
Non avete trovato quello che cercate?
<a
href=
"http://www.ubuntu-it.org/contatti"
>
Contattateci
</a>
!
</div>
</div>
<div
id=
"cse"
style=
"width: 100%;"
>
Caricamento...
</div>
<gcse:search></gcse:search>
<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
});
<script>
google
.
setOnLoadCallback
(
function
()
{
(
function
()
{
var
customSearchOptions
=
{};
var
customSearchControl
=
new
google
.
search
.
CustomSearchControl
(
var
cx
=
'
008742922050479854700:9nnmuh99is4
'
;
'
008742922050479854700:9nnmuh99is4
'
,
customSearchOptions
);
customSearchControl
.
setResultSetSize
(
google
.
search
.
Search
.
FILTERED_CSE_RESULTSET
);
var
gcse
=
document
.
createElement
(
'
script
'
);
customSearchControl
.
draw
(
'
cse
'
);
gcse
.
type
=
'
text/javascript
'
;
gcse
.
async
=
true
;
HASH_LABEL
=
"
#
"
;
gcse
.
src
=
'
https://cse.google.com/cse.js?cx=
'
+
cx
;
// Start search handling url hash
var
s
=
document
.
getElementsByTagName
(
'
script
'
)[
0
];
customSearchControl
.
execute
(
window
.
location
.
hash
.
substring
(
HASH_LABEL
.
length
));
s
.
parentNode
.
insertBefore
(
gcse
,
s
);
})();
// Update hash after search
customSearchControl
.
setSearchCompleteCallback
(
customSearchControl
,
function
()
{
window
.
location
.
hash
=
HASH_LABEL
+
this
.
getInputQuery
();
}
)
},
true
);
</script>
</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