Permalink
Browse files

Merge branch 'master', remote branch 'official/master'

  • Loading branch information...
2 parents d79dd3d + a927d49 commit 9d70e8a0e01a33e84d7a2d02d637e23964b7c469 @tamoot committed Mar 10, 2012
@@ -1,39 +0,0 @@
-! 概要
-tDiaryのヘッダに[[Account Auto-Discovery|http://d.hatena.ne.jp/naoya/20050729/1122598831]](旧[[Hatena ID Auto-Discovery|http://d.hatena.ne.jp/naoya/20050722/1121993475]])を埋め込みます。
-
-! 使い方
-tDiaryのプラグインフォルダに入れるだけです。インストール後、プラグイン選択からaccount_ad.rbを選択し、設定画面からAccount NameにはてなIDを設定してください。
-
-! 更新履歴
-!! 20080120
-* openid.rb をベースにリファクタリング
-
-!! 20070109
-* サニタイズキャンペーンに伴う修正
-
-!! 20050812
-* add_head_procにブロック引数を渡していたので削除
-* account_nameが未設定のときはRDF埋め込みを抑制
-
-!! 20050810
-* dayモード時にはpermalinkを表示するように変更
-* 設定画面を微調整
-* 名前をaccount_id.rbからaccount_ad.rbに変更
-* 名前をhatena_id.rbからaccount_id.rbに変更
-* アカウントサービスを変更できるように設定。デフォルトはhttp://www.hatena.ne.jp/
-
-!! 20050809
-* [[Account Auto-Discovery を dc:creator から foaf:maker へ|http://d.hatena.ne.jp/naoya/20050804/1123142579]]の仕様変更に対応
-
-!! 20050725
-* [[RFC: 続・Hatena ID Auto-Discovery の仕様|http://d.hatena.ne.jp/naoya/20050725/1122277102]]の仕様変更に対応
-
-!! 20050723
-* サニタイズ漏れを修正
-* 初期化の修正
-
-!! 20050722
-* 初版公開
-
-! ライセンス
-GPL
@@ -7,7 +7,7 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
- * Version: 1.8.0
+ * Version: 1.8.1
*/
/**
@@ -152,12 +152,12 @@
* $('#google').socialbutton('google_plusone');
*
* $('#google').socialbutton('google_plusone', {
+ * button: 'standard', // synonym 'size'
+ * url: 'http://itra.jp', // synonym 'href'
* lang: 'ja',
* parsetags: 'explicit',
* callback: 'some_callback_function',
- * count: true,
- * href: 'http://itra.jp/',
- * size: 'standard'
+ * count: true
* });
*
*/
@@ -268,12 +268,12 @@ $.fn.socialbutton = function(service, options) {
padding: 7
},
google_plusone: {
+ button: '', // small, standard, medium, tall
+ url: '',
lang: '', // en-US
parsetags: '', // none(onload), explicit
callback: '',
- count: true, // true, false
- href: '',
- size: '' // small, standard, medium, tall
+ count: true // true, false
}
};
@@ -655,7 +655,7 @@ function socialbutton_hatena(target, options, defaults, index, max_index)
});
var tag = '<a' + attr + '><img src="http://b.st-hatena.com/images/entry-button/button-only.gif" alt="このエントリーをはてなブックマークに追加" width="20" height="20" style="border: none;" /></a>'
- + '<script type="text/javascript" src="http://b.st-hatena.com/js/bookmark_button.js" charset="utf-8" async="async"></script>';
+ + '<script type="text/javascript" src="http://b.st-hatena.com/js/bookmark_button_wo_al.js" charset="utf-8" async="async"></script>';
$(target).html(tag);
}
@@ -684,13 +684,14 @@ function socialbutton_google_plusone(target, options, defaults, index, max_index
return;
}
+ var size = options.size || options.button || defaults.button;
+ var href = options.href || options.url || defaults.url;
+
var lang = options.lang || defaults.lang;
var parsetags = options.parsetags || defaults.parsetags;
var callback = options.callback || defaults.callback;
var count = options.count != undefined ? options.count : defaults.count;
- var href = options.href || defaults.href;
- var size = options.size || defaults.size;
switch (size) {
case 'small':
@@ -731,7 +732,7 @@ function socialbutton_google_plusone(target, options, defaults, index, max_index
script_params = '{' + script_params + '}';
}
- if (typeof gapi === "undefined" || typeof gapi.plusone === "undefined") {
+ if (typeof gapi === 'undefined' || typeof gapi.plusone === 'undefined') {
$('body').append('<script type="text/javascript" src="https://apis.google.com/js/plusone.js">' + script_params + '</script>');
} else {
gapi.plusone.go();
View
@@ -1,67 +0,0 @@
-# account_ad.rb $Revision: 1.3 $
-#
-# Copyright (c) 2008 SHIBATA Hiroshi <h-sbt@nifty.com>
-# Distributed under the GPL
-#
-
-@account_ad_list = {
- # Service => ServiceHomepage
- 'Hatena' => 'http://www.hatena.ne.jp/',
-}
-
-if /\A(?:latest|day)\z/ =~ @mode then
-
- if @conf['account.service'] and @conf['account.name'] then
- if @mode == 'day' and not @date.nil? then
- permalink = @conf.base_url + anchor( @date.strftime('%Y%m%d') )
- else
- permalink = @conf.base_url
- end
-
- account_service = @account_ad_list[@conf['account.service']]
- account_name = @conf['account.name']
-
- add_header_proc do
- result = <<-HTML
- <!--
- <rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:foaf="http://xmlns.com/foaf/0.1/">
- <rdf:Description rdf:about="#{permalink}">
- <foaf:maker rdf:parseType="Resource">
- <foaf:holdsAccount>
- <foaf:OnlineAccount foaf:accountName="#{h account_name}">
- <foaf:accountServiceHomepage rdf:resource="#{h account_service}" />
- </foaf:OnlineAccount>
- </foaf:holdsAccount>
- </foaf:maker>
- </rdf:Description>
- </rdf:RDF>
- -->
- HTML
- result.gsub( /^\t\t/, '' )
- end
- end
-end
-
-add_conf_proc( 'account_ad', 'Account Auto-Discovery' ) do
-
- if @mode == 'saveconf' then
- @conf['account.name'] = @cgi.params['account.name'][0]
- @conf['account.service'] = @cgi.params['account.service'][0]
- end
-
- options = ''
- @account_ad_list.each_key do |key|
- options << %Q|<option value="#{h key}"#{" selected" if @conf['account.service'] == key}>#{h key}</option>\n|
- end
-
- <<-HTML
- <h3 class="subtitle">Account Service</h3>
- <p><select name="account.service">
- #{options}
- </select></p>
- <h3 class="subtitle">Account Name</h3>
- <p><input name="account.name" value="#{h @conf['account.name']}"></p>
- HTML
-end
@@ -56,7 +56,7 @@ def init_buttons_status
add_header_proc do
<<-"EOS"
- <script type="text/javascript" src="http://b.st-hatena.com/js/bookmark_button.js" charset="utf-8" async="async"></script>
+ <script type="text/javascript" src="http://b.st-hatena.com/js/bookmark_button_wo_al.js" charset="utf-8" async="async"></script>
<style type="text/css">iframe.hatena-bookmark-button-frame {margin-bottom: -7px; }</style>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
<style type="text/css">iframe.twitter-share-button.twitter-count-horizontal {margin-bottom: -6px; }</style>
@@ -1,20 +0,0 @@
-# zh/account_ad.rb $Revision: 1.2 $
-#
-# Chinese resources for account_ad.rb
-#
-# Copyright (c) 2005 SHIBATA Hiroshi <h-sbt@nifty.com>
-# Distributed under the GPL
-#
-
-if @mode == 'conf' || @mode == 'saveconf'
- add_conf_proc( 'account_ad', 'Account Auto-Discovery' ) do
- saveconf_account_ad
- account_ad_init
- <<-HTML
- <h3 class="subtitle">Account Name</h3>
- <p><input name="account.name" value="#{h(@conf['account.name'])}" size="8"></p>
- <h3 class="subtitle">Account Service</h3>
- <p><input name="account.service" value="#{h(@conf['account.service'])}" size="40"></p>
- HTML
- end
-end
@@ -1,20 +0,0 @@
-# zh/add_bookmark.rb $Revision 1.3 $
-#
-# Chinaese resource of add_bookmark.rb
-# You can redistribute it and/or modify it under GPL2.
-#
-
-@add_bookmark_label = 'add to bookmark'
-@add_bookmark_desc = 'Please check the link that wants to be displayed.'
-
-@caption_delicious = 'add to del.icio.us'
-@caption_hatena = 'add to Hatena bookmark'
-@caption_livedoor = 'add to livedoor clip'
-@caption_buzzurl = 'add to Buzzurl'
-
-@bookmark_label = [
- 'del.icio.us',
- 'Hatena bookmark',
- 'livedoor Clip',
- 'Buzzurl'
-]
@@ -1,10 +0,0 @@
-#
-# English resource of delicious plugin $Revision: 1.0 $
-#
-# Copyright (C) 2006 SHIBATA Hiroshi <h-sbt@nifty.com>
-# You can redistribute it and/or modify it under GPL2.
-#
-
-@delicious_label_conf = 'del.icio.us'
-@delicious_label_id = 'User ID'
-@delicious_label_pw = 'Password'
@@ -1,25 +0,0 @@
-#
-# Chinese resource of livedoor_weather plugin $Revision$
-#
-# Copyright (C) 2006 SHIBATA Hiroshi <h-sbt@nifty.com>
-# You can redistribute it and/or modify it under GPL2.
-#
-
-#
-# setting of tdiary.conf
-# @options['lwws.city_id'] : City ID where weather information is specified.
-#
-
-@lwws_plugin_name = 'livedoor weather'
-@lwws_label_city_id = 'City ID'
-@lwws_desc_city_id = 'City ID where weather information is specified. Please select City ID from among <a href ="http://weather.livedoor.com/forecast/rss/forecastmap.xml">Point definition table(RSS)</a>'
-@lwws_label_disp_item = 'View items'
-@lwws_desc_disp_item = 'Please select the item to want to display.'
-@lwws_icon_label = 'Icon'
-@lwws_icon_desc = 'Weather information is displayed in the icon. '
-@lwws_max_temp_label = 'Max Tempreture'
-@lwws_min_temp_label = 'Min Tempreture'
-@celsius_label = 'C'
-@lwws_label_cache = 'Auto update of cache'
-@lwws_desc_cache = 'Enable auto update.'
-@lwws_desc_cache_time = 'Please set number of update time.'
@@ -1,38 +0,0 @@
-#
-# 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]})</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]}" target="_blank"><img alt="#{h i[:title]}" src="#{i[:thumb]}" width="130" height="100" style="border:solid 1px #333;"></a></div>
- </td>
- <td width="100%" style="font-size:80%;border-width:0px;">
- <p><a href="#{i[:url]}" target="_blank" class="video"><strong>#{h i[:title]}</strong></a> (#{i[:length].split(/:/).map{|j|'%02d' % j.to_i}.join(':')})</p>
- <p><strong>#{i[:date][0,10]}</strong> Posted<br>
- <strong>#{i[:view].scan(/\d+?(?=\d{3}*$)/).join(",")}</strong> Views<br>
- <strong>#{i[:comment_num].scan(/\d+?(?=\d{3}*$)/).join(",")}</strong> Comments<br>
- <strong>#{i[:mylist].scan(/\d+?(?=\d{3}*$)/).join(",")}</strong> Mylists</p>
- </td>
- </tr>
- </table>
- HTML
-end
View
@@ -1,8 +0,0 @@
-# openid.rb: English resource
-
-@openid_conf_label = 'OpenID'
-@openid_service_label = 'OpenID Service'
-@openid_service_desc = 'select your OpenID service name.'
-@openid_id_label = 'Your ID'
-@openid_id_desc = 'Specify your ID of OpenID service selected above.'
-
Oops, something went wrong.

0 comments on commit 9d70e8a

Please sign in to comment.