Development :  K-Meleon Forum
K-Meleon development related discussions. 
Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: January 22, 2017 12:12AM

Ok, this night I said "no more, no more!!!". (Or anymore, whatever)

And I dig how the ****** could I do to show the dates in the history, because, I don't know you, but not knowing the date/time I visited a site just makes me crazy, aside absolutely useless. And until now I went to the SQlite Manager, copy the epoch time cell and convert to human readable. Crazy, really, very crazy.

What do I want a history for if I can't see the date?!?!?! And sorting isn't just enough.

I'm not complaining to your work Dorian, but, argh.... I couldn't bear with this anymore (almost 3 years (probably I requested)).

With the help of the "God of Luck" , at the first try, setting a treecol element with the id set to "date" bring the **** date column to life, then I had to make it work as it was ugly as hell, not resizable, not remembering user size, not header, etc, etc. Really, after the luck above, this has been the hardest headache. MDN wasn't very helpful .

So, here it is the result. As this subforum doesn't allow to attach files, I have uploaded to my MediaFire space.

Update 2017-02-12: File here. Now with window resize option, thanks to the collaboration of adodupan user.

Just place the history.xul and history.js files in the path \browser\ omni.ja \chrome\kmeleon\content\history (open omni.ja with your compression software, it is just a zip, kinda...)
[green path from K-meleon root folder, orange path from/inside omni.ja]

NOTE: Confirmed multi-version from 74.0 this has been tested with 75.0 only. But if I'm not wrong, the file hasn't changed since 74.0 or so, so should work. But, as I always say, make a backup of omni.ja first and then replace the file.

To ensure that all works, delete, as well, the startupCache folder in the profile directory before start K-meleon again.



Post updated with the file mentioned. It's better to have our copy here. Thanks JohnHell and adodupan for your job.
(c) rodocop



Edited 6 time(s). Last edit at 12/05/2017 06:12AM by rodocop.

Attachments: history.xul 2017-02-12 with dates and resize-en.zip (3.2 KB)  
Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: Mala Okeh
Date: January 22, 2017 11:21AM

Thx, John, history.xul works very fine in K-Meleon 76RC

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: January 22, 2017 04:04PM

Quote
Mala Okeh
Thx, John, history.xul works very fine in K-Meleon 76RC

Thank you for the feedback

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: foliator
Date: January 22, 2017 04:20PM

Works perfectly in KM 75, too. Actually, the history window always looked like something was missing, but I don't use it very often, so I never realized until now that there had been no date column. Thanks for the improvement, John!

-----

Using KM 75.0 on Windows 7 (x86)

My personal Website. No ads, no scripts, no cookies -- no kidding!
http://gbusch.altervista.org

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: January 22, 2017 05:35PM

We are the opposite sides ;). I use very often.

I'm trying now to improve it a little, but, for whatever reasons, my commands are not accepted.

I can't make the window to remember the size and, for whatever reason, it takes the kmeleon.display.xul[height,width] values, instead of what I tell. Looks like setting a persist and an id, doesn't help.

Also I was trying to make it horizontally scrollable, so I could include the "raw" URL column I just found (additionally to the tooltip), but no luck this time either.

Maybe someone with more XUL knowledge (desga, maybe ) can improve it too :-S

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: foliator
Date: January 23, 2017 05:48AM

The history window always comes up centered, too, regardless of where I moved it last. Oh, well, at least the column widths are remembered.

When I first started using K-Meleon I was surprised that the history opened in a separate window instead of the usual side panel, like in Firefox and IE.

As for the URLs, I'm satisfied just seeing the tooltip.

At any rate, I've made allowances for the fact that some of the conventional features of browsers are missing in KM, because it's so much faster and lighter than the others. I still miss the ability to edit bookmarks right on the bookmarks toolbar, however, although in my case that toolbar takes up too much vertical space anyway, so I disabled it and put a button on one of the other toolbars to drop down the bookmarks menu, instead.

-----

Using KM 75.0 on Windows 7 (x86)

My personal Website. No ads, no scripts, no cookies -- no kidding!
http://gbusch.altervista.org

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JamesD
Date: January 24, 2017 07:03PM

I guess I did not do something quite correct. Columns - I don't see any.

