Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tweak CSP and styles to fix search look.

Fix bug 751249 751271.
  • Loading branch information...
commit 0d2a377176039617651c7f3e12ec268c393083e4 1 parent c5832c5
@pmclanahan pmclanahan authored
View
15 media/css/google-search.css
@@ -4,6 +4,9 @@
*/
.cse .gsc-control-cse,
.gsc-control-cse {
+ background-color: transparent !important;
+ border: none !important;
+ padding: 0 !important;
width: auto;
}
.cse .gsc-control-wrapper-cse,
@@ -298,8 +301,8 @@ div.gsc-cursor-current-page {
.gsc-table-result,
.gsc-thumbnail-inside,
.gsc-url-top {
- padding-left: 8px;
- padding-right: 8px;
+ padding-left: 0 !important;
+ padding-right: 0 !important;
}
.gs-promotion-table {
@@ -442,7 +445,9 @@ table.gs-promotion-table-snippet-with-image{
text-decoration: none;
padding-bottom: 2px;
}
-
+.gsc-results {
+ width: 100% !important;
+}
.gsc-results .gsc-cursor-box {
margin: 10px;
}
@@ -531,6 +536,7 @@ td.gsc-branding-text, td.gcsc-branding-text {
.gcsc-branding {
padding-top: 2px;
+ padding-right: 0 !important;
font-size: 13px;
}
table.gsc-branding, table.gcsc-branding {
@@ -619,3 +625,6 @@ a.gsc-trailing-more-results:link {
.gs-promotion div.gs-visibleUrl-long {
display: block;
}
+.gsc-webResult.gsc-result {
+ border: none !important;
+}
View
8 media/js/google-search.js
@@ -4,6 +4,14 @@ google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl(
'003721718359151553648:qipcq6hq6uy', customSearchOptions);
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
+ customSearchControl.setSearchStartingCallback(
+ this,
+ function(control, searcher) {
+ searcher.setRestriction(
+ google.search.Search.RESTRICT_EXTENDED_ARGS,
+ { "filter" : "0"});
+ }
+ );
var options = new google.search.DrawOptions();
options.enableSearchResultsOnly();
customSearchControl.draw('cse', options);
View
17 settings.py
@@ -361,19 +361,23 @@ def JINJA_CONFIG():
'https://www.mozilla.org',
'http://statse.webtrendslive.com',
'https://statse.webtrendslive.com',
- 'http://www.google.com',
- 'https://www.google.com',
+ 'http://*.google.com',
+ 'https://*.google.com',
'data:',
)
CSP_STYLE_SRC = (
"'self'",
'http://www.mozilla.org',
'https://www.mozilla.org',
+ 'http://*.google.com',
+ 'https://*.google.com',
)
CSP_FONT_SRC = (
"'self'",
'http://www.mozilla.org',
'https://www.mozilla.org',
+ 'http://*.google.com',
+ 'https://*.google.com',
)
CSP_SCRIPT_SRC = (
"'self'",
@@ -383,8 +387,13 @@ def JINJA_CONFIG():
'https://www.mozilla.org',
'http://statse.webtrendslive.com',
'https://statse.webtrendslive.com',
- 'http://www.google.com',
- 'https://www.google.com',
+ 'http://*.google.com',
+ 'https://*.google.com',
+)
+CSP_FRAME_SRC = (
+ "'self'",
+ 'http://*.google.com',
+ 'https://*.google.com',
)
CSP_OPTIONS = (
'eval-script',
Please sign in to comment.
Something went wrong with that request. Please try again.