Skip to content

Commit

Permalink
update readme to refelct config changes and more accurate function na…
Browse files Browse the repository at this point in the history
…mes in linkmate-options
  • Loading branch information
PhilWinchester committed Feb 25, 2019
1 parent c6dbfec commit 8605851
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions extensions/amp-smartlinks/0.1/linkmate-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
export function getConfigOptions(element) {
return {
nrtvSlug: getNrtvAccountName_(element),
linkmateEnabled: getLinkmateFlag_(element),
exclusiveLinks: getExclusiveLinksFlag_(element),
linkmateEnabled: hasLinkmateFlag_(element),
exclusiveLinks: hasExclusiveLinksFlag_(element),
linkAttribute: getLinkAttribute_(element),
linkSelector: getLinkSelector_(element),
};
Expand All @@ -48,7 +48,7 @@ function getNrtvAccountName_(element) {
* @return {boolean}
* @private
*/
function getLinkmateFlag_(element) {
function hasLinkmateFlag_(element) {
return !!element.hasAttribute('linkmate');
}

Expand All @@ -57,7 +57,7 @@ function getLinkmateFlag_(element) {
* @param {!Element} element
* @return {boolean}
*/
function getExclusiveLinksFlag_(element) {
function hasExclusiveLinksFlag_(element) {
return !!element.hasAttribute('exclusive-links');
}

Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-smartlinks/amp-smartlinks.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ In your AMP page you will have to add the following snippets:
</tr>
<tr>
<td class="col-fourty"><strong>linkmate</strong></td>
<td><strong>Required</strong></td>
<td><strong>Optional</strong></td>
<td>Flag to run our Linkmate service on an article. Inserting the attribute <code>linkmate</code> in the <code>amp-smartlinks</code> element will run our linkmate service.</td>
</tr>
<tr>
Expand Down

0 comments on commit 8605851

Please sign in to comment.