I extracted the file from JohnHell and replaced the file by the same name in the omni.ja file in my KM 76RC2. The omni.ja file where I did the replacement was modified on 11/19/2016 and had a size 10,723,547. I made the zip and changed the name to omni.ja and replaced the one in the KM root folder.

Did I not do something right?

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: foliator
Date: January 24, 2017 07:37PM

Quote
JamesD
I guess I did not do something quite correct. Columns - I don't see any.

I extracted the file from JohnHell and replaced the file by the same name in the omni.ja file in my KM 76RC2. The omni.ja file where I did the replacement was modified on 11/19/2016 and had a size 10,723,547. I made the zip and changed the name to omni.ja and replaced the one in the KM root folder.

Did I not do something right?

It sounds like you did it right, but here's how I did it, after of course backing up the original omni.ja:

I started 7-Zip's file manager in two-pane mode, opening omni.ja in the left pane without changing its name. 7-Zip recognizes archives even if they have the wrong or missing extension. Then I navigated to the folder where the history.xul file was located.

In the right pane I opened John's archive and copied his history.xul to the left pane. When I closed the files in the two panes, 7-Zip kept omni.ja's name intact and it worked fine.

-----

Using KM 75.0 on Windows 7 (x86)

My personal Website. No ads, no scripts, no cookies -- no kidding!
http://gbusch.altervista.org



Edited 2 time(s). Last edit at 01/24/2017 07:40PM by foliator.

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: January 24, 2017 10:40PM

Quote
JamesD
I guess I did not do something quite correct. Columns - I don't see any.

I extracted the file from JohnHell and replaced the file by the same name in the omni.ja file in my KM 76RC2. The omni.ja file where I did the replacement was modified on 11/19/2016 and had a size 10,723,547. I made the zip and changed the name to omni.ja and replaced the one in the KM root folder.

Did I not do something right?

Yeah... , sadly you edited the wrong file...

Quoting myself

Quote
JohnHell
Just place the history.xul file in the path \browser\ omni.ja \chrome\kmeleon\content\history (open omni.ja with your compression software, it is just a zip, kinda...)


You edited the one in the root folder and I was telling the one in root\browser folder. This file is only about 2-2.5 MB. The one personalized by Dorian for K-meleon insights.

The green path is from the K-meleon root. The orange path is inside omni.ja.

What file did you actually replace in the main omni.ja?

As that file doesn't suffer from modifications, you could overwrite with the one from the 76RC2 version. Unless you made the recommended backup ;).



Edited 2 time(s). Last edit at 01/24/2017 10:43PM by JohnHell.

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JamesD
Date: January 24, 2017 10:54PM

That's right. I am getting too old. I will fix. Thanks

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: January 24, 2017 11:09PM

Quote
JamesD
That's right. I am getting too old. I will fix. Thanks

Don't be that rude with yourself.

Anyway, better I edit the first post with this colourful path ;)



Edited 1 time(s). Last edit at 01/24/2017 11:09PM by JohnHell.

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: adodupan
Date: February 08, 2017 09:37PM

Quote
JohnHell
I can't make the window to remember the size and, for whatever reason, it takes the kmeleon.display.xul[height,width] values, instead of what I tell. Looks like setting a persist and an id, doesn't help.

It would be nice surprise that working as expected.
Put some id and persist attribute in xul file and put this in js file:
function HistorySidebarInit()
{
  /** new lines **/
  var docElement = window.document.documentElement,
  width = parseInt(docElement.getAttribute('width'), 10) || window.innerWidth,
  height = parseInt(docElement.getAttribute('height'), 10) || window.innerHeight;
  if (docElement.hasAttribute('persist')) {
    window.setInterval(function () {
      if (window.innerWidth != width) {
        width = window.innerWidth;
        docElement.setAttribute('width', width);
        window.document.persist(docElement.id, 'width');
      }
      if (window.innerHeight != height) {
        height = window.innerHeight;
        docElement.setAttribute('height', height);
        window.document.persist(docElement.id, 'height');
      }
    }, 1000);
  }
  /** end **/


Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: rodocop
Date: February 09, 2017 01:47AM

Great you are back again, adodupan!


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: February 09, 2017 10:29PM

Quote
adodupan
Quote
JohnHell
I can't make the window to remember the size and, for whatever reason, it takes the kmeleon.display.xul[height,width] values, instead of what I tell. Looks like setting a persist and an id, doesn't help.
It would be nice surprise that working as expected.

What?

Broken in K-meleon or in XUL.

Quote
adodupan
Put some id and persist attribute in xul file and put this in js file:

The window tag already had an ID and persist to width and height as I said above ;)


