Skip to content

Commit e525423

Browse files
committed
Add LINE button to Social Buttons partial
1 parent 2401b1b commit e525423

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/views/shared/_social_buttons.html.haml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@
99
%a.hatena-bookmark-button{"data-hatena-bookmark-lang" => "ja", "data-hatena-bookmark-layout" => "basic", "data-hatena-bookmark-title" => "#{full_title(yield(:title))}", :href => "#{full_url(yield(:url))}", :title => "このエントリーをはてなブックマークに追加"}
1010
%img{:alt => "このエントリーをはてなブックマークに追加", :height => "20", :src => "https://b.st-hatena.com/images/entry-button/button-only@2x.png", :style => "border: none;", :width => "20"}/
1111
%script{:async => "async", :charset => "utf-8", :src => "https://b.st-hatena.com/js/bookmark_button.js", :type => "text/javascript"}
12+
%li{:style => "display: none;"}
13+
.line-it-button{"data-lang" => "ja", "data-type" => "line", "data-url" => "#{full_url(yield(:url))}" }
14+
%script{ src: "https://d.line-scdn.net/r/web/social-plugin/js/thirdparty/loader.min.js", async: "async", defer: "defer"}

config/initializers/csp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
src = %w(* 'unsafe-inline' 'unsafe-eval' data:
33
*.google-analytics.com *.googleapis.com *.google.com *.gstatic.com
44
*.facebook.net *.facebook.com *.twitter.com *.mailchimp.com
5-
*.hatena.ne.jp *.st-hatena.com
5+
*.hatena.ne.jp *.st-hatena.com *.line-scdn.net
66
*.slidesharecdn.com *.slideshare.net)
77
config.csp = {
88
report_only: false,

0 commit comments

Comments
 (0)