Sha256: b00eec2bed830bc1dd33bbb37d8aac7b75b3302bc6ba1bdb9d9305db8af1f5dc

Contents?: true

Size: 1.04 KB

Versions: 52

Compression:

Stored size: 1.04 KB

Contents

# opensearch_ad.rb $Revision: 1.1 $
#
# Copyright (c) 2008 SHIBATA Hiroshi <h-sbt@nifty.com>
# Distributed under the GPL
#

if /\A(?:latest|day)\z/ =~ @mode then
	if @conf['opensearch.xml'] and @conf['opensearch.title'] then
		opensearch_xml = @conf['opensearch.xml']
		opensearch_title = @conf['opensearch.title']

		add_header_proc do
			result = <<-HTML
			<link type="application/opensearchdescription+xml" rel="search" title="#{h(opensearch_title)}" href="#{h(opensearch_xml)}">
			HTML
			result.gsub( /^\t\t/, '' )
		end
	end
end

add_conf_proc( 'opensearch_ad', 'OpenSearch Auto-Discovery' ) do
	if @mode == 'saveconf'
		@conf['opensearch.xml'] = @cgi.params['opensearch.xml'][0]
		@conf['opensearch.title'] = @cgi.params['opensearch.title'][0]
	end

	<<-HTML
	<h3 class="subtitle">Tilte for OpenSearch</h3>
	<p><input name="opensearch.title" value="#{h(@conf['opensearch.title'])}" size="80"></p>
	<h3 class="subtitle">URI for OpenSearch description XML</h3>
	<p><input name="opensearch.xml" value="#{h(@conf['opensearch.xml'])}" size="80"></p>
	HTML
end

Version data entries

52 entries across 46 versions & 2 rubygems

Version Path
tdiary-contrib-5.3.0 plugin/opensearch_ad.rb
tdiary-contrib-5.2.4 plugin/opensearch_ad.rb
tdiary-contrib-5.2.3 plugin/opensearch_ad.rb
tdiary-contrib-5.2.2 plugin/opensearch_ad.rb
tdiary-contrib-5.2.1 plugin/opensearch_ad.rb
tdiary-contrib-5.2.0 plugin/opensearch_ad.rb
tdiary-contrib-5.1.7 plugin/opensearch_ad.rb
tdiary-contrib-5.1.6 plugin/opensearch_ad.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/plugin/opensearch_ad.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/bundler/gems/tdiary-contrib-d1e41204db13/plugin/opensearch_ad.rb
tdiary-contrib-5.1.5 plugin/opensearch_ad.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/plugin/opensearch_ad.rb
tdiary-contrib-5.1.4 plugin/opensearch_ad.rb
tdiary-contrib-5.1.3 plugin/opensearch_ad.rb
tdiary-contrib-5.1.2 plugin/opensearch_ad.rb
tdiary-contrib-5.1.1 plugin/opensearch_ad.rb
tdiary-contrib-5.1.0 plugin/opensearch_ad.rb
tdiary-contrib-5.0.13 plugin/opensearch_ad.rb
tdiary-contrib-5.0.12 plugin/opensearch_ad.rb
tdiary-contrib-5.0.11 plugin/opensearch_ad.rb