Quote
adodupan
function HistorySidebarInit()
{
  /** new lines **/
  var docElement = window.document.documentElement,
  width = parseInt(docElement.getAttribute('width'), 10) || window.innerWidth,
  height = parseInt(docElement.getAttribute('height'), 10) || window.innerHeight;
  if (docElement.hasAttribute('persist')) {
    window.setInterval(function () {
      if (window.innerWidth != width) {
        width = window.innerWidth;
        docElement.setAttribute('width', width);
        window.document.persist(docElement.id, 'width');
      }
      if (window.innerHeight != height) {
        height = window.innerHeight;
        docElement.setAttribute('height', height);
        window.document.persist(docElement.id, 'height');
      }
    }, 1000);
  }
  /** end **/


This, did it work for you? Didn't for me with 75.0.

But no errors either :-?

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: adodupan
Date: February 10, 2017 01:28AM

Hey lucky, god probably had his hands full of other demands last night. You should try tomorrow.
Don't forget this

Quote
JohnHell
To ensure that all works, delete, as well, the startupCache folder in the profile directory before start K-meleon again.

In case it will not work again, send me your email, you will get edited files.

Good luck :)



Edited 1 time(s). Last edit at 02/10/2017 05:21AM by adodupan.

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: February 10, 2017 05:21PM

Quote
adodupan
Hey lucky, god probably had his hands full of other demands last night. You should try tomorrow.
Don't forget this

Quote
JohnHell
To ensure that all works, delete, as well, the startupCache folder in the profile directory before start K-meleon again.

In case it will not work again, send me your email, you will get edited files.

Good luck smiling smiley

It's not about wrongly editing files, forgetting deleting folders, etc, I know I have to modify history.js with that portion of code (and set an id and persist on window tag in history.xul) and what to delete, it is just it doesn't work.

I would say the other way: localstore.rdf does store the window height and width setting for history window, but that doesn't make any change because when opened again it doesn't get the values from there.

BTW, I find that the setting stored in localstore.rdf isn't the window that holds the whole history, but an inner one. The other tag higher than window tag in the XML tree would be xml tag itself what doesn't make sense to me.


I ask the very simple question again :o), does it work for you?

If so, better than send them to me, share them here. This is for all, not only for me smiling smiley

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: adodupan
Date: February 11, 2017 01:07PM

What a crazy story :)

Lucky my man, you are really special character. But you have my sympathy.
Code above is a way to avoid this bug and it doing its job, of course. This is so simple, i'm not sure i can explain this better.
Email is a shortcut for me, it's just faster than this, because i can't attach files here. So, only thing i still can do is show you how it looks xul file. These are changes in your xul file:
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
   orient="vertical"
   title="&window.title;"
   windowtype="kmeleon:history"
   id="wndHistory"
   height="550px"
   width="650px"
   persist="width height"
   onload="window.sizeToContent();HistorySidebarInit();"
   onclose="SidebarUtils.setMouseoverURL('');">
Sorry if this can't help you, but that's all from me.

Best regards

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: February 11, 2017 05:32PM

Quote
adodupan
What a crazy story smiling smiley

Lucky my man, you are really special character. But you have my sympathy.
Code above is a way to avoid this bug and it doing its job, of course. This is so simple, i'm not sure i can explain this better.
Email is a shortcut for me, it's just faster than this, because i can't attach files here. So, only thing i still can do is show you how it looks xul file. These are changes in your xul file:
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
   orient="vertical"
   title="&window.title;"
   windowtype="kmeleon:history"
   id="wndHistory"
   height="550px"
   width="650px"
   persist="width height"
   onload="window.sizeToContent();HistorySidebarInit();"
   onclose="SidebarUtils.setMouseoverURL('');">
Sorry if this can't help you, but that's all from me.

Best regards

And that is what I have!!!!

Check it with the link below smiling smiley

I know may be easier to communicate by mail, but, come on, this is a public development/enhancement for all of us K-meleoniacs, not a crazy history or anything else. But if I could choose, I would go for IRC instead mail, if you ask.

We can even post files, using simple auto-destroy sites like sendspace.com as I did this time.
https://www.sendspace.com/file/62kffq

Unless you find there something my eyes couldn't see, I bet is like you said (with my own ID from my earlier tests, of course).

I know what the code is for (other thing is that I don't know about the XUL coding insights and I couldn't do by myself).

And, excuse me, again, but, did you say that it worked for you? tongue sticking out smiley


BTW I don't get this: "Lucky my man, you are really special character. But you have my sympathy."

I didn't try to be on the offensive, on the defensive or anything. I think I was friendly ;)

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: adodupan
Date: February 12, 2017 11:45AM

Yes, they look like twins. I don't see the difference :)

Missing this:
onload="window.sizeToContent();HistorySidebarInit();"
Code in js file should be at the beginning of the function.

What is god spoke this morning,
will it ever stop this madness :)

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: February 12, 2017 04:59PM

Quote
adodupan
Yes, they look like twins. I don't see the difference smiling smiley

Missing this:
onload="window.sizeToContent();HistorySidebarInit();"
Code in js file should be at the beginning of the function.

What is god spoke this morning,
will it ever stop this madness smiling smiley


Mmmmm, my bad.

As I have more than one history.xul files from my tests, maybe in one of them I removed that by mistake. Strange I only deleted that.



Ok, works, but MediaFire upload server doesn't want to collaborate now, so, I'll upload and update the first post as soon as it works.

I only hope it works... because, you know, guys, it was complaining about old browser version :/ Hope it is temporary.



Edited 1 time(s). Last edit at 02/12/2017 04:59PM by JohnHell.

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: February 12, 2017 05:27PM

Updated first post with the link.



MediaFire was trolling me and I uploaded it like 3 or 4 times, but it didn't confirmed the upload (I hate when it does that).

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: rodocop
Date: February 12, 2017 06:17PM

Quote
JohnHell
MediaFire upload server doesn't want to collaborate now

I've created PowerFolder account for K-Meleon community.
PowerFolder gives not so much space for free (1Gb - 5Gb) but it's convenient as it allows direct and updateable links.
(for example - if you upload new version of some stuff without renaming it, it keeps the link given once. Very good to share in public!)

The login is k-meleon@mail.com

Please, contact me at this mail to get the access to the storage.

And yes, this mail is registered also for community needs, so you can ask for credentials if you need communicate such a way with other K-Meleonairies ;-)

Also I can add 4 users to the PowerFolder account as Group so they can publish their job there as simple users, not account admins.

For now - you choose the way you want to use this stuff. Welcome!

UPD.: this is the public (read-only) link to the main folder: https://my.powerfolder.com/filestable/MlFVbkd1NVhOVGNLMzlVekc0aXh3


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)



Edited 3 time(s). Last edit at 02/12/2017 07:34PM by rodocop.

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: February 12, 2017 11:14PM

Quote
rodocop
I've created PowerFolder account for K-Meleon community.
PowerFolder gives not so much space for free (1Gb - 5Gb) but it's convenient as it allows direct and updateable links.
(for example - if you upload new version of some stuff without renaming it, it keeps the link given once. Very good to share in public!)

Is that meaning that the file gets overwritten to keep the link URL? If so :/ I prefer to keep file versioning than keep URL (Note that my problem wasn't this).


But thanks to let us know that. Will help us to share files smiling smiley For now I don't need credentials but I'll have in mind.



Edited 2 time(s). Last edit at 02/12/2017 11:15PM by JohnHell.

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: rodocop
Date: February 12, 2017 11:42PM

Quote
JohnHell
Is that meaning that the file gets overwritten to keep the link URL?

The service can save 1-5-25-100-Unlimited versions of file (using your space, not giving additional), but actual one will have the fixed filename and public link.

You'll need desktop client installed though to manage old versions. Web-based GUI doesn't allow this.

Also every single folder can be mounted by WebDAV.


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)



Edited 1 time(s). Last edit at 02/12/2017 11:58PM by rodocop.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.