mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
unselect "read here"
This commit is contained in:
parent
60f1df388f
commit
d67da61a65
@ -189,7 +189,10 @@
|
|||||||
<button class="toolbar-item" id="content-appearance" v-b-tooltip.hover.bottom="'Appearance'">
|
<button class="toolbar-item" id="content-appearance" v-b-tooltip.hover.bottom="'Appearance'">
|
||||||
<span class="icon">{% inline "sliders.svg" %}</span>
|
<span class="icon">{% inline "sliders.svg" %}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="toolbar-item" @click="getReadable(itemSelectedDetails)" v-b-tooltip.hover.bottom="'Read Here'">
|
<button class="toolbar-item"
|
||||||
|
:class="{loading: loading.readability, active: itemSelectedReadability}"
|
||||||
|
@click="getReadable(itemSelectedDetails)"
|
||||||
|
v-b-tooltip.hover.bottom="'Read Here'">
|
||||||
<span class="icon">{% inline "book-open.svg" %}</span>
|
<span class="icon">{% inline "book-open.svg" %}</span>
|
||||||
</button>
|
</button>
|
||||||
<a class="toolbar-item" :href="itemSelectedDetails.link" target="_blank" v-b-tooltip.hover.bottom="'Open Link'">
|
<a class="toolbar-item" :href="itemSelectedDetails.link" target="_blank" v-b-tooltip.hover.bottom="'Open Link'">
|
||||||
|
@ -148,6 +148,7 @@ var vm = new Vue({
|
|||||||
'feeds': false,
|
'feeds': false,
|
||||||
'newfeed': false,
|
'newfeed': false,
|
||||||
'items': false,
|
'items': false,
|
||||||
|
'readability': false,
|
||||||
},
|
},
|
||||||
'fonts': FONTS,
|
'fonts': FONTS,
|
||||||
'feedStats': {},
|
'feedStats': {},
|
||||||
@ -501,8 +502,14 @@ var vm = new Vue({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getReadable: function(item) {
|
getReadable: function(item) {
|
||||||
|
if (this.itemSelectedReadability) {
|
||||||
|
this.itemSelectedReadability = null
|
||||||
|
return
|
||||||
|
}
|
||||||
if (item.link) {
|
if (item.link) {
|
||||||
|
this.loading.readability = true
|
||||||
api.crawl(item.link).then(function(body) {
|
api.crawl(item.link).then(function(body) {
|
||||||
|
vm.loading.readability = false
|
||||||
if (!body.length) return
|
if (!body.length) return
|
||||||
var bodyClean = sanitize(body, vm.feedsById[item.feed_id].link || item.link)
|
var bodyClean = sanitize(body, vm.feedsById[item.feed_id].link || item.link)
|
||||||
var doc = new DOMParser().parseFromString(bodyClean, 'text/html')
|
var doc = new DOMParser().parseFromString(bodyClean, 'text/html')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user