(Go: >> BACK << -|- >> HOME <<)

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(qrcode): add google qrcode api support #385

Merged
merged 1 commit into from
Jun 11, 2017
Merged

feat(qrcode): add google qrcode api support #385

merged 1 commit into from
Jun 11, 2017

Conversation

neoFelhz
Copy link
Collaborator

Contributing rules

  • Fork the repo and create your branch from canary. Then be sure to put the canary branch as the target for your pull request.
  • Please be sure to follow the contributing guidelines, especially for commit message
  • Remove the Contributing rules part from this description
  • Fill out the other parts from this description

If you don't do so, we might change your pull request's title and using squash to merge your changed.

What kind of change does this PR introduce? (check one with "x")

  • Bug fix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

Description

Add another Qrcode API : chart.googleapis.com

Use the language configuration to decide which api to be use.


Verification steps

No verification steps.

@neoFelhz neoFelhz requested review from cubesky and iblh June 10, 2017 03:11
@@ -9,6 +9,6 @@
margin: 2
}) %>">
<% } else if(theme.qrcode.use === "online") { %>
<img src="https://pan.baidu.com/share/qrcode?w=246&h=246&url=<%= page.permalink %>">
<img src="<% if(config.language === "zh-CN") { %>https://pan.baidu.com/share/qrcode?w=246&h=246&url=<%= page.permalink %><% } else { %>https://chart.googleapis.com/chart?cht=qr&chs=246x246&chl=<%= page.permalink %>&chld=M|2<% } %>">
Copy link
Collaborator
@cubesky cubesky Jun 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may cause error when config.language not config. Use

if(config.language !== null)

to avoid this error and increase compatibility.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact. when the language is not being configured, it will use google chart api.

@neoFelhz neoFelhz merged commit 8c74d29 into canary Jun 11, 2017
@neoFelhz neoFelhz deleted the feat/qrcode branch June 11, 2017 03:32
@neoFelhz neoFelhz mentioned this pull request Jun 21, 2017
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants