This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from 1natsu172/fix/sharebutton-mixin
fix/pageUrl pathSetting
- Loading branch information
Showing
4 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ mixin shareButton(serviceName, type = 'official') | |
official: | ||
`<a href="http://b.hatena.ne.jp/entry/" class="hatena-bookmark-button" data-hatena-bookmark-layout="basic-label-counter" data-hatena-bookmark-lang="ja" title="このエントリーをはてなブックマークに追加"><img src="https://b.st-hatena.com/images/entry-button/[email protected]" alt="このエントリーをはてなブックマークに追加" width="20" height="20" style="border: none;" /></a><script type="text/javascript" src="https://b.st-hatena.com/js/bookmark_button.js" charset="utf-8" async="async"></script>`, | ||
custom: { | ||
href: `http://b.hatena.ne.jp/add?mode=confirm&url=${ siteSetting.rootUrl + pageSummary.pageUrl }`, | ||
href: `http://b.hatena.ne.jp/add?mode=confirm&url=${ siteSetting.rootUrl + pathSetting.pageUrl() }`, | ||
onclick: `window.open(this.href, 'HATEBUwindow', 'width=520, height=480, menubar=no, toolbar=no, scrollbars=yes'); return false;`, | ||
target: "_blank", | ||
rel: "noopener noreferrer" | ||
|
@@ -18,7 +18,7 @@ mixin shareButton(serviceName, type = 'official') | |
<script src="https://d.line-scdn.net/r/web/social-plugin/js/thirdparty/loader.min.js" async="async" defer="defer"></script> | ||
<script type="text/javascript">window.addEventListener("load", function() { LineIt.loadButton() });</script>`, | ||
custom: { | ||
href: 'https://timeline.line.me/social-plugin/share?url=' + encodeURIComponent(siteSetting.rootUrl + pageSummary.pageUrl), | ||
href: 'https://timeline.line.me/social-plugin/share?url=' + encodeURIComponent(siteSetting.rootUrl + pathSetting.pageUrl()), | ||
onclick: `window.open(this.href, 'LINEwindow', 'width=700, height=650, menubar=no, toolbar=no, scrollbars=yes'); return false;`, | ||
target: "_blank", | ||
rel: "noopener noreferrer" | ||
|
@@ -31,7 +31,7 @@ mixin shareButton(serviceName, type = 'official') | |
custom: { | ||
href: (function shareURL() { | ||
const tweetParameter = { | ||
url: 'url=' + encodeURIComponent(siteSetting.rootUrl + pageSummary.pageUrl) + '&', | ||
url: 'url=' + encodeURIComponent(siteSetting.rootUrl + pathSetting.pageUrl()) + '&', | ||
// via: 'via=' + encodeURIComponent(siteSetting.twitterUserName[0]) + '&', | ||
related: 'related=' + encodeURIComponent(siteSetting.twitterUserName) + '&', | ||
hashtag: 'hashtags=' + encodeURIComponent(siteSetting.hashtag) + '&', | ||
|
@@ -61,9 +61,9 @@ mixin shareButton(serviceName, type = 'official') | |
js.src = "//connect.facebook.net/ja_JP/sdk.js#xfbml=1&version=v2.10"; | ||
fjs.parentNode.insertBefore(js, fjs); | ||
}(document, 'script', 'facebook-jssdk'));</script> | ||
<div class="fb-share-button" data-href="${ siteSetting.rootUrl + pageSummary.pageUrl }" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=${ encodeURIComponent(siteSetting.rootUrl + pageSummary.pageUrl) }&src=sdkpreparse">シェア</a></div>`, | ||
<div class="fb-share-button" data-href="${ siteSetting.rootUrl + pathSetting.pageUrl() }" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=${ encodeURIComponent(siteSetting.rootUrl + pathSetting.pageUrl()) }&src=sdkpreparse">シェア</a></div>`, | ||
custom: { | ||
href: 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(siteSetting.rootUrl + pageSummary.pageUrl), | ||
href: 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(siteSetting.rootUrl + pathSetting.pageUrl()), | ||
onclick: `window.open(this.href, 'FBwindow', 'width=680, height=640, menubar=no, toolbar=no, scrollbars=yes'); return false;`, | ||
target: "_blank", | ||
rel: "noopener noreferrer" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters