Open spec1re opened 1 year ago
There is currently no configuration option. You could probably add some code to user.js
for now. (I can come up with something later if you want.)
It might be interesting to implement some kind of event-action system that would allow remapping the item:activate
action to open-link
.
There is currently no configuration option. You could probably add some code to
user.js
for now. (I can come up with something later if you want.)It might be interesting to implement some kind of event-action system that would allow remapping the
item:activate
action toopen-link
.
That would be awesome! Thanks.
I really like Selfoss, I would like to see a "light" mode, no content just links to the news. This would be more consistent, just open a new tab.
How do I do it with user.js? Sorry zero JS knowledge here an quick example would be fine.
Thanks.
This is ugly but seems to work:
function openEntryLink(id) {
window.open(document.querySelector(`.entry[data-entry-id="${id}"]`).getAttribute('data-entry-url'));
}
const entriesPageNotifier = {
set: function(obj, prop, value) {
console.log(obj, prop, value)
obj[prop] = value;
if (prop === 'entriesPage' && value !== null) {
value.activateEntry = openEntryLink;
}
return true;
}
};
selfoss = new Proxy(selfoss, entriesPageNotifier);
if (selfoss.entriesPage !== null && selfoss.entriesPage.activateEntry !== openEntryLink) {
selfoss.entriesPage.activateEntry = openEntryLink;
}
@jtojnar
No this is beautiful and fully serves the purpose.
Thank you very much, much appreciated!
function openEntryLink(id) {
window.open(document.querySelector(`.entry[data-entry-id="${id}"]`).getAttribute('data-entry-url'));
document.getElementById("currentpage").innerHTML = window.location.replace;
}
const entriesPageNotifier = {
set: function(obj, prop, value) {
console.log(obj, prop, value)
obj[prop] = value;
if (prop === 'entriesPage' && value !== null) {
value.activateEntry = openEntryLink;
}
return true;
}
};
selfoss = new Proxy(selfoss, entriesPageNotifier);
if (selfoss.entriesPage !== null && selfoss.entriesPage.activateEntry !== openEntryLink) {
selfoss.entriesPage.activateEntry = openEntryLink;
}
Just a litte edit, makes the page url stay and don't change to the item id.
Is it possible to somehow just open the the link instead of expanding it, like clicking on the favicon or datetime?