Skip to content

Commit

Permalink
remove embedly integration
Browse files Browse the repository at this point in the history
  • Loading branch information
mradkov committed May 8, 2020
1 parent a651e85 commit 455a7ab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
1 change: 0 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script async src="//cdn.embedly.com/widgets/platform.js" charset="UTF-8"></script>
</body>
</html>
32 changes: 1 addition & 31 deletions src/components/tipRecords/TipRecord.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
</div>
<div
v-if="isPreviewToBeVisualized(tip) && !embedlyPreview(tip)"
v-if="isPreviewToBeVisualized(tip)"
class="tip__article"
>
<div class="tip__article--hasresults">
Expand Down Expand Up @@ -82,21 +82,6 @@
>
</div>
</div>
<div
v-else-if="embedlyPreview(tip)"
class="tip__url"
>
<a
:href="tip.url"
:title="tip.url"
class="embedly-card text-ellipsis"
data-card-theme="dark"
data-card-controls="0"
data-card-via=""
data-card-recommend="0"
data-card-key="57b5154650e74bf19e4f106468d90770"
>{{ tip.url }}</a>
</div>
<div
v-else
class="tip__url"
Expand Down Expand Up @@ -184,22 +169,7 @@ export default {
return this.isPreviewToBeVisualized(this.tip) && this.tip.preview.image !== null ? Backend.getTipPreviewUrl(this.tip.preview.image) : '';
},
},
activated() {
if (this.embedlyPreview(this.tip)) {
setTimeout(() => {
this.key = `${this.tip.id}_${new Date().getTime()}`;
}, 500);
}
},
methods: {
embedlyPreview(tip) {
return (
tip.url.indexOf('youtube') > -1
|| tip.url.indexOf('youtu.be') > -1
|| (tip.url.indexOf('twitter') > -1 && tip.url.indexOf('status') > -1)
|| tip.url.indexOf('facebook') > -1
);
},
isPreviewToBeVisualized(tip) {
return typeof tip !== 'undefined' && tip !== null
&& typeof tip.preview !== 'undefined'
Expand Down

1 comment on commit 455a7ab

@mradkov
Copy link
Contributor Author

@mradkov mradkov commented on 455a7ab May 8, 2020

Choose a reason for hiding this comment

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

Please sign in to comment.