Sha256: 97995fbfba058e8a7214a2a263e5f94b8ed57090581c47bdcdb41623d16b5c00

Contents?: true

Size: 1.7 KB

Versions: 28

Compression:

Stored size: 1.7 KB

Contents

#
# ja/nicovideo.rb - Japanese resource
#
# Copyright (C) TADA Tadashi <sho@spc.gr.jp>
# Distributed under GPL.
#

def nicovideo_player_path
	'http://www.nicovideo.jp'
end

def nicovideo_feed( i )
	<<-HTML
		<table border="0" cellpadding="4" cellspacing="0" summary="#{h i[:title]}"><tr valign="top">
		<td><a href="#{i[:url]}"><img alt="#{h i[:title]}" src="#{i[:thumb]}" width="130" height="100" style="border:solid 1px #333;"></a></td>
		<td width="100%"><a href="#{i[:url]}"><strong>#{h i[:title]}</strong></a> (#{i[:length]})<br>#{i[:desc]}</td>
		</tr></table>
	HTML
end

def nicovideo_html( i )
	<<-HTML
		<table border="0" cellpadding="4" cellspacing="0" summary="#{h i[:title]}" style="margin-left:0em;">
		<tr valign="top">
		<td style="font-size:70%;border-width:0px;">
		<div style="margin:4px 0px;"><a href="#{i[:url]}" onclick="return nicovideoPlayer( '#{i[:id]}' );"><img alt="#{h i[:title]}" src="#{i[:thumb]}" width="130" height="100" style="border:solid 1px #333;"></a></div>
		<p><strong>#{i[:date][0,10]}</strong><br>
		再生: <strong>#{i[:view].scan(/\d+?(?=\d{3}*$)/).join(",")}</strong><br>
		コメント: <strong>#{i[:comment_num].scan(/\d+?(?=\d{3}*$)/).join(",")}</strong><br>
		マイリスト: <strong>#{i[:mylist].scan(/\d+?(?=\d{3}*$)/).join(",")}</strong></p>
		</td>
		<td width="100%" style="font-size:80%;border-width:0px;">
		<p><a href="#{i[:url]}" class="video" onclick="return nicovideoPlayer( '#{i[:id]}' );"><strong>#{h i[:title]}</strong></a> (#{i[:length].split(/:/).map{|j|'%02d' % j.to_i}.join(':')})<br>#{i[:desc]}</p>
		<div style="background:#FFF; border:solid 2px #CCC; padding:6px; margin-top:4px;">
		<p><strong>#{i[:comment]}</strong></p>
		</div>
		</td>
		</tr>
		</table>
	HTML
end

Version data entries

28 entries across 23 versions & 2 rubygems

Version Path
tdiary-contrib-5.0.6 plugin/ja/nicovideo.rb
tdiary-contrib-5.0.5 plugin/ja/nicovideo.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-a3c5f37278c4/plugin/ja/nicovideo.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-f08988dfa0f6/plugin/ja/nicovideo.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-fa9c20aa0d97/plugin/ja/nicovideo.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/ja/nicovideo.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/ja/nicovideo.rb
tdiary-contrib-5.0.4 plugin/ja/nicovideo.rb
tdiary-5.0.4 vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/ja/nicovideo.rb
tdiary-contrib-5.0.3 plugin/ja/nicovideo.rb
tdiary-contrib-5.0.2 plugin/ja/nicovideo.rb
tdiary-contrib-5.0.1 plugin/ja/nicovideo.rb
tdiary-contrib-5.0.0 plugin/ja/nicovideo.rb
tdiary-contrib-4.2.1 plugin/ja/nicovideo.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/bundler/gems/tdiary-contrib-2ab36447ae2a/plugin/ja/nicovideo.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/bundler/gems/tdiary-contrib-d189eb6688f1/plugin/ja/nicovideo.rb
tdiary-contrib-4.2.0 plugin/ja/nicovideo.rb
tdiary-contrib-4.1.3 plugin/ja/nicovideo.rb
tdiary-contrib-4.1.2 plugin/ja/nicovideo.rb
tdiary-contrib-4.1.1 plugin/ja/nicovideo.rb