Sha256: cd0137227d0c30f3fcc5e1088e6d8b40300496933974652362c5b6e0a40696d6

Contents?: true

Size: 1.69 KB

Versions: 38

Compression:

Stored size: 1.69 KB

Contents

# referer-antibot.rb
#
# 検索エンジンの巡回BOTには「本日のリンク元」を見せないようにする
# これにより、無関係な検索語でアクセスされることが減る(と予想される)
# pluginディレクトリに入れるだけで動作する
#
# オプション:
#   @options['bot']
#      ターゲットにする巡回BOTのUser-Agentを追加する配列。
#      無指定時は["googlebot", "Hatena Antenna", "moget@goo.ne.jp"]のみ。
#
# なお、disp_referrer.rbプラグインには同等の機能が含まれているので、
# disp_referrerを導入済みの場合には入れる必要はない
#
# ---------
#
# This plugin hide Today's Link to search engin's robots.
# It may reduce nose marked by robots.
#
# disp_referrer.rb plugin has already this function. You don't
# need install this plugin with disp_referrer.rb.
#
# Options:
#    @options['bot']
#      An array of User-Agent of search engine's robots.
#      Default setting is ["googlebot", "Hatena Antenna", "moget@goo.ne.jp"].
#
# Copyright (C) 2002 MUTOH Masao <mutoh@highway.ne.jp>
# Modified by TADA Tadashi <sho@spc.gr.jp>
# You can redistribute it and/or modify it under GPL2 or any later version.
#

# short referer
alias referer_of_today_short_antibot_backup referer_of_today_short
def referer_of_today_short( diary, limit )
	return '' if bot?
	referer_of_today_short_antibot_backup( diary, limit )
end

# long referer
alias referer_of_today_long_antibot_backup referer_of_today_long
def referer_of_today_long( diary, limit )
	return '' if bot?
	referer_of_today_long_antibot_backup( diary, limit )
end

# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:

Version data entries

38 entries across 28 versions & 1 rubygems

Version Path
tdiary-5.3.0 misc/plugin/referer-antibot.rb
tdiary-5.2.4 misc/plugin/referer-antibot.rb
tdiary-5.2.3 misc/plugin/referer-antibot.rb
tdiary-5.2.2 misc/plugin/referer-antibot.rb
tdiary-5.2.1 misc/plugin/referer-antibot.rb
tdiary-5.2.0 misc/plugin/referer-antibot.rb
tdiary-5.1.7 misc/plugin/referer-antibot.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/misc/plugin/referer-antibot.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/misc/plugin/referer-antibot.rb
tdiary-5.1.6 misc/plugin/referer-antibot.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/misc/plugin/referer-antibot.rb
tdiary-5.1.5 misc/plugin/referer-antibot.rb
tdiary-5.1.4 misc/plugin/referer-antibot.rb
tdiary-5.1.3 misc/plugin/referer-antibot.rb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/misc/plugin/referer-antibot.rb
tdiary-5.1.2 misc/plugin/referer-antibot.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/misc/plugin/referer-antibot.rb
tdiary-5.1.1 misc/plugin/referer-antibot.rb
tdiary-5.1.0 misc/plugin/referer-antibot.rb
tdiary-5.0.14 misc/plugin/referer-antibot.rb