show remote content, temporarily
Moderator: athenian200
-
- Fanatic
- Posts: 146
- Joined: 2023-02-24, 17:53
show remote content, temporarily
An earlier thread I created about this has been locked. I do not recall any transgressions therein so I presume the closure is housekeeping only. I would like to raise this issue for attention again, if/when there is time for its consideration.
Simply stated: I would like I way to reverse the action "Show remote content in this message." I don't really care how this reversal is performed, be it per-message or globally, manually or automatically.
Simply stated: I would like I way to reverse the action "Show remote content in this message." I don't really care how this reversal is performed, be it per-message or globally, manually or automatically.
-
- Contributing developer
- Posts: 1611
- Joined: 2018-10-28, 19:56
- Location: Georgia
Re: show remote content, temporarily
Yeah, I didn't close the thread, but I think the threads do lock themselves after a certain amount of time without activity.
The main problem here is the same as what I said before... I just genuinely have no idea how "show remote content" actually works, because I inherited that functionality from Thunderbird, and thus I have no idea how to "unshow" remote content if someone elects to do that.
It seems like it should be fairly trivial in theory, though... just unsetting a flag somewhere that gets set on the message after you click that button.
Does it persist after Epyrus is closed and re-opened, or after you switch to looking at a different message? I always assumed that "show remote content" was a temporary flag that only lasted until you switched to a different message or closed Epyrus, I didn't actually know it was persistent.
One idea I'm wondering about is... whether it's possible that the issue is that once you click that button, the remote content is cached locally, and thus is automatically loaded up when you view the message again. After all, the whole point of having the remote content not shown is to avoid interacting with remote servers... once you've fetched that content, it's on your machine just like the rest of the message is.
So probably it's just an oversight in the original design, because it was assumed that if you have the bandwidth and trust the remote machine hosting the content enough to fetch that stuff for the message, there isn't any reason why you'd want to go back to the "neutered" form of the message that is mostly created for security or bandwidth reasons.
And thus, if that theory is correct, you should be able to stop showing the remote content by clearing the cache somehow. Though I honestly don't really dig down into the options enough to know how to play with all of this...
The main problem here is the same as what I said before... I just genuinely have no idea how "show remote content" actually works, because I inherited that functionality from Thunderbird, and thus I have no idea how to "unshow" remote content if someone elects to do that.
It seems like it should be fairly trivial in theory, though... just unsetting a flag somewhere that gets set on the message after you click that button.
Does it persist after Epyrus is closed and re-opened, or after you switch to looking at a different message? I always assumed that "show remote content" was a temporary flag that only lasted until you switched to a different message or closed Epyrus, I didn't actually know it was persistent.
One idea I'm wondering about is... whether it's possible that the issue is that once you click that button, the remote content is cached locally, and thus is automatically loaded up when you view the message again. After all, the whole point of having the remote content not shown is to avoid interacting with remote servers... once you've fetched that content, it's on your machine just like the rest of the message is.
So probably it's just an oversight in the original design, because it was assumed that if you have the bandwidth and trust the remote machine hosting the content enough to fetch that stuff for the message, there isn't any reason why you'd want to go back to the "neutered" form of the message that is mostly created for security or bandwidth reasons.
And thus, if that theory is correct, you should be able to stop showing the remote content by clearing the cache somehow. Though I honestly don't really dig down into the options enough to know how to play with all of this...
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
- Fanatic
- Posts: 146
- Joined: 2023-02-24, 17:53
Re: show remote content, temporarily
That didn't even occur to me. If that's how this works there is no problem, as it's the presumed repeated network access I am trying to avoid. I don't care to have the server know whenever I look at the message and create a log of my IP address over time, etc. Still it would be good to know how to clear that cache I think?athenian200 wrote: ↑2024-04-02, 02:28One idea I'm wondering about is... whether it's possible that the issue is that once you click that button, the remote content is cached locally, and thus is automatically loaded up when you view the message again. After all, the whole point of having the remote content not shown is to avoid interacting with remote servers... once you've fetched that content, it's on your machine just like the rest of the message is.
Does the Thunderbird Add-On Allow HTML Temp provide any insights?
I found a comment on Reddit but I don't know if this applies to Epyrus and I don't want to break my installation if it doesn't:
darktrojan
This is a shitty solution, but there is no way to do it otherwise. Open load the message, open the Error Console and paste this: setMsgHdrPropertyAndReload("remoteContentPolicy", 0)
-
- Contributing developer
- Posts: 1611
- Joined: 2018-10-28, 19:56
- Location: Georgia
Re: show remote content, temporarily
Yeah, this definitely needs a little research on my part. Especially since this is in a part of the application I don't work with as much.Navigator wrote: ↑2024-04-02, 15:57That didn't even occur to me. If that's how this works there is no problem, as it's the presumed repeated network access I am trying to avoid. I don't care to have the server know whenever I look at the message and create a log of my IP address over time, etc. Still it would be good to know how to clear that cache I think?
That sounds like it could plausibly work with Epyrus, but I haven't tested it myself to be sure. But if it were set via a message header rather than a preference, that would explain why neither I nor MC knew where to look... that's a pretty obscure place that most other UXP applications don't use, but I do remember having a few issues with message header parsing being relied on too heavily in some other contexts as well.I found a comment on Reddit but I don't know if this applies to Epyrus and I don't want to break my installation if it doesn't:
darktrojan
This is a shitty solution, but there is no way to do it otherwise. Open load the message, open the Error Console and paste this: setMsgHdrPropertyAndReload("remoteContentPolicy", 0)
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
- Fanatic
- Posts: 146
- Joined: 2023-02-24, 17:53
Re: show remote content, temporarily
I backed up my profile and tried it. It did not seem to have any effect but I could be doing it wrong as I've never used the code evaluate feature before.athenian200 wrote: ↑2024-04-02, 18:26That sounds like it could plausibly work with Epyrus, but I haven't tested it myself to be sure. But if it were set via a message header rather than a preference, that would explain why neither I nor MC knew where to look... that's a pretty obscure place that most other UXP applications don't use, but I do remember having a few issues with message header parsing being relied on too heavily in some other contexts as well.
-
- Fanatic
- Posts: 146
- Joined: 2023-02-24, 17:53
Re: show remote content, temporarily
I think I figured out how to reset this, but I don't really know what I am doing, I'm just pulling levers.
I searched for the string "remoteContentPolicy" and found it in some .msf files, near the top in what appears to be a kind of compression table, e.g. "(B4=remoteContentPolicy)" but the "B4" part varies from file to file. However in one of these files I found many instances of "^B4=1" but only a few instances of "^B4=2" so I replaced every instance of the latter with the former, saved the file, and started Epyrus. A message in the associated local folder that previously was showing remote content now has it blocked, and the Preferences button is back too.
The compressed format is hard to read so I couldn't figure out which message I was looking at flags for which is why I just replaced all appearances. I also wonder if editing files externally like this could cause something to fall out of sync or some other problem. Therefore even though this appeared to work it's not a good solution. Is there an existing utility for reading and editing .msf files?
I searched for the string "remoteContentPolicy" and found it in some .msf files, near the top in what appears to be a kind of compression table, e.g. "(B4=remoteContentPolicy)" but the "B4" part varies from file to file. However in one of these files I found many instances of "^B4=1" but only a few instances of "^B4=2" so I replaced every instance of the latter with the former, saved the file, and started Epyrus. A message in the associated local folder that previously was showing remote content now has it blocked, and the Preferences button is back too.
The compressed format is hard to read so I couldn't figure out which message I was looking at flags for which is why I just replaced all appearances. I also wonder if editing files externally like this could cause something to fall out of sync or some other problem. Therefore even though this appeared to work it's not a good solution. Is there an existing utility for reading and editing .msf files?
-
- Lunatic
- Posts: 324
- Joined: 2017-11-18, 04:24
Re: show remote content, temporarily
MSF files are written in the infamous "Mork" format. The main reason TBird-etc has not dumped the format long ago and used something else is - it is so insanely fast/small/efficient. The operative word being "insane". It is not human-readable and it's impossible to reverse-engineer. There are various library packages out there in source form that try to decode Mork files, in various languages (never got any of them to work). Not sure if there is any code that successfully writes Mork files, other than TBird and cousins.
Hint: MAB Mork Address Book files may be an easier place to start, because there are add-ons that export+import MAB data ... notice these files *were* converted to SQLite quite a while back.
Hint: MAB Mork Address Book files may be an easier place to start, because there are add-ons that export+import MAB data ... notice these files *were* converted to SQLite quite a while back.
-
- Fanatic
- Posts: 146
- Joined: 2023-02-24, 17:53
Re: show remote content, temporarily
Then direct editing of .msf files doesn't sound like a promising avenue, other than the bulk find-and-replace I initiated, so I still hope for a way to do this from the GUI, either by an extension or as part of the core program. On principle I think settings should be reversible so I favor it being in the core.
Since it appears this "remoteContentPolicy" is the right target but "setMsgHdrPropertyAndReload("remoteContentPolicy", 0)" had no effect, is there another command that does work?
-
- Contributing developer
- Posts: 1611
- Joined: 2018-10-28, 19:56
- Location: Georgia
Re: show remote content, temporarily
If I can figure out how to make this happen for you, I will, but the truth is that I don't know much about Mork or our message headers, and I am almost as lost as you are with this. You and Bilbo already taught me a thing or two with this conversation I didn't know before... that this is a message header property, and is probably tied to the Mork database in some way. That at least gives me a general idea of where to look that I wouldn't have had before.Navigator wrote: ↑2024-04-03, 17:22Then direct editing of .msf files doesn't sound like a promising avenue, other than the bulk find-and-replace I initiated, so I still hope for a way to do this from the GUI, either by an extension or as part of the core program. On principle I think settings should be reversible so I favor it being in the core.
Since it appears this "remoteContentPolicy" is the right target but "setMsgHdrPropertyAndReload("remoteContentPolicy", 0)" had no effect, is there another command that does work?
I'm thinking a good starting place might be to look at where "Show remote content" is in the first place... maybe if I look at that code I can figure out how to reverse whatever it does?
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
- Pale Moon guru
- Posts: 37465
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: show remote content, temporarily
I'm pretty sure you can figure all this out (and how to do the reverse) by digging into the front-end JS/XUL to find the feature in question and looking at how the front-end instructs mailnews core to make the change. You shouldn't have to deal with Mork or the mailbox format directly -- that's why APIs and interfaces were created...
I do think something like this might ultimately be a good candidate for an extension, but maybe the basic functionality to make a message "pristine" again can easily be added. That would actually improve GUI intuitiveness as one of the cornerstones of an intuitive UI is to be able to undo changes made with the same ease as making those changes.
I do think something like this might ultimately be a good candidate for an extension, but maybe the basic functionality to make a message "pristine" again can easily be added. That would actually improve GUI intuitiveness as one of the cornerstones of an intuitive UI is to be able to undo changes made with the same ease as making those changes.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
- Lunatic
- Posts: 324
- Joined: 2017-11-18, 04:24
Re: show remote content, temporarily
Such a feature would be great for Composer/Author/Developer mode, to help the author+sender make messages more compliant with Accessibility requirements, as far as text metadata that needs to stand in for visual/graphical/image content. We're talking image descriptions etc aimed at screen readers and text-to-speech programs, etc. That would also improve Usability of messages displayed in text-only/non-HTML mode.
-
- Fanatic
- Posts: 146
- Joined: 2023-02-24, 17:53
Re: show remote content, temporarily
Bumping to keep the forum software from locking it, not to be an impatient ass.
-
- Pale Moon guru
- Posts: 37465
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: show remote content, temporarily
Auto-locking is not enabled for this particular board.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
- Fanatic
- Posts: 146
- Joined: 2023-02-24, 17:53
-
- Pale Moon guru
- Posts: 37465
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: show remote content, temporarily
All boards used to be locked but I've since installed an extension to control this per-board. Auto-locking for this board is off since then.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite