Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Norwell History Tools Visual Bugs in Firefox 115.0.3 #268

Open
phdfloppa opened this issue Jul 29, 2023 · 17 comments
Open

Norwell History Tools Visual Bugs in Firefox 115.0.3 #268

phdfloppa opened this issue Jul 29, 2023 · 17 comments

Comments

@phdfloppa
Copy link

phdfloppa commented Jul 29, 2023

The extension does not remember the state of different columns when resizing them (Name, Location, Time, etc.)

Resized columns:

image

Refreshing or re-opening the extension changes the column width back to default:

image

Using the "Limits" button also brings up a bugged interface

Current installation on Firefox 115.0.3:

image

How it appears on my old LibreWolf installation:

image

"Open this time" option does not function when viewing search results

Clicking this option does nothing:

image

@phdfloppa phdfloppa changed the title Norwell History Tools Visual Bugs on Firefox 115.0.3 Norwell History Tools Visual Bugs in Firefox 115.0.3 Jul 29, 2023
@phdfloppa
Copy link
Author

@xiaoxiaoflood ?

@dimdamin
Copy link

you can try it
norvel_history-3.1.0.2.2.109.2023.09.14-xiao.xpi.zip

@phdfloppa
Copy link
Author

phdfloppa commented Oct 12, 2023

you can try it norvel_history-3.1.0.2.2.109.2023.09.14-xiao.xpi.zip

How did you find this file? I can't find it anywhere on the repository page.

Anyway, I installed it, and while it does seem to fix the first issue (column sizes), it does not fix the second issue (bugged "Limits" interface). Never mind, it does display a normal window again, like on my old LibreWolf installation, but the calendar icon to select a date does not function.

I also edited the original post again to include a third bug (forgot to add earlier) that has not been addressed.

@dimdamin
Copy link

How did you find this file?

This is serious, I went to my slut, get it as payment, it seems that he miscalculated....

@phdfloppa
Copy link
Author

How did you find this file?

This is serious, I went to my slut, get it as payment, it seems that he miscalculated....

Uh, are you ok?

@Sneakpeakcss
Copy link

Sneakpeakcss commented Oct 20, 2023

you can try it norvel_history-3.1.0.2.2.109.2023.09.14-xiao.xpi.zip

How did you find this file? I can't find it anywhere on the repository page.

That's his own upload in this issue, it's not anywhere on the repo since it wasn't made by @xiaoxiaoflood.

Anyway, I installed it, and while it does seem to fix the first issue (column sizes), it does not fix the second issue (bugged "Limits" interface). Never mind, it does display a normal window again, like on my old LibreWolf installation, but the calendar icon to select a date does not function.

I also edited the original post again to include a third bug (forgot to add earlier) that has not been addressed.

Here's a slightly modified version that fixes squished date picker (from/to), and replaces removed openUILinkIn, so Open this time works once again (At least on ESR 115, didn't test any of this on other versions).

norvel_history-3.1.0.2.2.109.2023.09.14-xiao.xpi.zip

Calendar not working (poping out just for a second and closing) from what i remember is caused by blur event on #calendar-button, and personally the only way i found to get it working again was to edit chrome://global/content/elements/datetimebox.js directly, and comment it out:

[2023-24-10]
datetimeboxNorwellFix.zip

There's most likely a better way of doing it, but that's beyond me, and this works without any issues for me. Though maybe it broke in other places because of that, but i literally never seen calendar popout in Firefox outside of norwell extension, so i couldn't even check that 🤷

If you want to try it, then unzip the .js file to:

chrome\resources

and override it in chrome\utils\chrome.manifest by adding this line at the end:

override chrome://global/content/elements/datetimebox.js ../resources/datetimeboxNorwellFix.js


Maybe someone else will come up with a better way of fixing this, but for now this works on ESR115 without any visible issues.

@phdfloppa
Copy link
Author

Here's a slightly modified version that fixes squished date picker (from/to), and replaces removed openUILinkIn, so Open this time works once again (At least on ESR 115, didn't test any of this on other versions).

norvel_history-3.1.0.2.2.109.2023.09.14-xiao.xpi.zip

