~dr|z3d
@RN
@RN_
@StormyCloud
@T3s|4_
@eyedeekay
@orignal
@postman
@zzz
%Liorar
+FreefallHeavens
+Xeha
+bak83_
+cumlord
+hk
+profetikla
+uop23ip
Arch
DeltaOreo
FreeRider
Irc2PGuest19353
Irc2PGuest22478
Irc2PGuest48042
Irc2PGuest64530
Meow
Nausicaa
Onn4l7h
Onn4|7h
Over
acetone_
anon4
anu3
boonst
juoQuua9
mareki2pb
not_bob_afk
plap
poriori_
shiver_1
simprelay
solidx66
thetia
tr
u5657
weko_
dr|z3d
fair enough, zzz
dr|z3d
I can also confirm that there's some crap out there when it comes to html mails.
dr|z3d
I've got an e-mail here with not so much as a body tag *laughs*
dr|z3d
I'm still using taggedElement to set the height of the iframe, not bothering to check for a <head> tag, just putting the script and taggedElement span at the end of the document.
dr|z3d
I've also fixed the positional stuff I mentioned earlier. Couldn't see an easy way to call the view html/view plain text buttons, so I've used javascript instead to place those in the mail header.
orignal
is it salt or i2p-dev? ))
dr|z3d
say wut, origs?
RN
#salt is a leftover channel from some history we've probably forgotten
RN
#saltr and @i2p-dev are where it is at
RN
s/@/#/
dr|z3d
I think orignalski's taking issue with the discussion of + development in the channel, RN. *chuckle*
dr|z3d
ok, 20+ available for the adventurous. featuring zzz's susimail html e-mail viewer.
dr|z3d
(also featuring updates to snex's snark create torrent file filter)
dr|z3d
please report any issue if you're running dev builds.
dr|z3d
I think I've found a corner case that defeats iframeResizer, zzz.
dr|z3d
you want me to forward you the mail? it's unsolicted, bordering on spam, but it's an interesting specimen from the pov of iframeResizer.
dr|z3d
I have no idea what the Router Ri widget is, but apparently I'm a valuable contributor.
dr|z3d
> We wanted to personally thank you for your valuable contributions to our repository. Your recent optimization of our Router Ri widget has greatly improved its functionality and performance. We appreciate your dedication to excellence and your commitment to improving our codebase.
dr|z3d_
> you can probably reproduce the issue if you compose an e-mail with a containing div something like: <div style="height: 100% !important; margin: 0; padding: 0; width: 100% !important;">
dr|z3d
(no html tag, no body tag)
zzz
is it missing a <head>?
dr|z3d
that too.
dr|z3d
seeing quite a lot of these e-mails without anything other than body tags, minus the body tag itself.
dr|z3d
I'm not checking for a head tag in any event, checking for </body> and otherwise just dumping the script at the bottom.
dr|z3d
the issue appears to be the 100% height (!important) on the containing div.
dr|z3d
run that through iframeResizer and the entire mail disappears before your eyes :)
dr|z3d
you're probably already aware, but it's probably worth stating anyways.. if you inspect the iframe content in firefox's developer console, you'll see a corrected version of the html with all the missing tags added.
zzz
so
zzz
not resizer's fault
zzz
if we can't find head, we inject the resizer script at the end, but that's a waste of time due to the CSP
zzz
I could try injecting a whole head after the body, dunno if that would work
zzz
but in any case, there's several backups
zzz
first and most importantly, there's the str4d resizer, which I believe you riupped out
zzz
next are pretty big size defaults and minimums
zzz
finally is the view as plain text button
zzz
nope, it treats a head after the body as more body
orignal
let me clarify
orignal
saltr is supoosed to discuss everything
orignal
but now I see only dev affairs
StormyCloud
#saltr is where all the cool kids hang out
T3s|4
o/ dr|z3d - didn't have time to read the scrollback between you and zzz, but was searchable email content within a Susi account among your goals?
T3s|4
iirc, protonmail offers searchable email content on all their paid accounts, and on their 'free' accounts, it can still be enabled, but it requires d/ling an index file
T3s|4
lacking that, searches are limited to terms within the 'Subject'
dr|z3d
hi T3s|4
dr|z3d
zzz's got a topic / sender search queued up ready for testing. search is his domain, but I don't think he's in any rush to implement full mail body search given the amount of work that entails.
dr|z3d
no issue with getting the inline script to run here, that's not the issue, zzz. I think I'll just use javascript to remove any height:100% declaration on elements. should fix.
dr|z3d
ok, disappearing email issue fixed here.
dr|z3d
for this specific e-mail, there is only html, but open the iframe in a new tab also fixes. might be worth adding a button to the header that opens the iframed html in a new tab.
dr|z3d
function remove100PercentHeight() {
dr|z3d
var elements = document.querySelectorAll("*");
dr|z3d
elements.forEach(function(element) {
dr|z3d
var style = element.style.cssText;
dr|z3d
if (style.toLowerCase().includes("height") && style.includes("100%")) {
dr|z3d
element.style.removeProperty("height");
dr|z3d
}
dr|z3d
});
dr|z3d
}
dr|z3d
document.addEventListener("DOMContentLoaded", remove100PercentHeight);
zzz
dr|z3d, go ahead and forward me that email then please
dr|z3d
10-4, zzz, on its way.
dr|z3d
function remove100PercentHeight() {
dr|z3d
var elements = document.querySelectorAll("*");
dr|z3d
elements.forEach(function(element) {
dr|z3d
var style = element.style.cssText;
dr|z3d
if (style.toLowerCase().includes("height") && style.includes("100%")) {
dr|z3d
element.style.removeProperty("height");
dr|z3d
}
dr|z3d
});
dr|z3d
document.documentElement.style.background = "#fff";
dr|z3d
}
dr|z3d
that additional line ensures that, in the absence of a body bg color, we set the html bg to white, so it shouldn't overrule any body color.
dr|z3d
s/in the absence of/in addition to
zzz
ok will first see how it looks over here
dr|z3d
I'm giving the iframe a margin and border-radius to differentiate it from a plain text e-mail, which is why I'm setting the bg color on the iframe html.
dr|z3d
haven't decided yet if I want to do the full dark theme treatment on e-mails, though I'm tending towawrds leaving them as is.
dr|z3d
maybe a config option.
dr|z3d
you might need to run susi in embedded mode to see the auto-disappear, forgot to explictly test in non-embedded mode. or maybe I did, can't remember.
dr|z3d
orignal: there's no prohibition on topic discussion here, we're just close to release so chewing over some issues.
dr|z3d
dev discussion oscillates between here and #i2p-dev.