mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 09:42:36 +02:00
scrub pdf/txt files and non-subdomain search results
This commit is contained in:
parent
40bef7d125
commit
afef407744
2 changed files with 2 additions and 2 deletions
|
@ -138,7 +138,7 @@ get '/browse/search' do
|
||||||
cx: $config['google_custom_search_cx'],
|
cx: $config['google_custom_search_cx'],
|
||||||
safe: 'active',
|
safe: 'active',
|
||||||
start: @start,
|
start: @start,
|
||||||
q: Rack::Utils.escape(params[:q])
|
q: Rack::Utils.escape(params[:q]) + ' -filetype:pdf -filetype:txt site:*.neocities.org'
|
||||||
})
|
})
|
||||||
|
|
||||||
@items = []
|
@items = []
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
<% if @start > 0 %>
|
<% if @start > 0 %>
|
||||||
<a href="?q=<%= Rack::Utils.escape params[:q] %>&start=<%= [@start-10, 0].max %>"><i class="fa fa-arrow-left arrow"> </i></a>
|
<a href="?q=<%= Rack::Utils.escape params[:q] %>&start=<%= [@start-10, 0].max %>"><i class="fa fa-arrow-left arrow"> </i></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @total_results > @start+10 %>
|
<% if @total_results > @start+10 && @start+10 < 100 %>
|
||||||
<a href="?q=<%= Rack::Utils.escape params[:q] %>&start=<%= @start+10 %>"><i class="fa fa-arrow-right arrow"></i></a>
|
<a href="?q=<%= Rack::Utils.escape params[:q] %>&start=<%= @start+10 %>"><i class="fa fa-arrow-right arrow"></i></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
Loading…
Add table
Reference in a new issue