I didn't even notice the squished date picker. Thanks for pointing that out, but the version you sent didn't fix this for me, but Open this time works now. Also, do you mean openTrustedLinkIn? In the version @dimdamin sent, historyQuery.js includes openUILinkIn, so not sure if you made a typo. Is it also possible to change the highlighted text color in the search within displayed results bar? It's a very annoying bright yellow.

Calendar not working (poping out just for a second and closing) from what i remember is caused by blur event on #calendar-button, and personally the only way i found to get it working again was to edit chrome://global/content/elements/datetimebox.js directly, and comment it out:

datetimeboxNorwellFix.zip

Where is datetimebox.js located? I can't find it in my install directory.

@Sneakpeakcss
Copy link

Sneakpeakcss commented Oct 21, 2023

I didn't even notice the squished date picker. Thanks for pointing that out, but the version you sent didn't fix this for me (...)

Works on my side(Firefox 115.3.1esr), even on a clean profile with just scriptloader:

1

Also, do you mean openTrustedLinkIn? In the version @dimdamin sent, historyQuery.js includes openUILinkIn, so not sure if you made a typo.

Somewhere between ESR102 and ESR115 openUILinkIn was removed from Firefox. I replaced it with openTrustedLinkIn to fix Open this time , so no typo there.

I'm not sure how you're applying those changes (manually or removing the .zip extension and dragging norvel_history-3.1.0.2.2.109.2023.09.14-xiao.xpi over firefox to reinstall the extension), but the only changes i did are:

nht.css

#limits {
  position: fixed;
}

input[type="date"] {
-  min-width: initial;
+  min-width: fit-content;
}

This fixes squished date picker.

historyQuery.js

    clearspan();
    createspan(hData[i][1],1,rest);
    hData[i][2]?createspan(hData[i][2],0,rest):createspan('',0,rest);
    return;
  }
