IRCaBot 2.1.0
GPLv3 © acetone, 2021-2022
#saltr
/2022/08/22
traveler you guys are able to see my messages, yeah?
traveler I'm using biboumi from XMPP :D
itsjustme hey hey poriori
traveler oh, I didn't realize that I had to request voice
dr|z3d you didn't request it, it was granted based upon what appears to be legitimate communication :)
dr|z3d didn't/don't
dr|z3d and welcome.
traveler thank you :)
T3s|4 o/ dr|z3d - is it possible the build # and date did not change on your latest today? After snagging and restarting, I'm showing: Revision: 9577ebbc (Build date: 2022-08-17 13:47:31 UTC)
T3s|4_ on both laptops :)
dr|z3d hi T3s|4, sounds like you got a corrupt download? check your wrapper logs.
dr|z3d HaruCode: got a mini-project for you, if you're interested.
HaruCode what is it?
dr|z3d persistence for the I2P+ snark torrent filters using either cookies or web storage in combination with javascript.
HaruCode not sure if cookies are reliable for localhost, and they sure are expiring. localStorage is better here
HaruCode what exactly needs to be done?
HaruCode not sure if cookies are reliable for localhost, and they sure are expiring. localStorage is better here
HaruCode what exactly needs to be done?
dr|z3d yeah, I figured web storage would be a better bet.. have you got i2p+ installed yet?
HaruCode not yet
HaruCode give me git/files to work on
dr|z3d easier to understand with it installed, but in essence you've got an optional torrent filter bar in I2P+'s snark, which allows you to filter torrents in the display based on status. the idea is to have whatever filter the user has selected persist.
HaruCode show me the page so that I could mimic your codestyle and solutions
HaruCode the 8 btn* elements at the start is the ones whose values should be made persistent?
dr|z3d yeah, and the associated display elements contingent on the buttons.
dr|z3d eg showDownloading() etc
HaruCode those are set based on the button values, aren't they?
dr|z3d yes, aka "contingent" :)
HaruCode then why mention them? I just add loading from and saving to storage
dr|z3d why? clarification.
dr|z3d if it's unneeded, my bad.
HaruCode the source of all changes is the button value, so if we set it right, the rest will be done automatically
dr|z3d very true
HaruCode ouch, typo
HaruCode since I don't know whether you have onclick used/modified in the other code, I didn't set the event handler in your script and used the existing functions
dr|z3d thanks, HaruCode, let's have a look what you done there.
HaruCode I did 9 differences compared to your version
dr|z3d probably don't need to store the config if all is set, but otherwise, looks good.
dr|z3d we also want to clear the existing config when a new one is set, because the filters are mutually exclusive.
dr|z3d so your demo page should be using radios, not checkboxes.
HaruCode I didn't change anything in your logic, just added load to init and save to set
HaruCode as for radios - doesn't really matter, but ok
HaruCode just in case something goes wrong for radios
dr|z3d ok, let's see if it works..
HaruCode doesn't, I guess. for loop syntax. a moment
HaruCode will switch demo to radios also
HaruCode dr|z3d, refresh, it should work
dr|z3d ok, thanks, HaruCode.
HaruCode ping me after testing
dr|z3d will do, I'll let you know if it works as expected.
HaruCode it should. I didn't rely on anything that might change unexpectedly. also check if the added for loop contains break statement. if not, your version is not the latest
HaruCode not that it matters in a loop of 8 elements, but still
dr|z3d for (btn in btnArr) {
dr|z3d if (btnArr[btn].id == activeFilter) {
dr|z3d btnArr[btn].checked = true;
dr|z3d break;
HaruCode that's a bit crude approach, but it doesn't rely on anything that can be modified by external code
HaruCode is that a second session or a ghost?
dr|z3d initial tests suggest that it does a cosmetic job, if nothing else.
dr|z3d ie the radio stays selected, but the filter isn't applied based on the selected radio.
HaruCode that means the filter is not applied on init. I did my job )
dr|z3d how do you figure that out? *chuckle* it doesn't work!
dr|z3d <HaruCode> the 8 btn* elements at the start is the ones whose values should be made persistent?
dr|z3d > yeah, and the associated display elements contingent on the buttons.
dr|z3d > eg showDownloading() etc
HaruCode the simplest way would be to add the applicable show* function call in init
HaruCode should I do it?
HaruCode or you can do it yourself?
dr|z3d please, finish the job :)
dr|z3d then you'll get a nice attribution in git. :)
HaruCode in fact, to make it simpler the script needs a bit more refactoring, so that we can keep element and function references, but that would need more project files
HaruCode I don't care about attributions. In fact, I'm ashamed of doing it "the junior" way because of my laziness
not_bob Looks like I need a new icon...
not_bob Over on i2pd they have me as a bird. I'm cool with that.
dr|z3d why do you need a new icon?
dr|z3d is your existing icon explicitly prohibited?
dr|z3d HaruCode: you know where the git repo is :)
dr|z3d really, you should have the repo in front of you so you can build and test as you go.
not_bob dr|z3d: It says in the rules that I need to provide a liscense for the icon?
dr|z3d just make it public domain :)
not_bob Oh, ok.
not_bob Sounds good.
not_bob Also, when is the meeting tomorrow?
not_bob I didn't see that in the post on zzz.i2p
dr|z3d you didn't read zzz's reply just now, either, it would appear. :)
not_bob Liekly on the wrong screen.
dr|z3d you acknowledged him, so no.
dr|z3d he explicitly referenced the DATE of the meeting.
dr|z3d and the blackbird is some in-house russian joke.
dr|z3d they call me blackbird, or the russian for blackbird, based on a loose interpretation of my nick translated into russian.
not_bob Ahh. Still have not found it. Re-reading.
dr|z3d <zzz> yup. put it on the agenda for the November 1st meeting
dr|z3d note the bit about the DATE.
not_bob Yep, missed that. I'm an idiot.
not_bob Also, I hate this keyboard.
not_bob Cheap plasitc bluetooth.
not_bob I'm prretty sure I could snap it in half.
not_bob Easily.
not_bob Alas, off to other things.
HaruCode dr|z3d, what will you prefer: a long switch statement with arbitrary code in each section, or the use of eval() with short code that will be less flexible?
dr|z3d definitely no eval()
HaruCode there is no user input for eval() to be dangerous, but as you wish
HaruCode done, get it
dr|z3d yeah, but CSP.
dr|z3d ok, great, thanks.
HaruCode calls respective show* function on init, or showAll() if the filter is invalid (aka first load)
dr|z3d yeah, that's how I would have handled it too. logical.
HaruCode oh. forgot to remove the now unnecessary activeFilter
dr|z3d yeah, looked at that and couldn't see any scope.
HaruCode sorry, I'm distracted
dr|z3d_ ok, I think you're going to need the code in front of you so you can build and test. now the filter feature is totally borked.
HaruCode ok, I'll download the archive
dr|z3d ok, thanks. you can build a standalone version of snark to test, if you don't want to build the whole package. ant i2psnark will get you that.
HaruCode I thin I'll just install your i2pupdate
HaruCode *think
HaruCode or it's not in the update?
dr|z3d not in the update, no.
dr|z3d not your script mods, anyways. I try to avoid shipping broken stuff :)
HaruCode very funny
dr|z3d but good plan to install the i2p+ update.
dr|z3d at least then you can get a good idea of how the filter bar functions.
dr|z3d if we can get this working, it'll ship with the 1.9.0+ update.
HaruCode my changes are based on what I saw and they are working. whatever is broken is the result of code interaction
dr|z3d no, the scope of that script is that script.
HaruCode is the js shipped as plain file?
dr|z3d it's supplied as a .js file that runs from the war.
HaruCode the scope of the script is the page, which also has events and such. that's where the unknown is
HaruCode so, where should I get it from? gitlab.com/i2pplus/I2P.Plus ?
dr|z3d the other thing to bear in mind is the torrent counter. that doesn't want to display except when the user applies a filter.
dr|z3d what do you want, the code or the update? or both?
dr|z3d code, gitlab, (dev) update, gitlab or skank, links on skank.i2p
HaruCode building...
HaruCode the zipit target creates standard i2pupdate.zip, right?
dr|z3d you want ant updater for that.
dr|z3d and check ant without a target. there is no zipit target.
dr|z3d once you've deployed that update, future updates can be built with ant updaterCompact
HaruCode ok... so where is the page that uses this script?
dr|z3d > /torrents or /i2psnark, HaruCode. you need to enable the filter bar in the config section.
dr|z3d how you getting on, HaruCode?