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

amp-access-laterpay: Laterpay badge changes #18465

Merged
merged 1 commit into from Oct 1, 2018
File filter...
Filter file types
Jump to file or symbol
Failed to load files and symbols.
+11 −2
Diff settings

Always

Just for now

@@ -36,6 +36,8 @@ const CONFIG_URLS = {
},
};

const LATERPAY_BADGE_URL = 'https://blog.laterpay.net/laterpay-academy/what-is-laterpay';

const DEFAULT_REGION = 'eu';

const CONFIG_BASE_PATH = '/api/v2/fetch/amp/?' +
@@ -50,6 +52,8 @@ const DEFAULT_MESSAGES = {
defaultButton: 'Buy Now',
alreadyPurchasedLink: 'I already bought this',
sandbox: 'Site in test mode. No payment required.',
laterpayBadgePrefix: 'Powered by ',
laterpayBadgeSuffix: '',
};

/**
@@ -429,13 +433,18 @@ export class LaterpayVendor {
*/
createLaterpayBadge_() {
const a = this.createElement_('a');
a.href = 'https://laterpay.net';
a.href = LATERPAY_BADGE_URL;
a.target = '_blank';
a.textContent = 'LaterPay';
const el = this.createElement_('p');
const prefix = this.createElement_('span');
prefix.textContent = this.i18n_['laterpayBadgePrefix'];
const suffix = this.createElement_('span');
suffix.textContent = this.i18n_['laterpayBadgeSuffix'];
el.className = TAG + '-badge';
el.textContent = 'Powered by ';
el.appendChild(prefix);
el.appendChild(a);
el.appendChild(suffix);
return el;
}

ProTip! Use n and p to navigate between commits in a pull request.