-  if (num == 3){ return (tree.view.selection.count>1)? alert("more than one row selected"): (!hData[tree.currentIndex][0])? alert("Last visit time is missing."): openUILinkIn( 'chrome://norwell/content/norwell.xhtml?a='+hData[tree.currentIndex][0], 'tab', {allowThirdPartyFixup: false, triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()} );}
+  if (num == 3){ return (tree.view.selection.count>1)? alert("more than one row selected"): (!hData[tree.currentIndex][0])? alert("Last visit time is missing."): openTrustedLinkIn( 'chrome://norwell/content/norwell.xhtml?a='+hData[tree.currentIndex][0], 'tab', {allowThirdPartyFixup: false, triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()} );}
  if (num == 4)
  {

And this one as mentioned above fixes Open this time

 
Since Open this time works for you now, then the only thing that comes to mind is that you manually applied changes to historyQuery.js and omitted nht.css. Other than that, i have no idea. Maybe you have remnants of original extension, since the provided base here changed the original filename from norvel@history.xpi, so check extensions folder in your Firefox profile, but i really doubt that's the issue.

Is it also possible to change the highlighted text color in the search within displayed results bar? It's a very annoying bright yellow.

That would require another edit in historyQuery.js at line 596:

-   button.setAttribute("style","-moz-user-select:text;"+(z?"background-color:yellow;":""));
+   button.setAttribute("style","-moz-user-select:text;"+(z?"background-color:#1e1e1e;color:#00adee":""));

Where is datetimebox.js located? I can't find it in my install directory.

That's an internal Firefox file, you won't find it anywhere to replace it by hand, that's why it's needed to override it using the mentioned chrome.manifest

If you want to try it, then unzip the .js file to:
chrome\resources
and override it in chrome\utils\chrome.manifest by adding this line at the end:

override chrome://global/content/elements/datetimebox.js ../resources/datetimeboxNorwellFix.js

Those paths refer to chrome folder located in Firefox profile, you'll need to create resources folder yourself, and chrome.manifest is already there since you wouldn't be able to use extensions without the loader installed.

@dimdamin
Copy link

dimdamin commented Oct 21, 2023

@Sneakpeakcss

override chrome://global/content/elements/datetimebox.js ../resources/datetimeboxNorwellFix.js

hello Sneakpeakcss, use override chrome://global/content/elements/datetimebox.js chrome://norwell/content/datetimeboxNorwellFix in chrome.manifest

@Sneakpeakcss
Copy link

Sneakpeakcss commented Oct 21, 2023

@Sneakpeakcss

override chrome://global/content/elements/datetimebox.js ../resources/datetimeboxNorwellFix.js

hello Sneakpeakcss, use override chrome://global/content/elements/datetimebox.js chrome://norwell/content/datetimeboxNorwellFix in chrome.manifest

You mean to do it from extension itself ? I wanted to avoid packaging and overriding from there just in case something goes wrong, since at that point it requires to turn off the whole extension to revert back in comparison to removing it from chrome\utils\chrome.manifest.

It would be nice to be able to do it only for Norwell rather than globaly, but i'm not even sure if that's possible here.

If anyone doesn't want to bother with any downloading/editing, then here's a 'all-in-one' version, also including the change for yellow highligh. Just bear in mind all of the above:

norvel_history-3.1.0.2.2.109.2023.09.14-xiao.xpi.zip

@phdfloppa
Copy link
Author

phdfloppa commented Oct 22, 2023

@Sneakpeakcss

Works on my side(Firefox 115.3.1esr), even on a clean profile with just scriptloader:

I had to restart my browser. Now it works.

Somewhere between ESR112 and ESR115 openUILinkIn was removed from Firefox. I replaced it with openTrustedLinkIn to fix Open this time , so no typo there.

Sorry, I misread what you wrote. I thought you meant that openUILinkIn was removed from the extension itself.

I'm not sure how you're applying those changes (manually or removing the .zip extension and dragging norvel_history-3.1.0.2.2.109.2023.09.14-xiao.xpi over firefox to reinstall the extension), but the only changes i did are:

I didn't modify anything yet, but do I just un-zip the extension, modify the .js files and re-zip it?

I have also discovered yet another issue: Display Breadcrumbs leading to this page and Show links that were clicked on this page highlight the incorrect number of entries in the list, but they do display the correct amount in the search within displayed results bar (e.g. "total number of clicked links : 3"). This only happens in the versions you and dimdamin sent me, but not the one in the repository (presumably, you used the version he sent to make changes). It looks like it might have something to do with the colors, but I'm not sure. It would also be helpful if @dimdamin told us what he modified and what norwellht.xpi he used:

image

Version from repository.

image

Yours and dimdamin's version.

Both pictures use the same history entries. The last three were links I clicked from the first site (https://ublockorigin.com/); I selected the first entry and used Show links that were clicked on this page on it.

@Sneakpeakcss
Copy link

Sneakpeakcss commented Oct 23, 2023

I didn't modify anything yet, but do I just un-zip the extension, modify the .js files and re-zip it?

You might need to package it without any compression as a zip(?), i'm not certain, but you can find a manual for Firefox extensions provided by Mozilla somewhere. I just drop files over opened package in 7zip to overwrite them, so i don't have to bother packaging the whole thing over and over.

I have also discovered yet another issue: Display Breadcrumbs leading to this page and Show links that were clicked on this page highlight the incorrect number of entries in the list, but they do display the correct amount in the search within displayed results bar (e.g. "total number of clicked links : 3"). This only happens in the versions you and dimdamin sent me, but not the one in the repository (presumably, you used the version he sent to make changes). It looks like it might have something to do with the colors, but I'm not sure.

The highlights aren't working properly because of seltype="single" in norwell.xhtml.
At this point, i remade the whole thing using last Xiaoxiaoflood's upload as a base just to avoid broken parts, so this is fixed.

image

It would also be helpful if @dimdamin told us what he modified and what norwellht.xpi he used:

You can always unpack edited and original extensions and compare them with something like WinMerge.


Here's a 'clean' version that requires to manually apply CalendarFix:

[2023-24-10]
CalendarFix

[2023-25-10]

norvel@history.xpi.zip

And here's one that has datetimeboxNorwellFix.js already included in package, so no additional editing required:

[2023-25-10]
norvel@historyCalendarFixIncluded.xpi.zip


Both of them apply all of the previously mentioned fixes +

  • Some additional CSS changes to the bottom panel to make it easier to distinguish it from the list window (in both dark/light theme).
  • Fixed positioning in top-left ? window.
  • Fixed importing history from Firefox/Chrome, as it broke at some point, possibly even before ESR115.
  • Fixed some paths that at this point might not even be necessary .jsm -> .sys.mjs
  • Fixed positioning of loading bar while searching to stop unnecessary 'jumping'

Works on both Firefox 115.3.1 ESR and 118.0.2 Release

@phdfloppa
Copy link
Author

@Sneakpeakcss

And here's one that has datetimeboxNorwellFix.js already included in package, so no additional editing required:

norwellhtCalendarFixIncluded.xpi.zip

Just to be clear, this still applies globally, like mentioned here, and not only to the extension itself?

Also, is there a way to fix this?

Another instance where firefox makes your history very confusing is that it uses only one title for multiple visits to same url. Say you visit CNN daily and it's title changes daily, but firefox edits this url title every single time so if you look at visit to CNN from year ago you will see todays title.

I assume not since this seems to be a consequence of how Firefox stores history, but it's annoying enough for me to ask about it.

@Sneakpeakcss
Copy link

Sneakpeakcss commented Oct 24, 2023

Just to be clear, this still applies globally, like mentioned here, and not only to the extension itself?

Yes, as long as Norwell extension is turned on, then it overrides the default datetimebox.js.

While the changes to that file are minimal, and the calendar popout itself is so obscure that it's hard to find examples that use it, i would still recommend using the clean version and overriding that file manually. There's always a chance that it will be changed by Firefox update and require additional updates, and at that point it's more reasonable to keep it separate.

Also it seems that even while using the edited datetimebox.js the blur event is still working as it does normally:

data:text/html, <input type="date" onBlur="console.log('blur')">
https://jsfiddle.net/40co176n/

 

Also, is there a way to fix this?

Another instance where firefox makes your history very confusing is that it uses only one title for multiple visits to same url. Say you visit CNN daily and it's title changes daily, but firefox edits this url title every single time so if you look at visit to CNN from year ago you will see todays title.

I assume not since this seems to be a consequence of how Firefox stores history, but it's annoying enough for me to ask about it.

This sounds like something that would require changes to Firefox files that even scriptLoader doesn't have access to.


Also i've updated links in previous post with updated versions that have some additional positioning fixes in extension, and changed the CalendarFix to avoid some errors in console.

@phdfloppa
Copy link
Author

@Sneakpeakcss In regards to you updating links:

[2023-24-10]
CalendarFix

[2023-25-10]

norvel@history.xpi.zip

And here's one that has datetimeboxNorwellFix.js already included in package, so no additional editing required:

[2023-25-10]
norvel@historyCalendarFixIncluded.xpi.zip

What are the differences between the top two?

@Sneakpeakcss
Copy link

@Sneakpeakcss In regards to you updating links:

[2023-24-10]
CalendarFix
[2023-25-10]
norvel@history.xpi.zip
And here's one that has datetimeboxNorwellFix.js already included in package, so no additional editing required:
[2023-25-10]
norvel@historyCalendarFixIncluded.xpi.zip

What are the differences between the top two?

Same as mentioned previously. CalendarFix.zip contains only the newest fix for datetimebox.js, that requires manual override when using clean version below it (norvel@history.xpi.zip). Extension will still work without it, but you won't be able to open calendar in this version.

So there's no comparison between the top two files, they contain completely different things. All the links were gathered in one spot for convenience when i was updating them, and at this point, the extension is back to its previous state with some annoyances fixed on top of that.
Those files are final at this point, especially when i don't use Norwel that often to bother going through all weird visual quirks.

@phdfloppa
Copy link
Author

@dimdamin @Sneakpeakcss

Is there a way to delete/modify history entries with this? Using the default Firefox history viewer is quite cumbersome. I have already tried SQLite extensions, but those are hard to use as well.

Also why is my places.sqlite split into these files. I heard this only happens when Firefox is open, but when I close it, they don't combine.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants