Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
Pages: 12Next
Current Page: 1 of 2
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]

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


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.




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



Edited 7 time(s). Last edit at 08/22/2019 02:22PM by JohnHell.

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!

---
Gerry

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 winking smiley. 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.

---
Gerry

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.

---
Gerry



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 winking smiley.



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 winking smiley



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!

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 winking smiley


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 smiling smiley



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 yawning smiley), 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 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

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 winking smiley

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 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

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



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.



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

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: cpm1a_new
Date: August 22, 2019 12:07PM

Dates in history is great, thanks. but any way to keep KM window maximized all the time?

i tried just to delete this

onload="window.sizeToContent();HistorySidebarInit();"

--> history list MAXIMIZED but empty



Edited 2 time(s). Last edit at 08/23/2019 08:20AM by cpm1a_new.

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: JohnHell
Date: August 22, 2019 02:11PM

Quote
cpm1a_new
Dates in history is great, thanks. but any way to keep KM window maximized all the time?

i tried just to delete this

onload="window.sizeToContent();HistorySidebarInit();"

--> history list empty

You don't have to delete anything in the file provided in my first post. As much the folder, in your profile, startupcache.

The window settings are stored in localstore.rdf in your profile. Check it has permissions to write and is not set to read-only, etc.

Alternatively you can delete that file (you will lose some other XUL dialogs settings too).



Edited 1 time(s). Last edit at 08/22/2019 02:11PM by JohnHell.

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: cpm1a_new
Date: August 23, 2019 05:36AM

>I can't make the window to remember the size

i don't need it to remember the size. i just want KM always maximied



Edited 2 time(s). Last edit at 08/23/2019 08:19AM by cpm1a_new.

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: hermes
Date: August 23, 2019 08:25AM

@cpm1a_new

user_pref("kmeleon.display.maximized", true);

Write in user.js (in profile folder).

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: cpm1a_new
Date: August 23, 2019 12:11PM

@hermes
its already in there, no effect

Options: ReplyQuote
Re: Dates in history 74.x and above (I guess)
Posted by: siria
Date: August 23, 2019 08:19PM

For many years the size of xul-windows has been a huge prob in older KM-versions (no idea if meanwhile fixed). For example to get the error console maximized in KM1.6 I need to use brute force, an $OnLoad command to check the URL and then firing "window.resizeTo(screen.availWidth,screen.availHeight);"
All else didn't work!

But checking prefs was a good idea, had those completely forgotten at the moment. Now looking around in my about:config, this one seems interesting - and it even works in KM1.6! Now idea where I got that one from. It doesn't even have a default setting, must be created by right-click:

kmeleon.plugins.history.dialog.maximized (BOOL) true

Quote
cpm1a_new
Dates in history is great, thanks. but any way to keep KM window maximized all the time?
i tried just to delete this
onload="window.sizeToContent();HistorySidebarInit();"
--> history list MAXIMIZED but empty

That code is javascript. Look at the semicolons => the line contains 2 commands:
1=change size / 2=initialize something
You deleted not only the size, but also the history-start

Try this:
1) open about:config, right-click and create the dialog pref above, type Bool, set it true.
Open History: is it maximized now?
If not, replace in the xul
2) "window.sizeToContent()," with "window.resizeTo(screen.availWidth,screen.availHeight);"



Edited 1 time(s). Last edit at 08/23/2019 08:26PM by siria.

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


K-Meleon forum is powered by Phorum.