vue-socials
Version:
Social media share buttons and counts for Vue.js
45 lines (41 loc) • 1.41 kB
JavaScript
import { defineComponent } from 'vue';
import BaseSocials from '../../mixins/BaseSocial/BaseSocial.js';
import getSerialisedParams from '../../utils/getSerialisedParams.js';
import getSeparatedList from '../../utils/getSeparatedList.js';
/**
* Hey!
*
* SGoogleBookmarks component used for Google social network
* @link https://www.google.com/bookmarks/
* @example https://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=https%3A%2F%2Fgithub.com%2F&title=Title&annotation=Annotation&labels=tag
*/
/**
* Share parameters for link
*/
var SGoogleBookmarks = /* #__PURE__ */defineComponent({
name: 'SGoogleBookmarks',
mixins: [BaseSocials('Google Bookmarks')],
computed: {
networkURL: function networkURL() {
var BASE_URL = 'https://www.google.com/bookmarks/mark';
var shareOptions = this.shareOptions;
var url = shareOptions.url,
title = shareOptions.title,
annotation = shareOptions.annotation,
tags = shareOptions.tags;
var serialisedParams = getSerialisedParams({
op: 'edit',
output: 'popup',
bkmk: url,
title: title,
annotation: annotation,
labels: getSeparatedList(tags)
});
return "".concat(BASE_URL).concat(serialisedParams);
}
},
render: function render() {
return this.generateComponent(this.networkURL);
}
});
export default SGoogleBookmarks;