tdiary-contrib 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/js/image_ex.js +1 -1
- data/js/jquery.socialbutton.js +1 -0
- data/js/slideshow.js +123 -0
- data/js/socialbutton.js +1 -1
- data/lib/tdiary/contrib/version.rb +1 -1
- data/plugin/category_to_tagcloud.rb +18 -14
- data/plugin/datepicker.rb +1 -1
- data/plugin/flickr.rb +38 -15
- data/plugin/google_map.rb +1 -1
- data/plugin/image_gps.rb +2 -4
- data/plugin/ja/flickr.rb +2 -2
- data/plugin/slideshow.rb +20 -0
- data/plugin/socialbutton.rb +11 -9
- data/plugin/steam.rb +21 -0
- metadata +6 -5
- data/js/preview.js +0 -50
- data/plugin/preview.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45164104afb789350f27df675a67c5883a5c9c24
|
4
|
+
data.tar.gz: 693b82c14081911639444d97110b253253fecc65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da67a8625a789a06f07cdda68dbbb952cbae06be3ee3741caaeb6a43e4a69589359058d092b6caf8e5b42df73dbefef50fc8fb6e2f9d80fcccb27436721c754f
|
7
|
+
data.tar.gz: 817c91cba026b251ecb6c10bda31c99297ebf5ea011092686630f749a78be3cc4d387b23c27ae8869167ffe06d689ff9f86822a105ea5f3fabce753652b81647
|
data/js/image_ex.js
CHANGED
data/js/jquery.socialbutton.js
CHANGED
@@ -669,6 +669,7 @@ function socialbutton_hatena(target, options, defaults, index, max_index)
|
|
669
669
|
var attr = merge_attributes({
|
670
670
|
'href': 'https://b.hatena.ne.jp/entry/' + url,
|
671
671
|
'class': 'hatena-bookmark-button',
|
672
|
+
'data-hatena-bookmark-url': url,
|
672
673
|
'data-hatena-bookmark-title': title,
|
673
674
|
'data-hatena-bookmark-layout': layout,
|
674
675
|
'title': 'このエントリーをはてなブックマークに追加'
|
data/js/slideshow.js
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
/*
|
2
|
+
* slideshow.js : show slides
|
3
|
+
*
|
4
|
+
* Copyright (C) 2016 by TADA Tadashi <t@tdtds.jp>
|
5
|
+
* Distributed under the GPL2 or any later version.
|
6
|
+
*/
|
7
|
+
|
8
|
+
$(function(){
|
9
|
+
function isFullscreenEnabled(doc) {
|
10
|
+
return(
|
11
|
+
doc.fullscreenEnabled ||
|
12
|
+
doc.webkitFullscreenEnabled ||
|
13
|
+
doc.mozFullScreenEnabled ||
|
14
|
+
doc.msFullscreenEnabled ||
|
15
|
+
false
|
16
|
+
);
|
17
|
+
};
|
18
|
+
|
19
|
+
function requestFullscreen(element) {
|
20
|
+
var funcs = [
|
21
|
+
'requestFullscreen',
|
22
|
+
'webkitRequestFullscreen',
|
23
|
+
'mozRequestFullScreen',
|
24
|
+
'msRequestFullscreen',
|
25
|
+
];
|
26
|
+
$.each(funcs, function(idx, func) {
|
27
|
+
if (element[func]) {
|
28
|
+
element[func]();
|
29
|
+
return false;
|
30
|
+
}
|
31
|
+
});
|
32
|
+
};
|
33
|
+
|
34
|
+
function isFullscreen() {
|
35
|
+
if (document.fullscreenElement ||
|
36
|
+
document.webkitFullscreenElement ||
|
37
|
+
document.mozFullScreenElement ||
|
38
|
+
document.msFullscreenElement ) {
|
39
|
+
return true;
|
40
|
+
}
|
41
|
+
return false;
|
42
|
+
};
|
43
|
+
|
44
|
+
function startSlideShow(content) {
|
45
|
+
if (!isFullscreenEnabled(document)) {
|
46
|
+
return false;
|
47
|
+
}
|
48
|
+
|
49
|
+
var slides = [];
|
50
|
+
$.each(content.children(), function(i, elem) {
|
51
|
+
var e = $(elem).clone();
|
52
|
+
if (e.prop('tagName') == 'H3') { // main title
|
53
|
+
$('a', e).remove(); // section anchor
|
54
|
+
$('span', e).remove(); // hatena start etc...
|
55
|
+
$('button.slideshow', e).remove();
|
56
|
+
slides.push([$('<div class="slide-title">').append(e)]);
|
57
|
+
} else if (e.prop('tagName') == 'H4') { // page title
|
58
|
+
slides.push([e, $('<div class="slide-body">')]);
|
59
|
+
} else {
|
60
|
+
var last = slides[slides.length-1];
|
61
|
+
last[last.length-1].append(e);
|
62
|
+
}
|
63
|
+
});
|
64
|
+
|
65
|
+
var screen = window.screen;
|
66
|
+
var slide = $('<div>').
|
67
|
+
addClass('slide').
|
68
|
+
css('width', screen.width).
|
69
|
+
css('height', screen.height);
|
70
|
+
var current_page = 0;
|
71
|
+
var firstClick = true;
|
72
|
+
|
73
|
+
$('body').append(slide);
|
74
|
+
slide.append(slides[current_page]);
|
75
|
+
requestFullscreen(slide[current_page]);
|
76
|
+
|
77
|
+
$(document).on({
|
78
|
+
'keydown': function(e) {
|
79
|
+
if (e.keyCode == 13 || e.keyCode == 34 || e.keyCode == 39) { // next page
|
80
|
+
if (slides.length - 1 > current_page) {
|
81
|
+
e.preventDefault();
|
82
|
+
slide.empty().append(slides[++current_page]);
|
83
|
+
}
|
84
|
+
} else if (e.keyCode == 37 || e.keyCode == 33) { // prev page
|
85
|
+
if (current_page > 0) {
|
86
|
+
e.preventDefault();
|
87
|
+
slide.empty().append(slides[--current_page]);
|
88
|
+
}
|
89
|
+
} else if (e.keyCode == 36) { // [Home] to top page
|
90
|
+
e.preventDefault();
|
91
|
+
slide.empty().append(slides[current_page = 0]);
|
92
|
+
} else if (e.keyCode == 35) { // [End] to bottom page
|
93
|
+
e.preventDefault();
|
94
|
+
slide.empty().append(slides[current_page = slides.length-1]);
|
95
|
+
}
|
96
|
+
},
|
97
|
+
'click': function() {
|
98
|
+
if (!firstClick && slides.length - 1 > current_page) {
|
99
|
+
slide.empty().append(slides[++current_page]);
|
100
|
+
}
|
101
|
+
firstClick = false;
|
102
|
+
},
|
103
|
+
'fullscreenchange webkitfullscreenchange mozfullscreenchange msfullscreenchange': function() {
|
104
|
+
if (!isFullscreen()) { // fullscreen was closed
|
105
|
+
$(document).off('keydown').off('click');
|
106
|
+
slide.remove();
|
107
|
+
}
|
108
|
+
}
|
109
|
+
});
|
110
|
+
|
111
|
+
return true;
|
112
|
+
};
|
113
|
+
|
114
|
+
$('.slideshow').on('click', function(e){
|
115
|
+
var section = $(this).parent().parent();
|
116
|
+
e.preventDefault();
|
117
|
+
if (!startSlideShow(section)) {
|
118
|
+
alert("couldn't start slideshow.")
|
119
|
+
return;
|
120
|
+
}
|
121
|
+
});
|
122
|
+
});
|
123
|
+
|
data/js/socialbutton.js
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
require 'pstore'
|
15
15
|
|
16
16
|
def category_enable?
|
17
|
-
!@plugin_files.grep(/\/category\.rb$/).empty?
|
17
|
+
!@plugin_files.grep(/\/category\-legacy\.rb$/).empty?
|
18
18
|
end
|
19
19
|
|
20
20
|
def add tag, url, count, elapsed_time
|
@@ -69,20 +69,24 @@ def tag_list limit = nil
|
|
69
69
|
return '' if bot?
|
70
70
|
return '' unless category_enable?
|
71
71
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
72
|
+
begin
|
73
|
+
init_category_to_tagcloud
|
74
|
+
cache = @conf['category_to_tagcloud.cache']
|
75
|
+
@limit = limit
|
76
|
+
|
77
|
+
PStore.new(cache).transaction(read_only=true) do |db|
|
78
|
+
break unless db.root?('tagcloud') or db.root?('last_update')
|
79
|
+
break if Time.now.strftime('%Y%m%d').to_i > db['last_update']
|
80
|
+
@counts = db['tagcloud'][0]
|
81
|
+
@urls = db['tagcloud'][1]
|
82
|
+
@elapsed_times = db['tagcloud'][2]
|
83
|
+
end
|
83
84
|
|
84
|
-
|
85
|
-
|
85
|
+
gen_tag_list if @urls.empty?
|
86
|
+
print_html
|
87
|
+
rescue TypeError
|
88
|
+
'<p class="message">category plugin does not support category_to_tagcloud plugin. use category_legacy plugin instead of categoty plugin.</p>'
|
89
|
+
end
|
86
90
|
end
|
87
91
|
|
88
92
|
def styleclass diff
|
data/plugin/datepicker.rb
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
return if feed?
|
13
13
|
|
14
14
|
if /\A(?:form|preview|append|edit|update)\z/ =~ @mode
|
15
|
-
enable_js('//ajax.googleapis.com/ajax/libs/jqueryui/1.
|
15
|
+
enable_js('//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js')
|
16
16
|
if @conf.lang == 'ja'
|
17
17
|
enable_js('//ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-ja.min.js')
|
18
18
|
end
|
data/plugin/flickr.rb
CHANGED
@@ -27,10 +27,10 @@ require 'rexml/document'
|
|
27
27
|
@conf['flickr.default_size'] ||= 'medium'
|
28
28
|
|
29
29
|
if /\A(form|edit|preview|showcomment)\z/ === @mode then
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
enable_js('flickr.js')
|
31
|
+
add_js_setting('$tDiary.plugin.flickr')
|
32
|
+
add_js_setting('$tDiary.plugin.flickr.apiKey', %Q|'#{@conf['flickr.apikey']}'|)
|
33
|
+
add_js_setting('$tDiary.plugin.flickr.userId', %Q|'#{@conf['flickr.user_id']}'|)
|
34
34
|
end
|
35
35
|
|
36
36
|
def flickr(photo_id, size = nil, place = 'flickr')
|
@@ -59,17 +59,34 @@ def flickr_photo_info(photo_id, size)
|
|
59
59
|
|
60
60
|
begin
|
61
61
|
flickr_open('flickr.photos.getInfo', photo_id) {|f|
|
62
|
-
|
63
|
-
|
64
|
-
|
62
|
+
if defined?(Oga)
|
63
|
+
res = Oga.parse_xml(f)
|
64
|
+
photo[:page] = res.xpath('/rsp/photo/urls/url').text
|
65
|
+
photo[:title] = res.xpath('/rsp/photo/title').text
|
66
|
+
else
|
67
|
+
res = REXML::Document.new(f)
|
68
|
+
photo[:page] = res.elements['//rsp/photo/urls/url'].text
|
69
|
+
photo[:title] = res.elements['//rsp/photo/title'].text
|
70
|
+
end
|
65
71
|
}
|
66
72
|
flickr_open('flickr.photos.getSizes', photo_id) {|f|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
+
if defined?(Oga)
|
74
|
+
res = Oga.parse_xml(f)
|
75
|
+
res.xpath('//rsp/sizes/size').each do |s|
|
76
|
+
if s.get('label').downcase == size.downcase
|
77
|
+
photo[:src] = s.get('source')
|
78
|
+
photo[:width] = s.get('width')
|
79
|
+
photo[:height] = s.get('height')
|
80
|
+
end
|
81
|
+
end
|
82
|
+
else
|
83
|
+
res = REXML::Document.new(f)
|
84
|
+
res.elements.each('//rsp/sizes/size') do |s|
|
85
|
+
if s.attributes['label'].downcase == size.downcase
|
86
|
+
photo[:src] = s.attributes['source']
|
87
|
+
photo[:width] = s.attributes['width']
|
88
|
+
photo[:height] = s.attributes['height']
|
89
|
+
end
|
73
90
|
end
|
74
91
|
end
|
75
92
|
}
|
@@ -124,21 +141,27 @@ add_edit_proc do |date|
|
|
124
141
|
<option value="40">40</option>
|
125
142
|
<option value="50">50</option>
|
126
143
|
</select>
|
127
|
-
|
144
|
+
件
|
128
145
|
<input id="flickr_search" type="button" value="Get flickr photos"></input>
|
129
146
|
</div>
|
130
147
|
<div id="flickr_photo_size">
|
131
|
-
|
148
|
+
Photo size:
|
132
149
|
<input type="radio" id="flickr_photo_size_square" name="flickr_photo_size" value="square">
|
133
150
|
<label for="flickr_photo_size_square">square</label>
|
151
|
+
<input type="radio" id="flickr_photo_size_large_square" name="flickr_photo_size" value="large square">
|
152
|
+
<label for="flickr_photo_size_large_square">large square</label>
|
134
153
|
<input type="radio" id="flickr_photo_size_thumbnail" name="flickr_photo_size" value="thumbnail">
|
135
154
|
<label for="flickr_photo_size_thumbnail">thumbnail</label>
|
136
155
|
<input type="radio" id="flickr_photo_size_small" name="flickr_photo_size" value="small">
|
137
156
|
<label for="flickr_photo_size_small">small</label>
|
157
|
+
<input type="radio" id="flickr_photo_size_small320" name="flickr_photo_size" value="small 320">
|
158
|
+
<label for="flickr_photo_size_small320">small 320</label>
|
138
159
|
<input type="radio" id="flickr_photo_size_medium" name="flickr_photo_size" value="medium" checked="true">
|
139
160
|
<label for="flickr_photo_size_medium">medium</label>
|
140
161
|
<input type="radio" id="flickr_photo_size_medium640" name="flickr_photo_size" value="medium 640">
|
141
162
|
<label for="flickr_photo_size_medium640">medium 640</label>
|
163
|
+
<input type="radio" id="flickr_photo_size_medium800" name="flickr_photo_size" value="medium 800">
|
164
|
+
<label for="flickr_photo_size_medium800">medium 800</label>
|
142
165
|
<input type="radio" id="flickr_photo_size_large" name="flickr_photo_size" value="large">
|
143
166
|
<label for="flickr_photo_size_large">large</label>
|
144
167
|
</div>
|
data/plugin/google_map.rb
CHANGED
@@ -58,7 +58,7 @@ end
|
|
58
58
|
|
59
59
|
add_header_proc do
|
60
60
|
if /\A(?:latest|day|month|nyear|preview)\z/ =~ @mode
|
61
|
-
%Q|<script type="text/javascript" src="
|
61
|
+
%Q|<script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=true"></script>\n|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
data/plugin/image_gps.rb
CHANGED
@@ -68,15 +68,13 @@ def image( id, alt = 'image', thumbnail = nil, size = nil, place = 'photo' )
|
|
68
68
|
google_maps_api_key = @conf['image_gps.google_maps_api_key']
|
69
69
|
google_maps_api_key = '' if google_maps_api_key.nil?
|
70
70
|
if (@conf['image_gps.map_link_url'].nil? || @conf['image_gps.map_link_url'].empty?)
|
71
|
-
map_link_url = '"
|
71
|
+
map_link_url = '"//maps.google.co.jp/maps?q=#{lat},#{lon}"'
|
72
72
|
else
|
73
73
|
map_link_url = '"'+@conf['image_gps.map_link_url']+'"'
|
74
74
|
end
|
75
75
|
|
76
76
|
exif = ExifParser.new("#{@image_dir}/#{image}".untaint) rescue nil
|
77
77
|
|
78
|
-
google = "http://maps.google.co.jp"
|
79
|
-
|
80
78
|
if exif
|
81
79
|
#GPS Info
|
82
80
|
begin
|
@@ -103,7 +101,7 @@ def image( id, alt = 'image', thumbnail = nil, size = nil, place = 'photo' )
|
|
103
101
|
}
|
104
102
|
unless lat.nil?
|
105
103
|
unless google_maps_api_key == ''
|
106
|
-
map_img = %Q["
|
104
|
+
map_img = %Q["//maps.googleapis.com/maps/api/staticmap?format=gif&]
|
107
105
|
map_img += %Q[center=#{lat},#{lon}&zoom=14&size=200x200&markers=#{lat},#{lon}&]
|
108
106
|
map_img += %Q[key=#{google_maps_api_key}&sensor=false"]
|
109
107
|
end
|
data/plugin/ja/flickr.rb
CHANGED
@@ -18,7 +18,7 @@ add_conf_proc('flickr', 'Flickr プラグイン') do
|
|
18
18
|
<dt>画像ID</dt>
|
19
19
|
<dd>それぞれの写真に一意に付けられる番号です。<br>画像IDは Flickr で画像を表示したときの URL に含まれています。</dd>
|
20
20
|
<dt>画像サイズ</dt>
|
21
|
-
<dd>表示する画像の大きさを square, thumbnail, small, medium, large から指定します。<br>この値は省略できます。省略すると、画像は設定画面(この画面)で指定したサイズで表示されます。</dd>
|
21
|
+
<dd>表示する画像の大きさを square, large square, thumbnail, small, small 320, medium, medium 640, medium 800, large から指定します。<br>この値は省略できます。省略すると、画像は設定画面(この画面)で指定したサイズで表示されます。</dd>
|
22
22
|
</dl>
|
23
23
|
|
24
24
|
<h3>標準の画像サイズ</h3>
|
@@ -26,7 +26,7 @@ add_conf_proc('flickr', 'Flickr プラグイン') do
|
|
26
26
|
<p>
|
27
27
|
<select name="flickr.default_size">
|
28
28
|
_HTML
|
29
|
-
%w(square thumbnail small medium large).each do |size|
|
29
|
+
%w(square large\ square thumbnail small small\ 320 medium medium\ 640 medium\ 800 large).each do |size|
|
30
30
|
selected = (size == @conf['flickr.default_size']) ? 'selected' : ''
|
31
31
|
r << %Q|<option value="#{size}" #{selected}>#{size}</option>|
|
32
32
|
end
|
data/plugin/slideshow.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# slideshow.rb : tDiary plugin for show slides
|
3
|
+
#
|
4
|
+
# Copyright (C) 2016 TADA Tadashi
|
5
|
+
# Distributed under the GPL2 or any later version.
|
6
|
+
#
|
7
|
+
# @options['slideshow.css'] = "URL of CSS"
|
8
|
+
#
|
9
|
+
|
10
|
+
enable_js('slideshow.js')
|
11
|
+
|
12
|
+
def slideshow
|
13
|
+
%Q|<button class="slideshow">Start Slideshow >></button>|
|
14
|
+
end
|
15
|
+
|
16
|
+
if @conf['slideshow.css']
|
17
|
+
add_header_proc do
|
18
|
+
%Q[<link rel="stylesheet" href="#{h @conf['slideshow.css']}" media="screen">]
|
19
|
+
end
|
20
|
+
end
|
data/plugin/socialbutton.rb
CHANGED
@@ -25,13 +25,6 @@ def socialbutton_js_settings
|
|
25
25
|
add_js_setting('$tDiary.plugin.socialbutton.options', options)
|
26
26
|
end
|
27
27
|
|
28
|
-
socialbutton_footer = Proc.new { %Q|<div class="socialbuttons"></div>| }
|
29
|
-
if respond_to?(:blogkit?) && blogkit?
|
30
|
-
add_body_leave_proc(socialbutton_footer)
|
31
|
-
else
|
32
|
-
add_section_leave_proc(socialbutton_footer)
|
33
|
-
end
|
34
|
-
|
35
28
|
add_conf_proc('socialbutton', @socialbutton_label_conf) do
|
36
29
|
@conf['socialbutton.enables'] ||= []
|
37
30
|
if @mode == 'saveconf'
|
@@ -56,5 +49,14 @@ add_conf_proc('socialbutton', @socialbutton_label_conf) do
|
|
56
49
|
HTML
|
57
50
|
end
|
58
51
|
|
59
|
-
|
60
|
-
|
52
|
+
if @mode =~ /^(latest|day|month|nyear)$/
|
53
|
+
socialbutton_footer = Proc.new { %Q|<div class="socialbuttons"></div>| }
|
54
|
+
if respond_to?(:blogkit?) && blogkit?
|
55
|
+
add_body_leave_proc(socialbutton_footer)
|
56
|
+
else
|
57
|
+
add_section_leave_proc(socialbutton_footer)
|
58
|
+
end
|
59
|
+
|
60
|
+
# load javascript
|
61
|
+
socialbutton_js_settings()
|
62
|
+
end
|
data/plugin/steam.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# steam.rb $Revision: 1.0 $
|
3
|
+
#
|
4
|
+
# 概要:
|
5
|
+
# steam(store.steampowered.com)のゲームのウィジェットを
|
6
|
+
# 貼るプラグインです。
|
7
|
+
#
|
8
|
+
# 使い方:
|
9
|
+
# steamの任意のゲームのID(store.steampowered.com/app/{id})
|
10
|
+
# を指定することにより、ウィジェットが貼り付けられます。
|
11
|
+
#
|
12
|
+
# Copyright (c) 2016 kp <kp@mmho.net>
|
13
|
+
# Distributed under the GPL
|
14
|
+
#
|
15
|
+
|
16
|
+
=begin ChangeLog
|
17
|
+
=end
|
18
|
+
|
19
|
+
def steam( id )
|
20
|
+
%Q[<iframe src="//store.steampowered.com/widget/#{id}/" frameborder="0" width="646" height="190" style="max-width:100%;"></iframe>]
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tdiary-contrib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tDiary contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tdiary
|
@@ -193,9 +193,9 @@ files:
|
|
193
193
|
- js/nicovideo.js
|
194
194
|
- js/picasa.js
|
195
195
|
- js/plugin_checker.js
|
196
|
-
- js/preview.js
|
197
196
|
- js/referer.js
|
198
197
|
- js/show_and_hide.js
|
198
|
+
- js/slideshow.js
|
199
199
|
- js/socialbutton.js
|
200
200
|
- js/twitter_anywhere.js
|
201
201
|
- js/yahoo_kousei.js
|
@@ -317,7 +317,6 @@ files:
|
|
317
317
|
- plugin/plugin_checker.rb
|
318
318
|
- plugin/popit.rb
|
319
319
|
- plugin/prettify.rb
|
320
|
-
- plugin/preview.rb
|
321
320
|
- plugin/prezi.rb
|
322
321
|
- plugin/profile.rb
|
323
322
|
- plugin/puboo.rb
|
@@ -340,8 +339,10 @@ files:
|
|
340
339
|
- plugin/select_theme.rb
|
341
340
|
- plugin/show_and_hide.rb
|
342
341
|
- plugin/slideshare.rb
|
342
|
+
- plugin/slideshow.rb
|
343
343
|
- plugin/socialbutton.rb
|
344
344
|
- plugin/squeeze.rb
|
345
|
+
- plugin/steam.rb
|
345
346
|
- plugin/tatsu_zine.rb
|
346
347
|
- plugin/tdiarytimes2.rb
|
347
348
|
- plugin/tdiarytimes_flashstyle.rb
|
@@ -502,7 +503,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
502
503
|
version: '0'
|
503
504
|
requirements: []
|
504
505
|
rubyforge_project:
|
505
|
-
rubygems_version: 2.
|
506
|
+
rubygems_version: 2.6.4
|
506
507
|
signing_key:
|
507
508
|
specification_version: 4
|
508
509
|
summary: tDiary contributions package
|
data/js/preview.js
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* preview.js: view preview automatically
|
3
|
-
*
|
4
|
-
* Copyright (c) MATSUOKA Kohei <http://www.machu.jp/>
|
5
|
-
* Distributed under the GPL2 or any later version.
|
6
|
-
*/
|
7
|
-
$(function() {
|
8
|
-
|
9
|
-
var previewButton = $('input[name="appendpreview"]');
|
10
|
-
|
11
|
-
$tDiary.plugin.preview = function() {
|
12
|
-
previewButton.prop("disabled", true);
|
13
|
-
$.post(
|
14
|
-
'update.rb',
|
15
|
-
$('form.update').serialize() + "&appendpreview=1",
|
16
|
-
function(data) {
|
17
|
-
var beforeOffset = $('div.update').offset();
|
18
|
-
$('div.autopagerize_page_element').replaceWith(
|
19
|
-
$(data).find('div.autopagerize_page_element')
|
20
|
-
)
|
21
|
-
var afterOffset = $('div.update').offset();
|
22
|
-
// 自動更新時にスクロール位置を自動調整してみたがカクカクする
|
23
|
-
// window.scrollTo($(window).scrollLeft(),
|
24
|
-
// $(window).scrollTop() + afterOffset.top - beforeOffset.top);
|
25
|
-
setTimeout($tDiary.plugin.preview, 10000);
|
26
|
-
},
|
27
|
-
'html'
|
28
|
-
)
|
29
|
-
.always(function() {
|
30
|
-
previewButton.prop("disabled", false);
|
31
|
-
});
|
32
|
-
}
|
33
|
-
|
34
|
-
if ($('div.autopagerize_page_element').length == 0) {
|
35
|
-
$('div.update').before(
|
36
|
-
$('<div class="autopagerize_page_element"></div>')
|
37
|
-
);
|
38
|
-
}
|
39
|
-
|
40
|
-
// プレビューボタンを押した時もajaxで更新するよう設定
|
41
|
-
previewButton.click(
|
42
|
-
function(event) {
|
43
|
-
event.preventDefault();
|
44
|
-
$tDiary.plugin.preview();
|
45
|
-
}
|
46
|
-
);
|
47
|
-
|
48
|
-
setTimeout($tDiary.plugin.preview, 10000);
|
49
|
-
|
50
|
-
});
|
data/plugin/preview.rb
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8; -*-
|
2
|
-
#
|
3
|
-
# preview.rb: view preview automatically
|
4
|
-
#
|
5
|
-
# Copyright (c) MATSUOKA Kohei <http://www.machu.jp/>
|
6
|
-
# Distributed under the GPL2 or any later version.
|
7
|
-
#
|
8
|
-
if /\A(form|edit|preview)\z/ === @mode then
|
9
|
-
enable_js('preview.js')
|
10
|
-
end
|